Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm doing some development in Linux running in VirtualBox. The computer is an Core i5 running Windows 7 (32 bit). According to the entry on Wikipedia, the CPU should support SSE4.2, but only SSE3 works in the VM. If I compile with the -msse4 flag in gcc, the resulting binary would crash with an illegal instruction error.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

This is a known issue and already in their bugtracker:

[feature request] Enable the guest OS to make use of SSE4.1, 4.2 and POPCNT instruction sets https://www.virtualbox.org/ticket/8651

share|improve this answer
    
Thanks for the info. –  cleong Mar 14 '13 at 8:46
add comment

VirtualBox or KVM or any other such virtualisation technology exposes some features of the host CPU to the guest.

Why not exporting all features of the host CPU? Imagine you want to migrate your virtual machine from one host to the other, without interruption (or by saving the state). But the second host does not have SSE 4. If your VM would have exposed SSE 4 on host 1 and you would have successfully compiled and execute a program using this instruction set, when migrated to host 2 it will break.

That is why - IMHO - it is wise not to expose every supported instructions set of the host CPU by default and I am not surprised that this is the case with VirtualBox. It should however (and I hope that would be the implemented solution for the ticket) allow user to override the default choice of exposed features. And AFAIK this option does not exist yet. So you will have to be patient.

Note that KVM allows you to set the instructions sets you want to expose to the guest(s) per guest(s).

share|improve this answer
    
Do you have any references for not supporting SSE4 being "to allow you to migrate" and whatnot, versus "we just didn't get around to it yet"? –  Mark Sowul Jan 29 at 13:52
    
Nope I don't. I should probably reformulate my sentence, instead of reading "That is why VirtualBox does not necessarily exposed by default (...)" you should have read "That is why - IMHO - it is wise not to expose every supported instructions set by default and I am not surprised that this is the case with VirtualBox". I hope I am answering your concern. –  Huygens Jan 29 at 20:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.