[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug 994378] Re: Nested-virt)L1 (kvm on kvm)guest panic wit
From: |
chao zhou |
Subject: |
[Qemu-devel] [Bug 994378] Re: Nested-virt)L1 (kvm on kvm)guest panic with parameter “-cpu host” in qemu command line. |
Date: |
Fri, 08 Aug 2014 05:14:20 -0000 |
this patch fixed the bug:
commit 338b522ca43cfd32d11a370f4203bcd089c6c877
Author: Kan Liang <address@hidden>
Date: Mon Jul 14 12:25:56 2014 -0700
perf/x86/intel: Protect LBR and extra_regs against KVM lying
With -cpu host, KVM reports LBR and extra_regs support, if the host has
support.
When the guest perf driver tries to access LBR or extra_regs MSR,
it #GPs all MSR accesses,since KVM doesn't handle LBR and extra_regs
support.
So check the related MSRs access right once at initialization time to avoid
the error access at runtime.
For reproducing the issue, please build the kernel with CONFIG_KVM_INTEL = y
(for host kernel).
And CONFIG_PARAVIRT = n and CONFIG_KVM_GUEST = n (for guest kernel).
Start the guest with -cpu host.
Run perf record with --branch-any or --branch-filter in guest to trigger LBR
Run perf stat offcore events (E.g. LLC-loads/LLC-load-misses ...) in guest
to
trigger offcore_rsp #GP
Signed-off-by: Kan Liang <address@hidden>
Signed-off-by: Peter Zijlstra <address@hidden>
Cc: Andi Kleen <address@hidden>
Cc: Arnaldo Carvalho de Melo <address@hidden>
Cc: Linus Torvalds <address@hidden>
Cc: Maria Dimakopoulou <address@hidden>
Cc: Mark Davies <address@hidden>
Cc: Paul Mackerras <address@hidden>
Cc: Stephane Eranian <address@hidden>
Cc: Yan, Zheng <address@hidden>
Link: http://lkml.kernel.org/r/address@hidden
Signed-off-by: Ingo Molnar <address@hidden>
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/994378
Title:
Nested-virt)L1 (kvm on kvm)guest panic with parameter “-cpu host” in
qemu command line.
Status in QEMU:
New
Bug description:
Environment:
------------
Host OS (ia32/ia32e/IA64):ia32e
Guest OS (ia32/ia32e/IA64):ia32e
Guest OS Type (Linux/Windows):Linux
kvm.git Commit:19853301ef3289bda2d5264c1093e74efddaeab9
qemu-kvm Commit:69abebf20280152da8fa7c418a819ae51e862231
Host Kernel Version:3.4.0-rc3
Hardware:WSM-EP, Romley-EP
Bug detailed description:
--------------------------
(KVM on KVM) L1 guest panic when starting the L1 guest with “-cpu host”
parameter in qemu command line.
Note:
1. when creating guest with “-cpu qemu64,+vmx”, L1 guest and L2 guest can boot
up.
2. This should be a qemu-kvm bug. using '-cpu host' parameter, the following
is the result.
Kvm + qemu-kvm =result
19853301 + 69abebf2 = bad
19853301 + 44755ea3 = good
3. when booting up the guest with the good commit of 19853301 + 44755ea3,
you can see some
error info, but nested virt works fine. (L1 and L2 guest can boot up.)
“error: feature "i64" not available in set
error: bad option value [extfeature_edx = i64 xd syscall]”
some logs
address@hidden x86_64-softmmu]# ./qemu-system-x86_64 -m 2048 -net
nic,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -hda /root/nested-kvm.qcow
-cpu host
error: feature "i64" not available in set
error: bad option value [extfeature_edx = i64 xd syscall]
error: feature "i64" not available in set
error: bad option value [extfeature_edx = i64 xd syscall]
error: feature "i64" not available in set
error: bad option value [extfeature_edx = i64 syscall xd]
error: feature "i64" not available in set
error: bad option value [extfeature_edx = i64 syscall xd]
VNC server running on `::1:5900'
Reproduce steps:
----------------
1.start up a host with kvm (commit: 19853301)
2.rmmod kvm_intel
3.modprobe kvm_intel nested=1
4.qemu-system-x86_64 -m 2048 -hda L1-kvm.img -cpu host
Current result:
----------------
L1 guest panic.
Expected result:
----------------
L1 guest and L2 guest boot up correctly.
Basic root-causing log:
----------------------
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/994378/+subscriptions
- [Qemu-devel] [Bug 994378] Re: Nested-virt)L1 (kvm on kvm)guest panic with parameter “-cpu host” in qemu command line.,
chao zhou <=