Bug 1005695 - QEMU should hide CPUID.0Dh values that it does not support
QEMU should hide CPUID.0Dh values that it does not support
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Paolo Bonzini
Virtualization Bugs
:
Depends On: 1007897
Blocks: 1007899
  Show dependency treegraph
 
Reported: 2013-09-09 04:25 EDT by Paolo Bonzini
Modified: 2014-06-17 23:36 EDT (History)
8 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-15.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1007897 1007899 (view as bug list)
Environment:
Last Closed: 2014-06-13 09:19:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paolo Bonzini 2013-09-09 04:25:50 EDT
CPUID.0Dh reports in EAX/ECX/EDX the size of the supported save areas.  KVM guests should not be presented more information than that available in the chosen CPU model.

This is important to run QEMU on hosts that support AVX-512 or MPX.
Comment 2 Miroslav Rezanina 2013-11-07 03:23:18 EST
Fix included in qemu-kvm-1.5.3-15.el7
Comment 4 FuXiangChun 2013-12-25 01:05:41 EST
Paolo,
QE want to verify this bug, but do not know how to check register's value inside guest. could you tell me to check which register's value?  e.g

eax in: 0x00000000, eax = 00000005 ebx = 68747541 ecx = 444d4163 edx = 69746e65
eax in: 0x00000001, eax = 00000f61 ebx = 00040800 ecx = 80002001 edx = 178bfbfd
eax in: 0x00000002, eax = 00000001 ebx = 00000000 ecx = 00000000 edx = 002c307d
eax in: 0x00000003, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x00000004, eax = 04000121 ebx = 01c0003f ecx = 0000003f edx = 00000001
eax in: 0x00000005, eax = 00000000 ebx = 00000000 ecx = 00000003 edx = 00000000

eax in: 0x80000000, eax = 80000008 ebx = 68747541 ecx = 444d4163 edx = 69746e65
eax in: 0x80000001, eax = 00000f61 ebx = 00000000 ecx = 00000007 edx = 2193fbfd
eax in: 0x80000002, eax = 20444d41 ebx = 6574704f ecx = 206e6f72 edx = 78783232
eax in: 0x80000003, eax = 65472820 ebx = 2032206e ecx = 73616c43 edx = 704f2073
eax in: 0x80000004, eax = 6f726574 ebx = 0000296e ecx = 00000000 edx = 00000000
eax in: 0x80000005, eax = 01ff01ff ebx = 01ff01ff ecx = 40020140 edx = 40020140
eax in: 0x80000006, eax = 00000000 ebx = 42004200 ecx = 02008140 edx = 00000000
eax in: 0x80000007, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x80000008, eax = 00003028 ebx = 00000000 ecx = 00000003 edx = 00000000
Comment 5 juzhang 2014-01-13 02:00:10 EST
Hi Paolo,

Could you have a look comment4 and add your comment?

Best Regards,
Junyi
Comment 6 Paolo Bonzini 2014-01-13 07:11:34 EST
Sorry for the delay Junyi and Fu, I was on PTO.  You have to run on Sandy Bridge or newer, and look at "eax in: 0x0000000d".

Try with "-cpu SandyBridge" and "-cpu SandyBridge,-avx", and you should see different output in that line.
Comment 7 juzhang 2014-02-07 19:13:46 EST
Thanks Paolo.

Hi Xiangchun,

Could you verify this bz according to comment6?

Best Regards,
Junyi
Comment 8 FuXiangChun 2014-02-07 21:58:25 EST
(In reply to Paolo Bonzini from comment #6)
> Sorry for the delay Junyi and Fu, I was on PTO.  You have to run on Sandy
> Bridge or newer, and look at "eax in: 0x0000000d".
> 
> Try with "-cpu SandyBridge" and "-cpu SandyBridge,-avx", and you should see
> different output in that line.

Verify this bug with qemu-kvm-1.5.3-45.el7.x86_64 and Haswell host.

Scenaro-1
1.1 Boot RHEL7.0 guest() with -cpu SandyBridge. 
1.2 check register value inside guest via x86info tool
result:
eax in: 0x0000000d, eax = 00000007 ebx = 00000340 ecx = 00000340 edx = 00000000

Scenaro-2
2.1 Boot RHEL7.0 guest with -cpu SandyBridge,-axv
2.2 check register value inside guest via x86info tool
result:
eax in: 0x0000000d, eax = 00000003 ebx = 00000240 ecx = 00000240 edx = 00000000

Paolo,
According to comment 6, QE get register's values above. Base on this result. Is this bug fixed?
Comment 9 FuXiangChun 2014-02-08 03:46:47 EST
Additional, Tested qemu-kvm-1.5.3-15.el7.x86_64(unfix version)
Boot RHEL7.0 guest with -cpu SandyBridge/-cpu SandyBridge,-axv, register's values is no change. always is this below.
eax in: 0x0000000d, eax = 00000007 ebx = 00000340 ecx = 00000340 edx = 00000000
Comment 10 FuXiangChun 2014-02-08 03:48:44 EST
Ignore comment 9. 

correct comment9.
Tested qemu-kvm-1.5.3-14.el7.x86_64(unfix version)
Boot RHEL7.0 guest with -cpu SandyBridge/-cpu SandyBridge,-axv, register's values is no change. always is this below.
eax in: 0x0000000d, eax = 00000007 ebx = 00000340 ecx = 00000340 edx = 00000000
Comment 11 Paolo Bonzini 2014-02-13 18:48:50 EST
Yes, the fix is verified.
Comment 13 Ludek Smid 2014-06-13 09:19:49 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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