diff options
author | Avi Kivity <avi@qumranet.com> | 2007-01-05 19:36:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2007-01-06 02:55:27 -0500 |
commit | 9ede74e0af549d75d4ea870bed8b178983816745 (patch) | |
tree | 930797bfc567b29c9a574faf2c085a5849e2332e /drivers/kvm/kvm_main.c | |
parent | 40907d5768ab8cadd4cad97bef350820ded20338 (diff) |
[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>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r-- | drivers/kvm/kvm_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
271 | 271 | ||
272 | static void kvm_free_vcpu(struct kvm_vcpu *vcpu) | 272 | static void kvm_free_vcpu(struct kvm_vcpu *vcpu) |
273 | { | 273 | { |
274 | kvm_arch_ops->vcpu_free(vcpu); | ||
275 | kvm_mmu_destroy(vcpu); | 274 | kvm_mmu_destroy(vcpu); |
275 | kvm_arch_ops->vcpu_free(vcpu); | ||
276 | } | 276 | } |
277 | 277 | ||
278 | static void kvm_free_vcpus(struct kvm *kvm) | 278 | static void kvm_free_vcpus(struct kvm *kvm) |