Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08438475 authored by Avi Kivity's avatar Avi Kivity Committed by Linus Torvalds
Browse files

[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: default avatarAvi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0dbe5a11
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
}