RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 814426 - "rdtscp" flag defined on SandyBridge and Opteron models, but not supported by the kernel
Summary: "rdtscp" flag defined on SandyBridge and Opteron models, but not supported by...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Eduardo Habkost
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 833152
Blocks: 692374 833129 841379 1004299
TreeView+ depends on / blocked
 
Reported: 2012-04-19 20:36 UTC by Eduardo Habkost
Modified: 2014-06-18 12:22 UTC (History)
15 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.310.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 813132
: 1004299 (view as bug list)
Environment:
Last Closed: 2013-02-21 07:34:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0527 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2013-02-20 21:51:08 UTC

Description Eduardo Habkost 2012-04-19 20:36:16 UTC
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:

Comment 2 FuXiangChun 2012-10-24 03:45:20 UTC
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.

Comment 3 Eduardo Habkost 2012-10-24 03:54:21 UTC
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.

Comment 4 FuXiangChun 2012-10-24 09:09:07 UTC
(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?

Comment 5 Eduardo Habkost 2012-10-24 14:18:46 UTC
(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.

Comment 6 FuXiangChun 2012-11-06 03:30:59 UTC
according to testing result in comment 2 and comment 5, this bug is fixed.

Comment 9 errata-xmlrpc 2013-02-21 07:34:06 UTC
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


Note You need to log in before you can comment on or make changes to this bug.