Re: [PATCH v2] KVM: x86: Sync the pending Posted-Interrupts

2019-01-30 Thread Paolo Bonzini
On 30/01/19 11:38, Kang, Luwei wrote: This is not what I asked. You should instead do the check after pi_clear_sn. >>> >>> I think the SN has been cleared here before test the bitmap. >>> The SN will be set when the vCPU is schedule out. ID: >>> 28b835d60fcc2498e717cf5e6f0c3691c24

RE: [PATCH v2] KVM: x86: Sync the pending Posted-Interrupts

2019-01-30 Thread Kang, Luwei
> > >> This is not what I asked. You should instead do the check after > > >> pi_clear_sn. > > >> > > > > > > I think the SN has been cleared here before test the bitmap. > > > The SN will be set when the vCPU is schedule out. ID: > > > 28b835d60fcc2498e717cf5e6f0c3691c24546f7 > > > But SN will

RE: [PATCH v2] KVM: x86: Sync the pending Posted-Interrupts

2019-01-30 Thread Kang, Luwei
> >> This is not what I asked. You should instead do the check after > >> pi_clear_sn. > >> > > > > I think the SN has been cleared here before test the bitmap. > > The SN will be set when the vCPU is schedule out. ID: > > 28b835d60fcc2498e717cf5e6f0c3691c24546f7 > > But SN will be cleared when

Re: [PATCH v2] KVM: x86: Sync the pending Posted-Interrupts

2019-01-30 Thread Paolo Bonzini
On 30/01/19 10:01, Kang, Luwei wrote: >> This is not what I asked. You should instead do the check after pi_clear_sn. >> > > I think the SN has been cleared here before test the bitmap. > The SN will be set when the vCPU is schedule out. ID: > 28b835d60fcc2498e717cf5e6f0c3691c24546f7 > But SN w

RE: [PATCH v2] KVM: x86: Sync the pending Posted-Interrupts

2019-01-30 Thread Kang, Luwei
> > 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 p

Re: [PATCH v2] KVM: x86: Sync the pending Posted-Interrupts

2019-01-30 Thread Paolo Bonzini
On 30/01/19 01:59, Luwei Kang wrote: > 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 st

[PATCH v2] KVM: x86: Sync the pending Posted-Interrupts

2019-01-29 Thread Luwei Kang
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 post