summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-01-23 05:40:38 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-23 16:52:06 +0100
commit084384754ebe6636f9e5554ad30b3143b4a26c84 (patch)
tree140022f23fa4e397b7d9f5c1ac54a55a2988f67f /drivers
parent[PATCH] paravirt: mark the paravirt_ops export internal (diff)
downloadlinux-084384754ebe6636f9e5554ad30b3143b4a26c84.tar.xz
linux-084384754ebe6636f9e5554ad30b3143b4a26c84.zip
[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)
static void kvm_free_vcpu(struct kvm_vcpu *vcpu)
{
+ vcpu_load(vcpu->kvm, vcpu_slot(vcpu));
kvm_mmu_destroy(vcpu);
+ vcpu_put(vcpu);
kvm_arch_ops->vcpu_free(vcpu);
}