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

[Xen-changelog] [xen-unstable] [HVM][VMX] Fixes to VMCS create/destroy.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 3f8d9b128d711e5e2f6e7af2a236272aad3c5817
# Parent  3fe11185adfba107da8d81808ef4e3097dc41dcd
[HVM][VMX] Fixes to VMCS create/destroy.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmcs.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r 3fe11185adfb -r 3f8d9b128d71 xen/arch/x86/hvm/vmx/vmcs.c
--- a/xen/arch/x86/hvm/vmx/vmcs.c       Sat Jul 01 09:37:24 2006 +0100
+++ b/xen/arch/x86/hvm/vmx/vmcs.c       Mon Jul 03 08:27:50 2006 +0100
@@ -36,6 +36,7 @@
 #include <xen/kernel.h>
 #include <asm/shadow.h>
 #include <xen/keyhandler.h>
+
 #if CONFIG_PAGING_LEVELS >= 3
 #include <asm/shadow_64.h>
 #endif
@@ -440,7 +441,6 @@ static int construct_vmcs(struct vcpu *v
     memset(arch_vmx, 0, sizeof(struct arch_vmx_struct));
 
     spin_lock_init(&arch_vmx->vmcs_lock);
-    arch_vmx->active_cpu = -1;
 
     /*
      * Create a new VMCS
@@ -450,7 +450,7 @@ static int construct_vmcs(struct vcpu *v
         return -ENOMEM;
     }
 
-    vmx_clear_vmcs(v);
+    __vmx_clear_vmcs(v);
     vmx_load_vmcs(v);
 
     if ((error = construct_vmcs_controls(arch_vmx))) {
@@ -495,6 +495,9 @@ void vmx_destroy_vmcs(struct vcpu *v)
 void vmx_destroy_vmcs(struct vcpu *v)
 {
     struct arch_vmx_struct *arch_vmx = &v->arch.hvm_vmx;
+
+    if ( arch_vmx->vmcs == NULL )
+        return;
 
     vmx_clear_vmcs(v);
 

_______________________________________________
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®.