From: Radim Krčmář Date: Tue, 30 Jun 2015 20:19:17 +0000 (+0200) Subject: KVM: x86: properly restore LVT0 X-Git-Tag: v3.4.110~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d6a97ca45dfa0fd1ef04c498126784f59198ad3;p=thirdparty%2Fkernel%2Fstable.git KVM: x86: properly restore LVT0 commit db1385624c686fe99fe2d1b61a36e1537b915d08 upstream. Legacy NMI watchdog didn't work after migration/resume, because vapics_in_nmi_mode was left at 0. Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini [lizf: Backported to 3.4: - adjust context - s/kvm_apic_get_reg/apic_get_reg/] Signed-off-by: Zefan Li --- diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index f935b52515bd2..53454a6775bf8 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -1257,6 +1257,7 @@ void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu) apic_update_ppr(apic); hrtimer_cancel(&apic->lapic_timer.timer); + apic_manage_nmi_watchdog(apic, apic_get_reg(apic, APIC_LVT0)); update_divide_count(apic); start_apic_timer(apic); apic->irr_pending = true;