]> git.ipfire.org Git - thirdparty/linux.git/commit - arch/x86/kvm/lapic.c
KVM: x86: fix lapic.timer_mode on restore
authorRadim Krčmář <rkrcmar@redhat.com>
Fri, 5 Jun 2015 18:57:41 +0000 (20:57 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Tue, 16 Jun 2015 04:01:10 +0000 (01:01 -0300)
commitb6ac069532218027f2991cba01d7a72a200688b0
tree20fe5cec8209421ed53c1e74b905e94e1057c6b9
parentd4a4f75cd8f29cd9464a5a32e9224a91571d6649
KVM: x86: fix lapic.timer_mode on restore

lapic.timer_mode was not properly initialized after migration, which
broke few useful things, like login, by making every sleep eternal.

Fix this by calling apic_update_lvtt in kvm_apic_post_state_restore.

There are other slowpaths that update lvtt, so this patch makes sure
something similar doesn't happen again by calling apic_update_lvtt
after every modification.

Cc: stable@vger.kernel.org
Fixes: f30ebc312ca9 ("KVM: x86: optimize some accesses to LVTT and SPIV")
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/lapic.c