From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@bugzilla.kernel.org
Subject: [Bug 45931] New: Nested Virt: VMX can't be initialized in L1 Xen
("Xen on KVM")
Date: Tue, 14 Aug 2012 06:40:10 +0000 (UTC)
Message-ID:
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
To: kvm@vger.kernel.org
Return-path:
Received: from mail.kernel.org ([198.145.19.201]:50118 "EHLO mail.kernel.org"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S1751131Ab2HNGkT (ORCPT );
Tue, 14 Aug 2012 02:40:19 -0400
Received: from mail.kernel.org (localhost [127.0.0.1])
by mail.kernel.org (Postfix) with ESMTP id AEFB9201F1
for ; Tue, 14 Aug 2012 06:40:17 +0000 (UTC)
Received: from bugzilla.kernel.org (unknown [198.145.19.217])
by mail.kernel.org (Postfix) with ESMTP id D530F201E3
for ; Tue, 14 Aug 2012 06:40:16 +0000 (UTC)
Sender: kvm-owner@vger.kernel.org
List-ID:
https://bugzilla.kernel.org/show_bug.cgi?id=45931
Summary: Nested Virt: VMX can't be initialized in L1 Xen ("Xen
on KVM")
Product: Virtualization
Version: unspecified
Kernel Version: 3.6-RC1
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: kvm
AssignedTo: virtualization_kvm@kernel-bugs.osdl.org
ReportedBy: yongjie.ren@intel.com
CC: avi@redhat.com
Regression: No
Created an attachment (id=77661)
--> (https://bugzilla.kernel.org/attachment.cgi?id=77661)
xl-dmesg-in-L1-Xen.log
Hi folks,
I did some basic testing on nested virtualization on Intel x86-64 platform.
Will KVM support Xen as L1 guest in nested virtualization ?
When I tried "Xen on KVM" mode, I found VMX can't be initialized in L1 Xen
hypervisor.
I tried both "-cpu host" and "-cpu qemu64,+vmx" parameters in qemu-kvm command
line.
-------some log in 'xl dmesg' command line in L1 Xen ---
(XEN) VMX: CPU0 has insufficent CPU-Based Exec Control (b299868c but requires
min 2299968c)
(XEN) VMX: CPU0 has insufficent VMExit Control (00000200 but requires min
00008200)
(XEN) VMX: failed to initialise.
------more details in the attached "xl-dmesg-L1.log"----
In Xen source code, I found the following related to the mentioned error.
"xen-unstable.hg/xen/include/asm-x86/hvm/vmx/vmcs.h"
#define CPU_BASED_RDTSC_EXITING 0x00001000
#define VM_EXIT_ACK_INTR_ON_EXIT 0x00008000
----
Avi confirmed there're two issues, and fixed 1st one (RDTSC) by the following
patch.
All processors that support VMX have that feature, and guests (Xen) depend on
it. As we already implement it, advertize it to the guest.
Signed-off-by: Avi Kivity
---
arch/x86/kvm/vmx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index cc8ad98..8092f25 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1990,7 +1990,7 @@ static __init void nested_vmx_setup_ctls_msrs(void)
#endif
CPU_BASED_MOV_DR_EXITING | CPU_BASED_UNCOND_IO_EXITING |
CPU_BASED_USE_IO_BITMAPS | CPU_BASED_MONITOR_EXITING |
- CPU_BASED_RDPMC_EXITING |
+ CPU_BASED_RDPMC_EXITING | CPU_BASED_RDTSC_EXITING |
CPU_BASED_ACTIVATE_SECONDARY_CONTROLS;
/*
* We can allow some features even when not supported by the
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.