Skip to content

Commit

Permalink
[PATCH] KVM: MMU: Destroy mmu while we still have a vcpu left
Browse files Browse the repository at this point in the history
mmu_destroy flushes the guest tlb (indirectly), which needs a valid vcpu.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Avi Kivity authored and Linus Torvalds committed Jan 6, 2007
1 parent 40907d5 commit 9ede74e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ static void kvm_free_physmem(struct kvm *kvm)

static void kvm_free_vcpu(struct kvm_vcpu *vcpu)
{
kvm_arch_ops->vcpu_free(vcpu);
kvm_mmu_destroy(vcpu);
kvm_arch_ops->vcpu_free(vcpu);
}

static void kvm_free_vcpus(struct kvm *kvm)
Expand Down

0 comments on commit 9ede74e

Please sign in to comment.