[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Data structures for Nested Virtualization



# HG changeset patch
# User cegger
# Date 1298892101 -3600
# Node ID 029f0a5301f05afc55c85d91a4ce21e35b911772
# Parent  69e932728d75813b80ab51f981e92798d6ce8b97
Data structures for Nested Virtualization

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Acked-by: Eddie Dong <eddie.dong@xxxxxxxxx>
Acked-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Committed-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---


diff -r 69e932728d75 -r 029f0a5301f0 xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h     Mon Feb 28 12:21:38 2011 +0100
+++ b/xen/include/asm-x86/hvm/hvm.h     Mon Feb 28 12:21:41 2011 +0100
@@ -52,7 +52,8 @@
     hvm_intblk_shadow,    /* MOV-SS or STI shadow */
     hvm_intblk_rflags_ie, /* RFLAGS.IE == 0 */
     hvm_intblk_tpr,       /* LAPIC TPR too high */
-    hvm_intblk_nmi_iret   /* NMI blocked until IRET */
+    hvm_intblk_nmi_iret,  /* NMI blocked until IRET */
+    hvm_intblk_arch,      /* SVM/VMX specific reason */
 };
 
 /* These happen to be the same as the VMX interrupt shadow definitions. */
diff -r 69e932728d75 -r 029f0a5301f0 xen/include/asm-x86/hvm/vcpu.h
--- a/xen/include/asm-x86/hvm/vcpu.h    Mon Feb 28 12:21:38 2011 +0100
+++ b/xen/include/asm-x86/hvm/vcpu.h    Mon Feb 28 12:21:41 2011 +0100
@@ -36,6 +36,38 @@
     HVMIO_completed
 };
 
+#define VMCX_EADDR    (~0ULL)
+
+struct nestedvcpu {
+    bool_t nv_guestmode; /* vcpu in guestmode? */
+    void *nv_vvmcx; /* l1 guest virtual VMCB/VMCS */
+    void *nv_n1vmcx; /* VMCB/VMCS used to run l1 guest */
+    void *nv_n2vmcx; /* shadow VMCB/VMCS used to run l2 guest */
+
+    uint64_t nv_vvmcxaddr; /* l1 guest physical address of nv_vvmcx */
+    uint64_t nv_n1vmcx_pa; /* host physical address of nv_n1vmcx */
+    uint64_t nv_n2vmcx_pa; /* host physical address of nv_n2vmcx */
+
+    /* SVM/VMX arch specific */
+    union {
+    } u;
+
+    bool_t nv_flushp2m; /* True, when p2m table must be flushed */
+    struct p2m_domain *nv_p2m; /* used p2m table for this vcpu */
+
+    bool_t nv_vmentry_pending;
+    bool_t nv_vmexit_pending;
+    bool_t nv_vmswitch_in_progress; /* true during vmentry/vmexit emulation */
+
+    /* Does l1 guest intercept io ports 0x80 and/or 0xED ?
+     * Useful to optimize io permission handling.
+     */
+    bool_t nv_ioport80;
+    bool_t nv_ioportED;
+};
+
+#define vcpu_nestedhvm(v) ((v)->arch.hvm_vcpu.nvcpu)
+
 struct hvm_vcpu {
     /* Guest control-register and EFER values, just as the guest sees them. */
     unsigned long       guest_cr[5];
@@ -81,6 +113,8 @@
 
     struct tasklet      assert_evtchn_irq_tasklet;
 
+    struct nestedvcpu   nvcpu;
+
     struct mtrr_state   mtrr;
     u64                 pat_cr;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.