aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-01-22 23:40:38 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-23 10:52:06 -0500
commit084384754ebe6636f9e5554ad30b3143b4a26c84 (patch)
tree140022f23fa4e397b7d9f5c1ac54a55a2988f67f /drivers
parent0dbe5a111382fd1320ff4b1d889e5b8c41290619 (diff)
[PATCH] KVM: make sure there is a vcpu context loaded when destroying the mmu
This makes the vmwrite errors on vm shutdown go away. Signed-off-by: Avi Kivity <avi@qumranet.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/kvm/kvm_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 67c1154960f0..be4651abe72c 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -272,7 +272,9 @@ static void kvm_free_physmem(struct kvm *kvm)
272 272
273static void kvm_free_vcpu(struct kvm_vcpu *vcpu) 273static void kvm_free_vcpu(struct kvm_vcpu *vcpu)
274{ 274{
275 vcpu_load(vcpu->kvm, vcpu_slot(vcpu));
275 kvm_mmu_destroy(vcpu); 276 kvm_mmu_destroy(vcpu);
277 vcpu_put(vcpu);
276 kvm_arch_ops->vcpu_free(vcpu); 278 kvm_arch_ops->vcpu_free(vcpu);
277} 279}
278 280