>>> On 06.04.17 at 02:30, <chao....@intel.com> wrote: > The current logic of using VT-d pi is when guest configurates the pirq's > destination vcpu to a single vcpu, the according IRTE is updated to > posted format. If the destination of the pirq is multiple vcpus, we will > stay in posted format. Obviously, we should fall back to remapping interrupt > when guest wrongly configurate destination of pirq or makes it have > multi-destination vcpus. > > Signed-off-by: Chao Gao <chao....@intel.com> > Reviewed-by: Jan Beulich <jbeul...@suse.com> > Reviewed-by: Kevin Tian <kevin.t...@intel.com> > --- > v11: > - move the code (one line) that allow the parameter 'vcpu' of pi_update_irte() > can be NULL to Patch [2/6].
There was a change in v12 too, and I'm afraid it's buggy: > --- a/xen/drivers/passthrough/io.c > +++ b/xen/drivers/passthrough/io.c > @@ -413,15 +413,8 @@ int pt_irq_create_bind( > > /* Use interrupt posting if it is supported. */ > if ( iommu_intpost ) > - { > - if ( vcpu ) > - pi_update_irte(&vcpu->arch.hvm_vmx.pi_desc, info, > - pirq_dpci->gmsi.gvec); > - else > - dprintk(XENLOG_G_INFO, > - "%pv: deliver interrupt in remapping > mode,gvec:%02x\n", > - vcpu, pirq_dpci->gmsi.gvec); > - } > + pi_update_irte(&vcpu->arch.hvm_vmx.pi_desc, info, > + pirq_dpci->gmsi.gvec); pi_update_irte() tolerates a NULL first argument, but if vcpu is NULL you don't pass NULL here. I'll fix this up while committing. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel