Bug 892240

Summary: KVM: entry failed, hardware error 0x7 for nested kvm guest
Product: [Fedora] Fedora Reporter: Mark Wu <wudxw>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: amit.shah, berrange, cfergeau, clalancette, crobinso, dwmw2, ehabkost, extras-orphan, gfa, itamar, jzupka, markmc, pbonzini, pkliczew, quintela, rjones, scottt.tw, virt-maint
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1016748 (view as bug list) Environment:
Last Closed: 2013-04-02 12:20:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
host cpuid none

Description Mark Wu 2013-01-06 04:04:14 UTC
Created attachment 673241 [details]
host cpuid

Description of problem:
Run the following qemu command,
qemu-kvm -cpu Westmere -enable-kvm -vnc 0:0 -cdrom Fedora-17-x86_64-Live-Desktop.iso 

and got the following error:

KVM: entry failed, hardware error 0x7
RAX=000000000000000f RBX=000000000000038f RCX=000000000000038f RDX=0000000000000000
RSI=000000000000000f RDI=000000000000038f RBP=ffff880006d61af0 RSP=ffff880006d61af0
R8 =0000000000000000 R9 =0000000000000000 R10=0000000000000003 R11=0000000000000000
R12=ffffffff816030f0 R13=0000000000000000 R14=ffff88000700c760 R15=0000000000000001
RIP=ffffffff8103cd8a RFL=00000046 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0000 0000000000000000 000fffff 00000000
CS =0010 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA]
SS =0018 0000000000000000 ffffffff 00c09300 DPL=0 DS   [-WA]
DS =0000 0000000000000000 000fffff 00000000
FS =0000 0000000000000000 000fffff 00000000
GS =0000 ffff880007000000 000fffff 00000000
LDT=0000 0000000000000000 000fffff 00000000
TR =0040 ffff880007011100 00002087 00008b00 DPL=0 TSS64-busy
GDT=     ffff880007004000 0000007f
IDT=     ffffffff81bdd000 00000fff
CR0=8005003b CR2=00000000ffffffff CR3=0000000001a05000 CR4=000006f0
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000d01
Code=89 d0 5d c3 66 0f 1f 44 00 00 55 89 f0 89 f9 48 89 e5 0f 30 <31> c0 5d c3 66 90 55 89 f9 48 89 e5 0f 33 89 c0 48 c1 e2 20 48 09 c2 48 89 d0 5d c3 66 2e

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

After changing the cpu model to Nehalem, Penryn or Conroe, this problem disappears.



Version-Release number of selected component (if applicable):
qemu: qemu-kvm-1.2.0-25.fc17
kernel: 3.6.7-4.fc17.x86_64

How reproducible:
100%

Steps to Reproduce:
1. qemu-kvm -cpu Westmere -enable-kvm -vnc 0:0 -cdrom Fedora-17-x86_64-Live-Desktop.iso, wait for 1 min or so,
and then you could see the message of 'KVM: entry failed, hardware error 0x7'
  
Actual results:


Expected results:


Additional info:

1. L1 guest's cpuinfo

cat /proc/cpuinfo 
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 44
model name	: Westmere E56xx/L56xx/X56xx (Nehalem-C)
stepping	: 1
microcode	: 0x1
cpu MHz		: 2666.760
cache size	: 4096 KB
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
wp		: yes
flags		: fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm constant_tsc arch_perfmon rep_good nopl pni vmx ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor lahf_lm
bogomips	: 5333.52
clflush size	: 64
cache_alignment	: 64
address sizes	: 40 bits physical, 48 bits virtual
power management:

Host's cpuinfo:
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 44
model name	: Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
stepping	: 2
microcode	: 0x15
cpu MHz		: 1596.000
cache size	: 12288 KB
physical id	: 0
siblings	: 12
core id		: 0
cpu cores	: 6
apicid		: 0
initial apicid	: 0
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 pbe syscall nx pdpe1gb rdtscp lm constant_
tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt 
aes lahf_lm arat epb dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips	: 5333.52
clflush size	: 64
cache_alignment	: 64
address sizes	: 40 bits physical, 48 bits virtual

Comment 1 Jiri Zupka 2013-01-24 16:13:12 UTC
I have some problem on
host:
   kernel 3.7.2-204.fc18.x86_64
   qemu-kvm 1.2.2
   kvm module nested virtualization = Y
   cpu sandybridge 
guest L1: 
   cpuflags core2duo,+vmx
   3.7.2-204.fc18.x86_64
   qemu-kvm 1.0.1

   module kvm_intel loaded.
   
guest L2:
   will not start

It works before.

Comment 2 Cole Robinson 2013-04-01 19:41:18 UTC
One report is on kernel 3.6 and using qemu-kvm-1.2 fro F18, one on kernel 3.7 using F17 qemu-kvm, but F17 + F18 should be on kernel 3.8 now.

If someone can reproduce with latest F17 or F18 bits, please reopen and we can go from there.

Comment 3 Jiri Zupka 2013-04-02 11:52:24 UTC
Same result in:
host:
   kernel 3.8.4-202.fc18.x86_64
   qemu-kvm 1.2.2
   kvm module nested virtualization = Y
   cpu sandybridge 
guest L1: 
   cpuflags core2duo,+vmx
   3.7.2-204.fc18.x86_64
   qemu-kvm 1.0.1

   module kvm_intel loaded.
guest L2:
   starting to boot, but after some second it crash with error described upstairs.

Works with
guest L1: 
   cpuflags qemu64,+vmx
   3.7.2-204.fc18.x86_64
   qemu-kvm 1.0.1

   module kvm_intel loaded.
guest L2:
   starting to boot, OK

Comment 4 Jiri Zupka 2013-04-02 12:20:55 UTC
Works!! result in:
host:
   kernel 3.8.4-202.fc18.x86_64
   qemu-kvm 1.2.2
   kvm module nested virtualization = Y
   cpu sandybridge 
guest L1: 
   cpuflags core2duo,+vmx
   kernel   3.8.4-102.fc17.x86_64
   qemu-kvm 1.0.1

   module kvm_intel loaded.
guest L2:
   boot

Comment 5 Piotr Kliczewski 2013-10-08 15:23:34 UTC
I am having the same issue for following config:

host:
   kernel 3.11.2-201.fc19.x86_64
   qemu-kvm 1.4.2
   kvm module nested virtualization = Y
   cpu sandybridge 
guest L1: 
   cpuflags copied from host config
   kernel   3.11.2-201.fc19.x86_64
   qemu-kvm 1.4.2

   module kvm_intel loaded.
guest L2:
   boot