summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Bruning <max@joyent.com>2011-06-14 05:47:47 -0700
committerMax Bruning <max@joyent.com>2011-06-14 05:47:47 -0700
commitf64b9caa08674b46526095162c1f5fe7d2ef5edf (patch)
tree04b869a60b1c05a3412894fcea6b59da5155f650
parent01d2951db24a5e797b59f241e98efc8aa6397e68 (diff)
downloadillumos-kvm-f64b9caa08674b46526095162c1f5fe7d2ef5edf.tar.gz
HVM-331 Implement XXXs in vmx_create_vcpu
-rw-r--r--kvm_vmx.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/kvm_vmx.c b/kvm_vmx.c
index 9423b1f..9a2e32d 100644
--- a/kvm_vmx.c
+++ b/kvm_vmx.c
@@ -4269,15 +4269,9 @@ vmx_vcpu_run(struct kvm_vcpu *vcpu)
static void
vmx_destroy_vcpu(struct kvm_vcpu *vcpu)
{
- /* XXX don't assume it's the first element */
- vcpu_vmx_t *vmx = (vcpu_vmx_t *)vcpu;
+ vcpu_vmx_t *vmx = to_vmx(vcpu);
if (vmx->vmcs != NULL) {
- /*
- * XXX This should probably be just vcpu_clear. However, we need
- * to get the per cpu lists working properly before we can do
- * that.
- */
__vcpu_clear(vmx);
kmem_free(vmx->vmcs, PAGESIZE);
vmx->vmcs = NULL;