• Luwei Kang's avatar
    KVM: x86: Sync the pending Posted-Interrupts · 81b01667
    Luwei Kang authored
    Some Posted-Interrupts from passthrough devices may be lost or
    overwritten when the vCPU is in runnable state.
    
    The SN (Suppress Notification) of PID (Posted Interrupt Descriptor) will
    be set when the vCPU is preempted (vCPU in KVM_MP_STATE_RUNNABLE state
    but not running on physical CPU). If a posted interrupt coming at this
    time, the irq remmaping facility will set the bit of PIR (Posted
    Interrupt Requests) without ON (Outstanding Notification).
    So this interrupt can't be sync to APIC virtualization register and
    will not be handled by Guest because ON is zero.
    Signed-off-by: default avatarLuwei Kang <luwei.kang@intel.com>
    [Eliminate the pi_clear_sn fast path. - Paolo]
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    81b01667
vmx.h 13 KB