[Android-virt] [PATCH] fixup! ARM: KVM: arch_timers: Wire the init code and config option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move kvm_timer_vcpu_terminate() call to kvm_arch_vcpu_uninit(),
as kvm_arch_vcpu_destroy() happens too late and we end up with
the timers firing when the VCPUs are already dead.

Signed-off-by: Marc Zyngier <marc.zyngier at arm.com>
---
 arch/arm/kvm/arm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 49ed283..1cf2ca8 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -231,7 +231,6 @@ void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
 
 void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)
 {
-	kvm_timer_vcpu_terminate(vcpu);
 	kvm_arch_vcpu_free(vcpu);
 }
 
@@ -272,6 +271,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
 
 void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)
 {
+	kvm_timer_vcpu_terminate(vcpu);
 }
 
 void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
-- 
1.7.7.1





[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux