From ebf51bf73aaad1b62e18739d9a245bd1cdbd6c95 Mon Sep 17 00:00:00 2001 From: neel Date: Sat, 26 Apr 2014 22:37:56 +0000 Subject: [PATCH] A VMCS is always inactive when it exits the vmx_run() loop. Remove redundant code and the misleading comment that suggest otherwise. Reviewed by: grehan@ --- sys/amd64/vmm/intel/vmx.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index 662bbc78c28d..286eba93616a 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -2234,7 +2234,7 @@ vmx_run(void *arg, int vcpu, register_t startrip, pmap_t pmap, static void vmx_vmcleanup(void *arg) { - int i, error; + int i; struct vmx *vmx = arg; if (apic_access_virtualization(vmx, 0)) @@ -2243,13 +2243,6 @@ vmx_vmcleanup(void *arg) for (i = 0; i < VM_MAXCPU; i++) vpid_free(vmx->state[i].vpid); - /* - * XXXSMP we also need to clear the VMCS active on the other vcpus. - */ - error = vmclear(&vmx->vmcs[0]); - if (error != 0) - panic("vmx_vmcleanup: vmclear error %d on vcpu 0", error); - free(vmx, M_VMX); return;