[PATCH] KVM: MMU: Destroy mmu while we still have a vcpu left

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>
This commit is contained in:
Avi Kivity 2007-01-05 16:36:55 -08:00 committed by Linus Torvalds
parent 40907d5768
commit 9ede74e0af
1 changed files with 1 additions and 1 deletions

View File

@ -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)