Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): # uname -r 2.6.32-128.el6.x86_64 # rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.153.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1.<commandline> -cpu Penryn,+ace,enforce ( ace is the flag on Westmere cpu model) 2.<commandLine> -cpu Conroe,+smx,enforce ( smx is the flag on Westmere cpu model) 3.<commandLine> -cpu Nehalem,+ace,enforce Actual results: QEMU runs in both cases Expected results: QEMU does not run Additional info: #<commandLine> -cpu host,+ace,enforce CPU feature ace not found warning: host cpuid 0000_0001:ecx flag restricted to guest 'vmx' [0x00000020] Unable to support requested x86 CPU definition #<commandLine> -cpu cpu64-rhel6,+ace,enforce CPU feature ace not found warning: host cpuid 8000_0001:ecx lacks requested flag 'svm' [0x00000004] warning: host cpuid 8000_0001:ecx lacks requested flag 'abm' [0x00000020] warning: host cpuid 8000_0001:ecx lacks requested flag 'sse4a' [0x00000040] Unable to support requested x86 CPU definition
I'm not sure it is worth fixing as long as the regular models w/o additional flags work.
Yes that is the default "-cpu" flag parsing of qemu, namely it doesn't bail if unknown flags are present: # x86_64-softmmu/qemu-system-x86_64 -smp 1 -netic -net user ../../winxp-64.img \ -m 1024 -cpu Penryn,+popcnt,+ou812,+sse4_2,check Using CPU model "Penryn,+popcnt,+ou812,+sse4_2,check" CPU feature ou812 not found warning: host cpuid 0000_0001:ecx lacks requested flag 'sse4.2|sse4_2' [0x00100000] warning: host cpuid 0000_0001:ecx lacks requested flag 'popcnt' [0x00800000] <guest launches> But you're right "enforce" semantics should be held (in addition to complaining) and qemu should error exit. It's a nit and should be cleaned up the next time we're in that section of the code.
Not only non-existing flags are not rejected properly, but also flags that exist, are supported by the host, but unsupported by the kernel. e.g.: -cpu Opteron_G3,+ht,-svm,enforce HT is not supported by the KVM kernel module and gets disabled, but Qemu continues to run without aborting.
*** Bug 813132 has been marked as a duplicate of this bug. ***
*** Bug 821581 has been marked as a duplicate of this bug. ***
not sure if hit the same problem on Opteron_G5 host. version: # uname -r 2.6.32-339.el6.x86_64 # rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.334.el6.x86_64 guest:win2008r2 host: [root@amd-pence-01 src]# cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 21 model : 2 model name : AMD Eng Sample, 1S256146U8K54_35/25/20_2/8 stepping : 0 cpu MHz : 1400.000 cache size : 2048 KB physical id : 0 siblings : 8 core id : 0 cpu cores : 4 apicid : 16 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core cpb npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold bmi1 bogomips : 4987.26 TLB size : 1536 4K pages clflush size : 64 cache_alignment : 64 address sizes : 48 bits physical, 48 bits virtual power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro steps: 1.boot guest with -cpu Opteron_G1,-nx,+sse4a,enforce..(sse4a is the flag on Opteron_G3 cpu model) /usr/libexec/qemu-kvm -M rhel6.4.0 -cpu Opteron_G1,-nx,+sse4a...... 2.use x86info to check the cpu flag results:QEMU runs and not prompt any error,check in guest ,the flag 'sse4a' expose to guest. addinfo: but boot with '-cpu Opteron_G2' : # /usr/libexec/qemu-kvm -M rhel6.4.0 -cpu Opteron_G2,-nx,+sse4a,check,enforce warning: host cpuid 8000_0001:ecx flag restricted to guest 'svm' [0x00000004] Unable to support requested x86 CPU definition