[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Patch v6 09/11] vt-d: fix the IOMMU flush issue



On June 01, 2016 11:37 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
> >>> On 31.05.16 at 15:57, <quan.xu@xxxxxxxxx> wrote:
> > @@ -1542,14 +1600,36 @@ int domain_context_unmap_one(
> >          return -EINVAL;
> >      }
> >
> > -    if ( iommu_flush_context_device(iommu, iommu_domid,
> > -                                    (((u16)bus) << 8) | devfn,
> > -                                    DMA_CCMD_MASK_NOBIT, 0) )
> > -        iommu_flush_write_buffer(iommu);
> > -    else
> > +    rc = iommu_flush_context_device(iommu, iommu_domid,
> > +                                    PCI_BDF2(bus, devfn),
> > +                                    DMA_CCMD_MASK_NOBIT, 0);
> > +
> > +    /*
> > +     * The current logic for rc returns:
> > +     *   - positive  invoke iommu_flush_write_buffer to flush cache.
> > +     *   - zero      on success.
> > +     *   - negative  on failure. Continue to flush IOMMU IOTLB on a
> > +     *               best effort basis.
> > +     *
> > +     * Moreover, IOMMU flush handlers flush_context_qi or flush_iotlb_qi
> > +     * (or flush_context_reg and flush_iotlb_reg, deep functions in the
> > +     * call trees of iommu_flush_context_device and iommu_flush_iotlb_dsi)
> > +     * are with the same logic to bubble up positive return value.
> > +     */
> 
> This is the 3rd instance of that comment. I'd prefer the latter ones to simply
> refer to the first one, but I'll obviously leave it to the maintainers to 
> decide.
> 

Kevin / Feng .. What's your opinion?

> With those cosmetic issues taken care of
> Reviewed-by: Jen Beulich <jbeulich@xxxxxxxx>
> 

-Quan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.