Hide Forgot
Cloning the bug specifically for the "rdtscp" flag. The flag is defined on the SandyBridge and Opteron CPU models, but not supported by the kernel. "-cpu <model>,check" and "-cpu <model>,enforce" should have detected it, but it didn't. So, we have to: 1) Either remove the flag from the model definitions, or add rdtscp support to the KVM module 2) Make "-cpu <model>,check" actually detect the missing flag (bug 692374) +++ This bug was initially created as a clone of Bug #813132 +++ Description of problem: can find "sep" flag in /usr/libexec/qemu-kvm -cpu ?dump and cann't find it /proc/cpuinof on host. but haven't any warning message when booting guest. BTW, "sep" isn't exposted to guest. "rdtscp" flag is defined in dump and /proc/cpuinfo on host but it isn't exposted to guest. Version-Release number of selected component (if applicable): # uname -r 2.6.32-259.el6.x86_64 #rpm -qa|grep qemu qemu-kvm-0.12.1.2-2.270.el6.x86_64 How reproducible: always Steps to Reproduce: 1./usr/libexec/qemu-kvm -M rhel6.3.0 -cpu SandyBridge --enable-kvm -m 4G -smp 40,sockets=2,cores=10,threads=2,maxcpus=41 -name rhel6.3 -uuid ddcbfb49-3411-1701-3c36-6bdbc00bedbb -rtc base=utc,clock=host,driftfix=slew -boot c -drive file=/mnt/rhel6.3.raw,format=raw,if=none,id=disk0,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=disk0 -device scsi-hd,drive=disk0,scsi-id=0,lun=0,bootindex=1 -netdev tap,id=hostnet1 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=86:12:50:a4:32:72 -spice port=5911,disable-ticketing -vga qxl -device sga -chardev socket,id=serial0,path=/var/test1,server,nowait -device isa-serial,chardev=serial0 -balloon virtio -monitor unix:/tmp/monitor1,server,nowait -monitor stdio 2. find "sep" flag from dump 3. find "rdtscp" flag from dump and cpuinfo on host 4. check above two flags in guest Actual results: 1. can find "sep" from dump, no any warning message when booting guest. 2. can find "rdtscp" from dump and cpuinfo on host,but cann't find it from guest Expected results: qemu should have warning message because "sep" flag isn't defined in host. rdtscp should expose to guest. Additional info:
verify this issue with qemu-kvm-0.12.1.2-2.329.el6.x86_64 and kernel 2.6.32-335.el6.x86_64(host and guest) rdtscp flag is located 0x80000001 EDX[27] Testing result via x86info tool 1.Haswell host: Boot guest with -M rhel6.4.0 -cpu Haswell guest: eax in: 0x80000001, eax = 000306c1 ebx = 00000000 ecx = 00000001 edx = 20100800 host: eax in: 0x80000001, eax = 00000000 ebx = 00000000 ecx = 00000021 edx = 2c100800 2.SandyBridge host Boot guest with -M rhel6.4.0 -cpu SandyBridge guest: eax in: 0x80000001, eax = 000206a1 ebx = 00000000 ecx = 00000001 edx = 20100800 host: eax in: 0x80000001, eax = 00000000 ebx = 00000000 ecx = 00000001 edx = 28100800 Base on testing result above, I think this bug is not fixed.
This is the expected result. We have followed the first approach mentioned on comment #0 -- the rdtscp flag was removed from all CPU models to reflect reality because it is not supported by the RHEL-6 kernel.
(In reply to comment #3) > This is the expected result. We have followed the first approach mentioned > on comment #0 -- the rdtscp flag was removed from all CPU models to reflect > reality because it is not supported by the RHEL-6 kernel. I had a little confused. 1. expected result "rdtscp should expose to guest" in comment #0 2. can find "rdtscp" from cpuinfo on host, indicate rhel6 kernel support this flag(this is my understand). 3. If remove this flag from all CPU models, It should be removed from dump,right?
(In reply to comment #4) > (In reply to comment #3) > > This is the expected result. We have followed the first approach mentioned > > on comment #0 -- the rdtscp flag was removed from all CPU models to reflect > > reality because it is not supported by the RHEL-6 kernel. > > I had a little confused. > > 1. expected result "rdtscp should expose to guest" in comment #0 It should be exposed if it's set on the CPU models. There were two possible solutions: add rdtscp support to the kernel, or remove the flag from the CPU models to reflect what's actually being exposed to guests when using RHEL-6.3 qemu-kvm. We chose the second approach. > 2. can find "rdtscp" from cpuinfo on host, indicate rhel6 kernel support > this flag(this is my understand). No, the KVM kernel code has to support it too, and the RHEL-6 KVM kernel code doesn't support exposing rdtscp to guests. That's what makes the rdtscp flag not appear to the guest (as the flags are filtered according to the host CPU + host kernel capabilities[1]). [1] The filtering should be reported by -cpu check/enforce, and the existing bug on -cpu check/enforce is being tracked at bug 692374. > 3. If remove this flag from all CPU models, It should be removed from > dump,right? It should have been removed from the CPU model dump ("-cpu ?dump"), but -cpu ?dump doesn't exist anymore. The flag removal is only visible by looking at the CPU model definitions in the C code at qemu-kvm/target-i386/cpuid.c.
according to testing result in comment 2 and comment 5, this bug is fixed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0527.html