OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jun 2015 19:29:07 +0000 (12:29 -0700)
commit229367940d16877ec300652fced3e577db2e5769
tree314e1cbbcafabe369af1d95ebb114686f4146ee0
parent646d04eb28d66e1be21ba3f4305750390a51e132
KVM: x86: fix lapic.timer_mode on restore

commit b6ac069532218027f2991cba01d7a72a200688b0 upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/lapic.c