Skip to content

Commit

Permalink
[PATCH] KVM: make sure there is a vcpu context loaded when destroying…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Avi Kivity authored and Linus Torvalds committed Jan 23, 2007
1 parent 0dbe5a1 commit 0843847
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 0843847

Please sign in to comment.