Bug 692092

Summary: can not export aes flag to guest
Product: Red Hat Enterprise Linux 5 Reporter: Suqin Huang <shuang>
Component: kvmAssignee: john cooper <john.cooper>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 5.7CC: gcosta, juzhang, michen, mkenneth, nobody, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-12 04:14:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 580948    

Description Suqin Huang 2011-03-30 12:07:05 UTC
Description of problem:
boot guest with -cpu qemu64,+aes on westmere host, aes is not exported to guest

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

How reproducible:
100%

Steps to Reproduce:
1. cmd:
/usr/libexec/qemu-kvm -monitor stdio -serial unix:'/tmp/serial-20110330-211451-mKOB',server,nowait -drive file='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/images/RHEL-Server-6.0-64-virtio.qcow2',index=0,if=virtio,media=disk,cache=none,boot=on,format=qcow2 -net nic,vlan=0,model=virtio,macaddr='9a:fa:69:15:0e:06' -net tap,vlan=0,ifname='t0-211451-mKOB',script='/usr/local/staf/test/RHEV/kvm-new/autotest/client/tests/kvm/scripts/qemu-ifup-switch',downscript='no' -m 2048 -smp 2,cores=1,threads=1,sockets=2 -cpu qemu64,+aes -vnc :0 -rtc-td-hack -M rhel5.6.0 -boot c  -usbdevice tablet -no-kvm-pit-reinjection

2.
3.
  
Actual results:


Expected results:


Additional info:

1. guest x86info: (rhel6.0z-64)

Found 2 identical CPUs (but found 16d CPUs in MPTable!)
Family: 6 Model: 6 Stepping: 3
Type: 0 (Original OEM)
CPU Model (x86info's best guess): Celeron / Mobile Pentium II

Performance MSRs:
  MSR_IA32_PERF_STATUS: 0x400000003e8
  MSR_IA32_MISC_ENABLE: 0x0 [Enabled: ]

Machine check MSRs:
Number of reporting banks : 0


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 = 00000000 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
Long NOPs supported: yes

Connector type: Socket 370  (370 Pin PGA

2. host
1). kernel: 2.6.18-238.el5
2). host x86info:
eax in: 0x00000000, eax = 0000000b ebx = 756e6547 ecx = 6c65746e edx = 49656e69
eax in: 0x00000001, eax = 000206c2 ebx = 20200800 ecx = 029ee3ff edx = bfebfbff
eax in: 0x00000002, eax = 55035a01 ebx = 00f0b2ff ecx = 00000000 edx = 00ca0000
eax in: 0x00000003, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x00000004, eax = 3c004121 ebx = 01c0003f ecx = 0000003f edx = 00000000
eax in: 0x00000005, eax = 00000040 ebx = 00000040 ecx = 00000003 edx = 00001120
eax in: 0x00000006, eax = 00000007 ebx = 00000002 ecx = 00000001 edx = 00000000
eax in: 0x00000007, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x00000008, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x00000009, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x0000000a, eax = 07300403 ebx = 00000004 ecx = 00000000 edx = 00000603
eax in: 0x0000000b, eax = 00000001 ebx = 00000002 ecx = 00000100 edx = 00000020

eax in: 0x80000000, eax = 80000008 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x80000001, eax = 00000000 ebx = 00000000 ecx = 00000001 edx = 2c100800
eax in: 0x80000002, eax = 65746e49 ebx = 2952286c ecx = 6f655820 edx = 2952286e
eax in: 0x80000003, eax = 55504320 ebx = 20202020 ecx = 20202020 edx = 45202020
eax in: 0x80000004, eax = 30323635 ebx = 20402020 ecx = 30342e32 edx = 007a4847
eax in: 0x80000005, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000000
eax in: 0x80000006, eax = 00000000 ebx = 00000000 ecx = 01006040 edx = 00000000
eax in: 0x80000007, eax = 00000000 ebx = 00000000 ecx = 00000000 edx = 00000100
eax in: 0x80000008, eax = 00003028 ebx = 00000000 ecx = 00000000 edx = 00000000

Cache info
TLB info
 Instruction TLB: 2MB or 4MB pages, fully associative, 7 entries
 Instruction TLB: 4K pages, 4-way associative, 64 entries.
 Data TLB: 4KB or 4MB pages, fully associative, 32 entries.
 Data TLB: 4KB pages, 4-way associative, 64 entries
 Data TLB: 4K pages, 4-way associative, 512 entries.
 64 byte prefetching.
Found unknown cache descriptors: ff 
Feature flags:
 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflsh ds acpi mmx fxsr sse sse2 ss ht tm pbe sse3 pclmuldq dtes64 monitor ds-cpl vmx smx est tm2 ssse3 cx16 xTPR pdcm pcid dca sse4_1 sse4_2 popcnt aes
Extended feature flags:
 SYSCALL xd pdpe1gb rdtscp em64t lahf_lm dts ida arat nonstop_tsc
Long NOPs supported: yes

Comment 1 john cooper 2011-04-06 17:13:10 UTC
Do we represent Westmere as being natively supported in 5.7?

Comment 2 john cooper 2011-04-12 04:14:05 UTC
(In reply to comment #0)

> 2. host
> 1). kernel: 2.6.18-238.el5
> 2). host x86info:
    :
> Feature flags:
>  fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflsh
> ds acpi mmx fxsr sse sse2 ss ht tm pbe sse3 pclmuldq dtes64 monitor ds-cpl vmx
> smx est tm2 ssse3 cx16 xTPR pdcm pcid dca sse4_1 sse4_2 popcnt aes

x86info is reporting aes on the host however 5.x qemu-kvm isn't aware of
this feature flag.  qemu will complain about this request:

    # x86_64-softmmu/qemu-system-x86_64 -hda ../../rhel5.4.img  -vnc :18 -net nic -net user -m 1024 -cpu qemu64,+aes
    CPU feature aes not found

however it will not fail to launch in this situation similar
to the scenario of the user requesting a known feature flag
which isn't present on the host.   This is standard behavior
for 5.x qemu.