|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Patch v11 1/3] IOMMU: add a timeout parameter for device IOTLB invalidation
On June 02, 2016 6:25 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
> >>> On 01.06.16 at 11:05, <quan.xu@xxxxxxxxx> wrote:
> > From: Quan Xu <quan.xu@xxxxxxxxx>
> > v11: Change the timeout parameter from 'vtd_qi_timeout' to
> > 'iommu_dev_iotlb_timeout', which is not only for VT-d device
> > IOTLB invalidation, but also for other IOMMU implementations.
>
> This goes after the first --- separator.
>
Got it. It should be:
---
v11:
- ...
- ...
---
> > --- a/docs/misc/xen-command-line.markdown
> > +++ b/docs/misc/xen-command-line.markdown
> > @@ -996,6 +996,15 @@ debug hypervisor only).
> >
> > >> Enable IOMMU debugging code (implies `verbose`).
> >
> > +### iommu\_dev\_iotlb\_timeout
> > +> `= <integer>`
> > +
> > +> Default: `1`
>
> So on v10 I had made clear that any timeout reduction from its current value
> is, for the ATS case, not acceptable, unless you have proof that this lower
> value will fit all past, present, and future devices. Otherwise we're risking
> a
> regression here.
>
I really misunderstood the 'current value', which should be about
'DMAR_OPERATION_TIMEOUT MILLISECS(1000) ', instead of ' IOMMU_QI_TIMEOUT
MILLISECS(1)' in my patch.
So the default is 1000.
> > --- a/xen/drivers/passthrough/vtd/qinval.c
> > +++ b/xen/drivers/passthrough/vtd/qinval.c
> > @@ -28,6 +28,8 @@
> > #include "vtd.h"
> > #include "extern.h"
> >
> > +#define IOMMU_QI_TIMEOUT MILLISECS(1)
>
> May I suggest VTD_QI_TIMEOUT (but see also below)?
>
Agreed. VTD_QI_TIMEOUT is a better one.
> > @@ -163,14 +165,21 @@ static int queue_invalidate_wait(struct iommu
> *iommu,
> > /* Now we don't support interrupt method */
> > if ( sw )
> > {
> > + s_time_t timeout;
> > +
> > /* In case all wait descriptor writes to same addr with same data
> > */
> > - start_time = NOW();
> > + timeout = flush_dev_iotlb ?
> > + (NOW() + iommu_dev_iotlb_timeout * MILLISECS(1)) :
>
> MILLISECS(iommu_dev_iotlb_timeout)
>
> > + (NOW() + IOMMU_QI_TIMEOUT);
>
> Or really the whole expression should probably simply become
>
> timeout = NOW() + MILLISECS(flush_dev_iotlb ?
> iommu_dev_iotlb_timeout : VTD_QI_TIMEOUT);
>
> (of course with VTD_QI_TIMEOUT having its MILLISECS() dropped, and
> suitably line wrapped).
>
I prefer this later one.
Quan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |