ia64/xen-unstable
changeset 10636:3f8d9b128d71
[HVM][VMX] Fixes to VMCS create/destroy.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Mon Jul 03 08:27:50 2006 +0100 (2006-07-03) |
parents | 3fe11185adfb |
children | 856caf975abd |
files | xen/arch/x86/hvm/vmx/vmcs.c |
line diff
1.1 --- a/xen/arch/x86/hvm/vmx/vmcs.c Sat Jul 01 09:37:24 2006 +0100 1.2 +++ b/xen/arch/x86/hvm/vmx/vmcs.c Mon Jul 03 08:27:50 2006 +0100 1.3 @@ -36,6 +36,7 @@ 1.4 #include <xen/kernel.h> 1.5 #include <asm/shadow.h> 1.6 #include <xen/keyhandler.h> 1.7 + 1.8 #if CONFIG_PAGING_LEVELS >= 3 1.9 #include <asm/shadow_64.h> 1.10 #endif 1.11 @@ -440,7 +441,6 @@ static int construct_vmcs(struct vcpu *v 1.12 memset(arch_vmx, 0, sizeof(struct arch_vmx_struct)); 1.13 1.14 spin_lock_init(&arch_vmx->vmcs_lock); 1.15 - arch_vmx->active_cpu = -1; 1.16 1.17 /* 1.18 * Create a new VMCS 1.19 @@ -450,7 +450,7 @@ static int construct_vmcs(struct vcpu *v 1.20 return -ENOMEM; 1.21 } 1.22 1.23 - vmx_clear_vmcs(v); 1.24 + __vmx_clear_vmcs(v); 1.25 vmx_load_vmcs(v); 1.26 1.27 if ((error = construct_vmcs_controls(arch_vmx))) { 1.28 @@ -496,6 +496,9 @@ void vmx_destroy_vmcs(struct vcpu *v) 1.29 { 1.30 struct arch_vmx_struct *arch_vmx = &v->arch.hvm_vmx; 1.31 1.32 + if ( arch_vmx->vmcs == NULL ) 1.33 + return; 1.34 + 1.35 vmx_clear_vmcs(v); 1.36 1.37 free_vmcs(arch_vmx->vmcs);