KVM: x86: fix vcpu initialization with userspace lapic
authorRadim Krčmář <rkrcmar@redhat.com>
Thu, 1 Mar 2018 14:24:25 +0000 (15:24 +0100)
committerRadim Krčmář <rkrcmar@redhat.com>
Thu, 1 Mar 2018 21:32:45 +0000 (22:32 +0100)
commitb7e31be385584afe7f073130e8e570d53c95f7fe
treef14381b2f2593fbf6b2bae27a67c9a9605bc5a67
parent518e7b94817abed94becfe6a44f1ece0d4745afe
KVM: x86: fix vcpu initialization with userspace lapic

Moving the code around broke this rare configuration.
Use this opportunity to finally call lapic reset from vcpu reset.

Reported-by: syzbot+fb7a33a4b6c35007a72b@syzkaller.appspotmail.com
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Fixes: 0b2e9904c159 ("KVM: x86: move LAPIC initialization after VMCS creation")
Cc: stable@vger.kernel.org
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/lapic.c
arch/x86/kvm/x86.c