• Jan H. Schönherr's avatar
    KVM: x86: Fix virtual wire mode · 52b54190
    Jan H. Schönherr authored
    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: default avatarJan H. Schönherr <jschoenh@amazon.de>
    Reviewed-by: default avatarWanpeng Li <wanpeng.li@hotmail.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    52b54190
lapic.c 62.4 KB