Wu, Feng wrote on 2014-12-19: > > > [email protected] wrote on > mailto:[email protected]] On Behalf Of: >> Cc: [email protected]; [email protected]; >> [email protected] >> Subject: RE: [v3 25/26] KVM: Suppress posted-interrupt when 'SN' is >> set >> >> Paolo Bonzini wrote on 2014-12-18: >>> >>> >>> On 18/12/2014 04:14, Wu, Feng wrote: >>>> >>>> >>>> [email protected] wrote on >> mailto:[email protected]] On Behalf Of Paolo: >>>>> [email protected]; Gleb Natapov; Paolo Bonzini; >>>>> [email protected]; >>>>> [email protected]; Alex Williamson; >>>>> joro-zLv9SwRftAIdnm+Jiang >>>>> Liu >>>>> Cc: [email protected]; >>>>> [email protected]; KVM list; >>>>> Eric Auger >>>>> Subject: Re: [v3 25/26] KVM: Suppress posted-interrupt when 'SN' >>>>> is set >>>>> >>>>> >>>>> >>>>> On 12/12/2014 16:14, Feng Wu wrote: >>>>>> Currently, we don't support urgent interrupt, all interrupts >>>>>> are recognized as non-urgent interrupt, so we cannot send >>>>>> posted-interrupt when 'SN' is set. >>>>> >>>>> Can this happen? If the vcpu is in guest mode, it cannot have >>>>> been scheduled out, and that's the only case when SN is set. >>>>> >>>>> Paolo >>>> >>>> Currently, the only place where SN is set is vCPU is preempted >>>> and >> >> If the vCPU is preempted, shouldn't the subsequent be ignored? What >> happens if a PI is occurs when vCPU is preempted? > > If a vCPU is preempted, the 'SN' bit is set, the subsequent interrupts > are suppressed for posting.
I mean what happens if we don't set SN bit. From my point, if preempter already disabled the interrupt, it is ok to leave SN bit as zero. But if preempter enabled the interrupt, doesn't this mean he allow interrupt to happen? BTW, since there already has ON bit, so this means there only have one interrupt arrived at most and it doesn't hurt performance. Do we really need to set SN bit? > > Thanks, > Feng > >> >>>> waiting for the next scheduling in the runqueue. But I am not >>>> sure whether we need to set SN for other purpose in future. >>>> Adding SN checking here is just to follow the Spec. non-urgent >>>> interrupts are suppressed >>> when SN is set. >>> >>> I would change that to a WARN_ON_ONCE then. >> >> >> Best regards, >> Yang >> >> >> _______________________________________________ >> iommu mailing list >> [email protected] >> https://lists.linuxfoundation.org/mailman/listinfo/iommu Best regards, Yang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

