summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2015-06-30 22:19:17 +0200
committerZefan Li <lizefan@huawei.com>2015-10-22 09:20:07 +0800
commit8d6a97ca45dfa0fd1ef04c498126784f59198ad3 (patch)
tree10066160f6929fc3d3abde42e5d641e79a2bfcdb
parent08c730489602b6e3092e54180f47a7b3bfc32172 (diff)
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ář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [lizf: Backported to 3.4: - adjust context - s/kvm_apic_get_reg/apic_get_reg/] Signed-off-by: Zefan Li <lizefan@huawei.com>
-rw-r--r--arch/x86/kvm/lapic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index f935b52515bd..53454a6775bf 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;