I want to play with the new AVX instructions. I saw that QEMU might have support, so I built it from Git (yesterday). I set the CPU to SandyBridge and I booted Tiny Core Linux. TCL has kernel 3.0 and Wikipedia claims Linux got AVX support in 2.6.30. TCL works with AVX in Bochs too. But when I cat /proc/cpuinfo when running in QEMU, avx is missing from flags:

$ cat /proc/cpuinfo 
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel Xeon E312xx (Sandy Bridge)
stepping    : 1
cpu MHz     : 1861.924
cache size  : 4096 KB
fdiv_bug    : no
hlt_bug     : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc up pni cx16 popcnt hypervisor lahf_lm
bogomips    : 3725.00
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:


How do I get AVX support in QEMU?

2 Answers 2


It seems like if a defined feature is not available, it will fail silently by default (source). Qemu can emulate some instruction sets not supported by the host CPU, but I'm not sure if AVX is among them (or not yet).

Ensure that all the libraries used by Qemu, and especially libvirt, are up to the right level. You could also try the qemu-kvm parameters of -cpu sandyBridge,+avx,enforce. See also if this thread is useful.

For AVX and other new instruction set extensions, Intel provides an emulator:
Intel Software Development Emulator.
You could maybe use it instead, for gaining experience with AVX.

  • Yes, thank you very much. I realize that QEMU requires host support since I now know about the check flag and it triggers warnings, even about SSE 4.1. I'm using Bochs now but I might try Intel SDE later since Bochs has high CPU utilization even though I run it at 50 Mhz and with the idle hack. I don't have hardware virtualization support, so I can't use KVM. Bochs has support for more CPU features than real CPU's though. My current Bochs setup has SSE 4.2, 4.3, FMA3 and 4! Thanks again. Jul 28, 2012 at 19:33
  • Default behavior may be changed now after the big quest of query interfacing. Also, take note at least some of the instructions QEMU emulates may actually rely on KVM.
    – mirh
    Aug 21, 2019 at 19:19

Another option per the Libvirt formatdomain docs, you can edit the xml (virsh edit <domain>) and change the cpu mode to host-model. This works assuming that lscpu flags include avx in the list of supported instructions.

  <cpu mode='host-model' check='none'>
    <model fallback='forbid'>qemu64</model>

After making this edit you will need to completely power off the vm and start it back up before the change will take affect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .