Skip to contentSkip to conversation

Nested Virtualization: data structure

PATCH In review Christoph Egger 1 participant 1 message Apr 15, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 7/18 Nested Virtualization: data structure

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

# HG changeset patch
# User cegger
# Date 1271330298 -7200
Data structures for Nested Virtualization

xen/arch/x86/hvm/svm/vmcb.c +0 -3
diff -r 96cbc9586732 -r ae06190eed4a xen/arch/x86/hvm/svm/vmcb.c
@@ -40,9 +40,6 @@
 
 extern int svm_dbg_on;
 
-#define IOPM_SIZE   (12 * 1024)
-#define MSRPM_SIZE  (8  * 1024)
-
 struct vmcb_struct *alloc_vmcb(void) 
 {
     struct vmcb_struct *vmcb;
xen/include/asm-x86/hvm/domain.h +1 -0
diff -r 96cbc9586732 -r ae06190eed4a xen/include/asm-x86/hvm/domain.h
@@ -93,6 +93,7 @@ struct hvm_domain {
     bool_t                 mem_sharing_enabled;
     bool_t                 qemu_mapcache_invalidate;
     bool_t                 is_s3_suspended;
+    bool_t                 nestedhvm_enabled;
 
     union {
         struct vmx_domain vmx;
xen/include/asm-x86/hvm/hvm.h +4 -1
diff -r 96cbc9586732 -r ae06190eed4a xen/include/asm-x86/hvm/hvm.h
@@ -49,7 +49,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_gif,       /* GIF cleared */
 };
 
 /* These happen to be the same as the VMX interrupt shadow definitions. */
@@ -166,6 +167,8 @@ int hvm_girq_dest_2_vcpu_id(struct domai
     (hvm_paging_enabled(v) && ((v)->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PAE))
 #define hvm_nx_enabled(v) \
     (!!((v)->arch.hvm_vcpu.guest_efer & EFER_NX))
+#define hvm_svm_enabled(v) \
+    (!!((v)->arch.hvm_vcpu.guest_efer & EFER_SVME))
 
 #ifdef __x86_64__
 #define hvm_long_mode_enabled(v) \
xen/include/asm-x86/hvm/svm/vmcb.h +3 -0
diff -r 96cbc9586732 -r ae06190eed4a xen/include/asm-x86/hvm/svm/vmcb.h
@@ -364,6 +364,9 @@ typedef union
     } fields;
 } __attribute__ ((packed)) lbrctrl_t;
 
+#define IOPM_SIZE   (12 * 1024)
+#define MSRPM_SIZE  (8  * 1024)
+
 struct vmcb_struct {
     u32 cr_intercepts;          /* offset 0x00 */
     u32 dr_intercepts;          /* offset 0x04 */
xen/include/asm-x86/hvm/vcpu.h +49 -0

61 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel