All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 02/12] Nested Virtualization: data structure
@ 2010-12-20 16:04 Christoph Egger
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Egger @ 2010-12-20 16:04 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 264 bytes --]


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_nh02_structdata.diff --]
[-- Type: text/x-diff, Size: 2074 bytes --]

# HG changeset patch
# User cegger
# Date 1292839429 -3600
Data structures for Nested Virtualization

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

diff -r 75c0e7a20dea -r 0797c3ecd8fd xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -52,7 +52,8 @@ enum hvm_intblk {
     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 75c0e7a20dea -r 0797c3ecd8fd xen/include/asm-x86/hvm/vcpu.h
--- a/xen/include/asm-x86/hvm/vcpu.h
+++ b/xen/include/asm-x86/hvm/vcpu.h
@@ -36,6 +36,33 @@ enum hvm_io_state {
     HVMIO_completed
 };
 
+struct nestedvcpu {
+    bool_t nv_guestmode; /* vcpu in guestmode? */
+    void *nv_vmcx; /* l1 guest virtual VMCB/VMCS */
+
+    /* address of l1 guest virtual VMCB/VMCS, needed for VMEXIT */
+    uint64_t nv_vmcxaddr;
+
+    /* 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 +108,8 @@ struct hvm_vcpu {
 
     struct tasklet      assert_evtchn_irq_tasklet;
 
+    struct nestedvcpu   nvcpu;
+
     struct mtrr_state   mtrr;
     u64                 pat_cr;
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH 02/12] Nested Virtualization: data structure
  2011-03-09 14:22 Christoph Egger
@ 2011-03-28 14:01 ` Dong, Eddie
  0 siblings, 0 replies; 3+ messages in thread
From: Dong, Eddie @ 2011-03-28 14:01 UTC (permalink / raw)
  To: Christoph Egger, xen-devel; +Cc: Dong, Eddie

Acked by eddie.dong@intel.com

-----Original Message-----
From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Christoph Egger
Sent: Wednesday, March 09, 2011 10:23 PM
To: xen-devel@lists.xensource.com
Subject: [Xen-devel] [PATCH 02/12] Nested Virtualization: data structure


--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 02/12] Nested Virtualization: data structure
@ 2011-03-09 14:22 Christoph Egger
  2011-03-28 14:01 ` Dong, Eddie
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Egger @ 2011-03-09 14:22 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 264 bytes --]


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_nh02_structdata.diff --]
[-- Type: text/x-diff, Size: 2348 bytes --]

# HG changeset patch
# User cegger
# Date 1298892101 -3600
Data structures for Nested Virtualization

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

diff -r 879b3d37143a -r 254911296b47 xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -52,7 +52,8 @@ enum hvm_intblk {
     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 879b3d37143a -r 254911296b47 xen/include/asm-x86/hvm/vcpu.h
--- a/xen/include/asm-x86/hvm/vcpu.h
+++ b/xen/include/asm-x86/hvm/vcpu.h
@@ -36,6 +36,38 @@ enum hvm_io_state {
     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 hvm_vcpu {
 
     struct tasklet      assert_evtchn_irq_tasklet;
 
+    struct nestedvcpu   nvcpu;
+
     struct mtrr_state   mtrr;
     u64                 pat_cr;
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-28 14:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-20 16:04 [PATCH 02/12] Nested Virtualization: data structure Christoph Egger
2011-03-09 14:22 Christoph Egger
2011-03-28 14:01 ` Dong, Eddie

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.