From: Avi Kivity Date: Sat, 6 Jan 2007 00:36:55 +0000 (-0800) Subject: [PATCH] KVM: MMU: Destroy mmu while we still have a vcpu left X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9ede74e0af549d75d4ea870bed8b178983816745;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [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 Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 6623fecff040..6e15aef6c34f 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -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)