Bug 664363 - the flag not supported on host can be exported to guest
Summary: the flag not supported on host can be exported to guest
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Eduardo Habkost
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 664357 (view as bug list)
Depends On:
Blocks: Rhel5KvmTier2
TreeView+ depends on / blocked
 
Reported: 2010-12-20 05:27 UTC by Suqin Huang
Modified: 2011-07-29 20:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-29 20:35:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Suqin Huang 2010-12-20 05:27:06 UTC
Description of problem:
boot guest with +sse4a on intel host, sse4a is displayed on guest cpuinfo

Version-Release number of selected component (if applicable):
kvm-83-223.el5

How reproducible:
100%

Steps to Reproduce:
1. usr/libexec/qemu-kvm -drive file=/images/RHEL-Server-6.0-32.qcow2,index=0,if=ide,media=disk,cache=none,format=qcow2 -net nic,vlan=0,model=rtl8139,macaddr=00:1a:20:68:80:e6 -net tap,vlan=0,script=/scripts/qemu-ifup-switch,downscript=no -m 2048 -smp 2,cores=1,threads=1,sockets=2 -cpu qemu64,+sse2,+sse4a -vnc :1 -rtc-td-hack -M rhel5.6.0 -usbdevice tablet -no-kvm-pit-reinjection -boot c -monitor stdio
2.
3.
  
Actual results:
sse4a is exported to guest

Expected results:


Additional info:
1. host
kernel: 2.6.18-237.el5

cpuinfo:
processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 26
model name	: Intel(R) Core(TM) i7 CPU         920  @ 2.67GHz
stepping	: 4
cpu MHz		: 1600.000
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx rdtscp lm constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm


2. guest

kernel: 2.6.32-71.el6.i686

cpuinfo:
processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 6
model name	: QEMU Virtual CPU version 0.9.1
stepping	: 3
cpu MHz		: 2660.086
cache size	: 32 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 4
wp		: yes
flags		: fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm unfair_spinlock pni hypervisor sse4a

x86info:

[root@dhcp-66-83-82 x86info-1.27]# ./x86info 
x86info v1.27.  Dave Jones 2001-2010
Feedback to <davej>.

Found 2 CPUs, but found 16d CPUs in MPTable.
--------------------------------------------------------------------------
CPU #1
EFamily: 0 EModel: 0 Family: 6 Model: 6 Stepping: 3
CPU Model: Celeron / Mobile Pentium II
Type: 0 (Original OEM)	Brand: 0 (Unsupported)
--------------------------------------------------------------------------
CPU #2
EFamily: 0 EModel: 0 Family: 6 Model: 6 Stepping: 3
CPU Model: Celeron / Mobile Pentium II
Type: 0 (Original OEM)	Brand: 0 (Unsupported)
--------------------------------------------------------------------------
Summary:
Total processor threads: 2
This system has 1 dual-core processor running at an estimated 2.65GHz

Comment 1 Suqin Huang 2010-12-22 07:22:34 UTC
[root@dhcp-66-83-21 x86info-1.27]# ./x86info -a -f
x86info v1.27.  Dave Jones 2001-2010
Feedback to <davej>.

Found 2 CPUs, but found 16d CPUs in MPTable.
MP Table:
#	APIC ID	Version	State		Family	Model	Step	Flags
#	 0	 0x11	 BSP, usable	 6	 0	 0	 0x0201
#	 1	 0x11	 AP, usable	 6	 0	 0	 0x0201
#	 2	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	 3	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	 4	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	 5	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	 6	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	 7	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	 8	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	 9	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	10	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	11	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	12	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	13	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	14	 0x11	 AP, unusable	 6	 0	 0	 0x0201
#	15	 0x11	 AP, unusable	 6	 0	 0	 0x0201

--------------------------------------------------------------------------
CPU #1
EFamily: 0 EModel: 0 Family: 6 Model: 6 Stepping: 3
CPU Model: Celeron / Mobile Pentium II
Type: 0 (Original OEM)	Brand: 0 (Unsupported)

Number of reporting banks : 0

Erk, MCG_CTL not present! :0000000000000000:


eax in: 0x00000000, eax = 00000004 ebx = 756e6547 ecx = 6c65746e edx = 49656e69
eax in: 0x00000001, eax = 00000663 ebx = 00000800 ecx = 80000001 edx = 078bfbfd
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 = 00000121 ebx = 01c0003f ecx = 0000003f edx = 00000001

eax in: 0x80000000, eax = 8000000a ebx = 68747541 ecx = 444d4163 edx = 69746e65
eax in: 0x80000001, eax = 078bfbfd ebx = 00000000 ecx = 00000040 edx = 2191abfd
eax in: 0x80000002, eax = 554d4551 ebx = 72695620 ecx = 6c617574 edx = 55504320
eax in: 0x80000003, eax = 72657620 ebx = 6e6f6973 ecx = 392e3020 edx = 0000312e
eax in: 0x80000004, eax = 00000000 ebx = 00000000 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 = 00000000 edx = 00000000
eax in: 0x80000009, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x8000000a, eax = 00000001 ebx = 00000010 ecx = 00000000 edx = 00000000

Cache info
 L1 Instruction cache: 32KB, 8-way associative. 64 byte line size.
 L1 Data cache: 32KB, 8-way associative. 64 byte line size.
 L2 cache: 2MB, 8-way associative. 64 byte line size.
TLB info
Feature flags:
 fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflsh mmx fxsr sse sse2 sse3 [1:ecx:31]
Extended feature flags:
 [80000001:edx:0] [80000001:edx:2] [80000001:edx:3] [80000001:edx:4] [80000001:edx:5] [80000001:edx:6] [80000001:edx:7] [80000001:edx:8] [80000001:edx:9] SYSCALL [80000001:edx:13] [80000001:edx:15] [80000001:edx:16] xd [80000001:edx:23] [80000001:edx:24] em64t [80000001:ecx:6]
Connector type: Socket 370  (370 Pin PGA)

MTRR registers:
MTRRcap (0xfe): 0x0000000000000508
MTRRphysBase0 (0x200): 0x00000000c0000000
MTRRphysMask0 (0x201): 0xffffffffe0000800
MTRRphysBase1 (0x202): 0x0000000000000000
MTRRphysMask1 (0x203): 0x0000000000000000
MTRRphysBase2 (0x204): 0x0000000000000000
MTRRphysMask2 (0x205): 0x0000000000000000
MTRRphysBase3 (0x206): 0x0000000000000000
MTRRphysMask3 (0x207): 0x0000000000000000
MTRRphysBase4 (0x208): 0x0000000000000000
MTRRphysMask4 (0x209): 0x0000000000000000
MTRRphysBase5 (0x20a): 0x0000000000000000
MTRRphysMask5 (0x20b): 0x0000000000000000
MTRRphysBase6 (0x20c): 0x0000000000000000
MTRRphysMask6 (0x20d): 0x0000000000000000
MTRRphysBase7 (0x20e): 0x0000000000000000
MTRRphysMask7 (0x20f): 0x0000000000000000
MTRRfix64K_00000 (0x250): 0x0606060606060606
MTRRfix16K_80000 (0x258): 0x0606060606060606
MTRRfix16K_A0000 (0x259): 0x0000000000000000
MTRRfix4K_C8000 (0x269): 0x0000000000000000
MTRRfix4K_D0000 0x26a: 0x0000000000000000
MTRRfix4K_D8000 0x26b: 0x0000000000000000
MTRRfix4K_E0000 0x26c: 0x0000000000000000
MTRRfix4K_E8000 0x26d: 0x0000000000000000
MTRRfix4K_F0000 0x26e: 0x0000000000000000
MTRRfix4K_F8000 0x26f: 0x0000000000000000
MTRRdefType (0x2ff): 0x0000000000000c06


2.65GHz processor (estimate).

--------------------------------------------------------------------------

Comment 2 john cooper 2011-01-13 20:07:19 UTC
(In reply to comment #1)
> [root@dhcp-66-83-21 x86info-1.27]# ./x86info -a -f
    :
> eax in: 0x00000000, eax = 00000004 ebx = 756e6547 ecx = 6c65746e edx = 49656e69
> eax in: 0x00000001, eax = 00000663 ebx = 00000800 ecx = 80000001 edx = 078bfbfd
> 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 = 00000121 ebx = 01c0003f ecx = 0000003f edx = 00000001
> 
> eax in: 0x80000000, eax = 8000000a ebx = 68747541 ecx = 444d4163 edx = 69746e65
> eax in: 0x80000001, eax = 078bfbfd ebx = 00000000 ecx = 00000040 edx = 2191abfd

cpuid fn 8000_0001: ecx & 1 << 6 is indeed sse4a as indicated above.
Although this is being explicitly requested on the command line
in a case when it clearly doesn't exist on the host, I'm at a loss to
explain how this is slipping through qemu's host cpuid check.  This
may be a non-problem as libvirt will never request this of qemu as
it performs external host cpuid laundering.  Still rather than
sweep it under the rug I'm moving it to 5.8 unless otherwise vetoed.

Comment 3 john cooper 2011-01-13 20:20:12 UTC
*** Bug 664357 has been marked as a duplicate of this bug. ***

Comment 4 john cooper 2011-01-17 13:18:17 UTC
indicate "Triaged", fix botched reported version.

Comment 5 john cooper 2011-03-25 14:40:46 UTC
Correct move to 5.8 per comment #2 above.

Comment 7 Eduardo Habkost 2011-07-29 20:35:35 UTC
Closing based on comment #2: can be fixed by simply not trying to use the flag on the command-line.


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