[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] cpuid problem in upstream qemu with kvm
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] cpuid problem in upstream qemu with kvm |
Date: |
Mon, 14 Dec 2009 21:35:41 +0200 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
Hi!
I have a linux guest where init crashes during boot with invalid opcode error
with kernel 2.6.31, but works fine with kernel 2.6.32.
It also works fine even with 2.6.31 with qemu-kvm.
With Gleb's help, we figured out that the opcode in question is syscall, which
is unsupported by hardware on kvm with intel hosts, and is emulated in software
with intel hosts in 2.6.32 and up. AMD hosts support this natively.
The root cause: by default qemu with kvm enabled reports the following CPU ID:
address@hidden:~$ less /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 2
model name : QEMU Virtual CPU version 0.11.50
stepping : 3
cpu MHz : 2493.679
cache size : 512 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 pat
pse36 clflush mmx fxsr sse sse2 syscall lm up pni
bogomips : 4987.35
clflush size : 64
power management:
Problem is, guest sees syscall+AMD vendor and concludes that it is ok to use
syscall opcode, which results in a crash (or at least, extra VMExits).
I understand from Avi that qemu-kvm solves this problem by reporting
the actual CPU vendor from host, to guest.
--
MST
- [Qemu-devel] cpuid problem in upstream qemu with kvm,
Michael S. Tsirkin <=
- Re: [Qemu-devel] cpuid problem in upstream qemu with kvm, Anthony Liguori, 2009/12/14
- Re: [Qemu-devel] cpuid problem in upstream qemu with kvm, Michael S. Tsirkin, 2009/12/14
- Re: [Qemu-devel] cpuid problem in upstream qemu with kvm, Anthony Liguori, 2009/12/14
- Re: [Qemu-devel] cpuid problem in upstream qemu with kvm, Gleb Natapov, 2009/12/14
- Re: [Qemu-devel] cpuid problem in upstream qemu with kvm, Anthony Liguori, 2009/12/14
- Re: [Qemu-devel] cpuid problem in upstream qemu with kvm, Gleb Natapov, 2009/12/14
- Re: [Qemu-devel] cpuid problem in upstream qemu with kvm, Michael S. Tsirkin, 2009/12/14
- Re: [Qemu-devel] cpuid problem in upstream qemu with kvm, Michael S. Tsirkin, 2009/12/14
- Re: [Qemu-devel] cpuid problem in upstream qemu with kvm, Anthony Liguori, 2009/12/14
- Re: [Qemu-devel] cpuid problem in upstream qemu with kvm, Michael S. Tsirkin, 2009/12/14