]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: x86: Fix virtual wire mode
authorJan H. Schönherr <jschoenh@amazon.de>
Sat, 20 May 2017 11:24:32 +0000 (13:24 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 May 2017 16:01:21 +0000 (18:01 +0200)
commit52b5419016997f2960e9c8b6584c4acb3875d126
tree8179887b77543d7caae5653560f5f1c95542e44b
parente1d39b17e044e8ae819827810d87d809ba5f58c0
KVM: x86: Fix virtual wire mode

Intel SDM says, that at most one LAPIC should be configured with ExtINT
delivery. KVM configures all LAPICs this way. This causes pic_unlock()
to kick the first available vCPU from the internal KVM data structures.
If this vCPU is not the BSP, but some not-yet-booted AP, the BSP may
never realize that there is an interrupt.

Fix that by enabling ExtINT delivery only for the BSP.

This allows booting a Linux guest without a TSC in the above situation.
Otherwise the BSP gets stuck in calibrate_delay_converge().

Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
Reviewed-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c