All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: kvm@vger.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)	[thread overview]
Message-ID: <bug-45931-28872@https.bugzilla.kernel.org/> (raw)

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 <avi@redhat.com>
---
 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.

             reply	other threads:[~2012-08-14  6:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14  6:40 bugzilla-daemon [this message]
2013-02-11 12:28 ` [Bug 45931] Nested Virt: VMX can't be initialized in L1 Xen ("Xen on KVM") bugzilla-daemon
2013-02-11 15:10 ` bugzilla-daemon
2014-05-20  7:33 ` bugzilla-daemon
2014-05-20 11:02 ` bugzilla-daemon
2015-03-17  3:53 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-45931-28872@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.