]> git.hungrycats.org Git - linux/commitdiff
KVM: x86: properly restore LVT0
authorRadim Krčmář <rkrcmar@redhat.com>
Tue, 30 Jun 2015 20:19:17 +0000 (22:19 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Tue, 21 Jul 2015 01:12:43 +0000 (21:12 -0400)
[ Upstream commit 58382447b9a9989da551a7b17e72756f6e238bb8 ]

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ář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
arch/x86/kvm/lapic.c

index fe637cab8e9ce27b0d78e4f19a5b076b6649541e..de8e5004012415696b664914edbcd733083b627b 100644 (file)
@@ -1687,6 +1687,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, kvm_apic_get_reg(apic, APIC_LVT0));
        update_divide_count(apic);
        start_apic_timer(apic);
        apic->irr_pending = true;