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

Re: [Xen-devel] [PATCH 2/2] IOMMU/MMU: Adjust low level functions for VT-d Device-TLB flush error.



On April 12, 2016 12:35am, Jan Beulich <JBeulich@xxxxxxxx> wrote:
> >>> On 11.04.16 at 05:27, <quan.xu@xxxxxxxxx> wrote:
> > On April 11, 2016 11:10am, <quan.xu@xxxxxxxxx> wrote:
> >> On March 29, 2016 3:37pm, Jan Beulich <JBeulich@xxxxxxxx> wrote:
> >> > >>> On 25.03.16 at 10:27, <quan.xu@xxxxxxxxx> wrote:
> >> > > On March 18, 2016 6:20pm, <JBeulich@xxxxxxxx> wrote:
> >> > >> >>> On 17.03.16 at 07:54, <quan.xu@xxxxxxxxx> wrote:
> >> > >> > --- a/xen/drivers/passthrough/iommu.c
> >> > >> > +++ b/xen/drivers/passthrough/iommu.c
> >> > >> > @@ -554,11 +555,24 @@ static void iommu_flush_all(void)
> >> > >> >          iommu = drhd->iommu;
> >> > >> >          iommu_flush_context_global(iommu, 0);
> >> > >> >          flush_dev_iotlb = find_ats_dev_drhd(iommu) ? 1 : 0;
> >> > >> > -        iommu_flush_iotlb_global(iommu, 0, flush_dev_iotlb);
> >> > >> > +        rc = iommu_flush_iotlb_global(iommu, 0,
> >> > >> > + flush_dev_iotlb);
> >> > >> > +
> >> > >> > +        if ( rc > 0 )
> >> > >> > +        {
> >> > >> > +            iommu_flush_write_buffer(iommu);
> >> > >>
> >> > >> Why is this needed all of the sudden?
> >> > >
> >> > > As there may be multiple IOMMUs. .e.g, there are 2 IOMMUs in my
> >> > > machine, and I can find the following log message:
> >> > > """
> >> > > (XEN) Intel VT-d iommu 0 supported page sizes: 4kB, 2MB, 1GB.
> >> > > (XEN) Intel VT-d iommu 1 supported page sizes: 4kB, 2MB, 1GB.
> >> > > """
> >> > > __iiuc__, iommu_flush_write_buffer() is per IOMMU, so It should
> >> > > be called to flush every IOMMU.
> >> >
> >> > For one what you say suggests that right now this is being done for
> >> > some (one?) IOMMU(s), which I don't see being the case. And then
> >> > what you say _still_ doesn't say _why_ this is now needed all of
> >> > the sudden. If, in the course of doing your re-work here, you find
> >> > pre-existing issues with the code, please split the necessary fixes
> >> > out of your re-work and submit them separately with proper
> >> > explanations in
> >> their commit messages.
> >> >
> >>
> >> I find out it is no need modification for this function.
> > Sorry, this modification refers to as:
> > "
> > +        if ( rc > 0 )
> > +        {
> > +            iommu_flush_write_buffer(iommu);
> > +            rc = 0;
> > +        }
> > "
> >

My bad description, what I mean is that I will drop above modification, then..

> > at least errors need to be propagated.
> 
> How does error propagation correlate with suddenly calling
> iommu_flush_write_buffer()?
> 

iommu_flush_write_buffer() is no longer called suddenly in this function.

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®.