WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 05/17] vmx: nest: nested control structure

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 05/17] vmx: nest: nested control structure
From: Qing He <qing.he@xxxxxxxxx>
Date: Thu, 22 Apr 2010 17:41:17 +0800
Cc: Qing He <qing.he@xxxxxxxxx>
Delivery-date: Thu, 22 Apr 2010 02:44:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1271929289-18572-1-git-send-email-qing.he@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1271929289-18572-1-git-send-email-qing.he@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
v->arch.hvm_vmx.nest as control structure

Signed-off-by: Qing He <qing.he@xxxxxxxxx>

---
 b/xen/include/asm-x86/hvm/vmx/nest.h |   45 +++++++++++++++++++++++++++++++++++
 xen/include/asm-x86/hvm/vmx/vmcs.h   |    4 +++
 2 files changed, 49 insertions(+)

diff -r 6f0f41f80285 -r fe50c7458a43 xen/include/asm-x86/hvm/vmx/nest.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/asm-x86/hvm/vmx/nest.h        Thu Apr 22 22:30:09 2010 +0800
@@ -0,0 +1,45 @@
+/*
+ * nest.h: nested virtualization for VMX.
+ *
+ * Copyright (c) 2010, Intel Corporation.
+ * Author: Qing He <qing.he@xxxxxxxxx>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307 USA.
+ *
+ */
+#ifndef __ASM_X86_HVM_NEST_H__
+#define __ASM_X86_HVM_NEST_H__
+
+struct vmcs_struct;
+
+struct vmx_nest_struct {
+    paddr_t              guest_vmxon_pa;
+
+    /* Saved host vmcs for vcpu itself */
+    struct vmcs_struct  *hvmcs;
+
+    /*
+     * Guest's `current vmcs' of vcpu
+     *  - gvmcs_pa: guest VMCS region physical address
+     *  - vvmcs:    (guest) virtual vmcs
+     *  - svmcs:    effective vmcs for the guest of this vcpu
+     *  - invalid:  launch state: invalid on clear, valid on ld
+     */
+    paddr_t              gvmcs_pa;
+    void                *vvmcs;
+    struct vmcs_struct  *svmcs;
+    int                  vmcs_invalid;
+};
+
+#endif /* __ASM_X86_HVM_NEST_H__ */
diff -r 6f0f41f80285 -r fe50c7458a43 xen/include/asm-x86/hvm/vmx/vmcs.h
--- a/xen/include/asm-x86/hvm/vmx/vmcs.h        Thu Apr 22 22:30:00 2010 +0800
+++ b/xen/include/asm-x86/hvm/vmx/vmcs.h        Thu Apr 22 22:30:09 2010 +0800
@@ -22,6 +22,7 @@
 #include <asm/config.h>
 #include <asm/hvm/io.h>
 #include <asm/hvm/vmx/vpmu.h>
+#include <asm/hvm/vmx/nest.h>
 
 extern void start_vmx(void);
 extern void vmcs_dump_vcpu(struct vcpu *v);
@@ -95,6 +96,9 @@
     /* PMU */
     struct vpmu_struct   vpmu;
 
+    /* nested virtualization */
+    struct vmx_nest_struct nest;
+
 #ifdef __x86_64__
     struct vmx_msr_state msr_state;
     unsigned long        shadow_gs;

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