Re: [Xen-devel] [PATCH v4 2/3] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.
>>> On 14.01.16 at 02:59,wrote: > On 14.01.2016 at 12:58am, wrote: >> >>> On 23.12.15 at 09:25, wrote: >> > --- a/xen/drivers/passthrough/vtd/qinval.c >> > +++ b/xen/drivers/passthrough/vtd/qinval.c >> > @@ -28,6 +28,11 @@ >> > #include "vtd.h" >> > #include "extern.h" >> > >> > +static int __read_mostly iommu_qi_timeout_ms = 1; >> > +integer_param("iommu_qi_timeout_ms", iommu_qi_timeout_ms); >> >> But wait - this needs to be accompanied by an entry in >> docs/misc/xen-command-line.markdown. >> > > Jan, Is the following right? No - you appear to add to the "iommu" option description. Either you need to change the implementation to match that (which probably would be a good idea, as that's what "iommu" is being used for in other cases), or you need to add a new standalone entry with the correct option name. Jan > --- a/docs/misc/xen-command-line.markdown > +++ b/docs/misc/xen-command-line.markdown > @@ -901,6 +901,14 @@ debug hypervisor only). > > >> Control the use of Queued Invalidation. > > +> `qi_timeout_ms` (VT-d) > + > +> Default: `1` > + > +> `= ` > + > +>> Specify the timeout of the VT-d Queued Invalidation in ms. > + > > `snoop` (Intel) > > > Default: `true` > > > -Quan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v4 2/3] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.
On 14.01.2016 at 5:04pm,wrote: > >>> On 14.01.16 at 02:59, wrote: > > On 14.01.2016 at 12:58am, wrote: > >> >>> On 23.12.15 at 09:25, wrote: > >> > --- a/xen/drivers/passthrough/vtd/qinval.c > >> > +++ b/xen/drivers/passthrough/vtd/qinval.c > >> > @@ -28,6 +28,11 @@ > >> > #include "vtd.h" > >> > #include "extern.h" > >> > > >> > +static int __read_mostly iommu_qi_timeout_ms = 1; > >> > +integer_param("iommu_qi_timeout_ms", iommu_qi_timeout_ms); > >> > >> But wait - this needs to be accompanied by an entry in > >> docs/misc/xen-command-line.markdown. > >> > > > > Jan, Is the following right? > > No - you appear to add to the "iommu" option description. Either you need to > change the implementation to match that (which probably would be a good > idea, as that's what "iommu" is being used for in other cases), or you need to > add a new standalone entry with the correct option name. > I prefer to add a new standalone entry. Maybe I can modify the option name from "iommu_qi_timeout_ms" to "qi_timeout_ms". -Quan > > > --- a/docs/misc/xen-command-line.markdown > > +++ b/docs/misc/xen-command-line.markdown > > @@ -901,6 +901,14 @@ debug hypervisor only). > > > > >> Control the use of Queued Invalidation. > > > > +> `qi_timeout_ms` (VT-d) > > + > > +> Default: `1` > > + > > +> `= ` > > + > > +>> Specify the timeout of the VT-d Queued Invalidation in ms. > > + > > > `snoop` (Intel) > > > > > Default: `true` > > > > > > -Quan > > ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v4 2/3] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.
>>> On 14.01.16 at 11:29,wrote: > On 14.01.2016 at 5:04pm, wrote: >> >>> On 14.01.16 at 02:59, wrote: >> > On 14.01.2016 at 12:58am, wrote: >> >> >>> On 23.12.15 at 09:25, wrote: >> >> > --- a/xen/drivers/passthrough/vtd/qinval.c >> >> > +++ b/xen/drivers/passthrough/vtd/qinval.c >> >> > @@ -28,6 +28,11 @@ >> >> > #include "vtd.h" >> >> > #include "extern.h" >> >> > >> >> > +static int __read_mostly iommu_qi_timeout_ms = 1; >> >> > +integer_param("iommu_qi_timeout_ms", iommu_qi_timeout_ms); >> >> >> >> But wait - this needs to be accompanied by an entry in >> >> docs/misc/xen-command-line.markdown. >> >> >> > >> > Jan, Is the following right? >> >> No - you appear to add to the "iommu" option description. Either you need to >> change the implementation to match that (which probably would be a good >> idea, as that's what "iommu" is being used for in other cases), or you need > to >> add a new standalone entry with the correct option name. >> > > I prefer to add a new standalone entry. > Maybe I can modify the option name from "iommu_qi_timeout_ms" to > "qi_timeout_ms". vtd-qi-timeout-ms might be okay, but qi as the prefix is bad. The trailing ms may also not be needed. Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v4 2/3] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.
On 14.01.2016 at 12:58am,wrote: > >>> On 23.12.15 at 09:25, wrote: > > --- a/xen/drivers/passthrough/vtd/qinval.c > > +++ b/xen/drivers/passthrough/vtd/qinval.c > > @@ -28,6 +28,11 @@ > > #include "vtd.h" > > #include "extern.h" > > > > +static int __read_mostly iommu_qi_timeout_ms = 1; > > +integer_param("iommu_qi_timeout_ms", iommu_qi_timeout_ms); > > But wait - this needs to be accompanied by an entry in > docs/misc/xen-command-line.markdown. > Jan, Is the following right? --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -901,6 +901,14 @@ debug hypervisor only). >> Control the use of Queued Invalidation. +> `qi_timeout_ms` (VT-d) + +> Default: `1` + +> `= ` + +>> Specify the timeout of the VT-d Queued Invalidation in ms. + > `snoop` (Intel) > Default: `true` -Quan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v4 2/3] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.
On 14.01.2016 at 12:56am,wrote: > >>> On 23.12.15 at 09:25, wrote: > > --- a/xen/drivers/passthrough/vtd/qinval.c > > +++ b/xen/drivers/passthrough/vtd/qinval.c > > @@ -28,6 +28,11 @@ > > #include "vtd.h" > > #include "extern.h" > > > > +static int __read_mostly iommu_qi_timeout_ms = 1; > > I'll take the liberty to convert this to "unsigned int" when committing. > Jan, thanks. I can also do it in next v5. Quan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v4 2/3] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.
>>> On 23.12.15 at 09:25,wrote: > --- a/xen/drivers/passthrough/vtd/qinval.c > +++ b/xen/drivers/passthrough/vtd/qinval.c > @@ -28,6 +28,11 @@ > #include "vtd.h" > #include "extern.h" > > +static int __read_mostly iommu_qi_timeout_ms = 1; I'll take the liberty to convert this to "unsigned int" when committing. Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v4 2/3] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.
>>> On 23.12.15 at 09:25,wrote: > --- a/xen/drivers/passthrough/vtd/qinval.c > +++ b/xen/drivers/passthrough/vtd/qinval.c > @@ -28,6 +28,11 @@ > #include "vtd.h" > #include "extern.h" > > +static int __read_mostly iommu_qi_timeout_ms = 1; > +integer_param("iommu_qi_timeout_ms", iommu_qi_timeout_ms); But wait - this needs to be accompanied by an entry in docs/misc/xen-command-line.markdown. Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v4 2/3] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.
> From: Xu, Quan > Sent: Wednesday, December 23, 2015 4:26 PM > > Signed-off-by: Quan XuAcked-by: Kevin Tian ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v4 2/3] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.
> On 25.12.2015 at 10:57am,wrote: > > From: Xu, Quan > > Sent: Wednesday, December 23, 2015 4:26 PM > > > > Signed-off-by: Quan Xu > > Acked-by: Kevin Tian Thanks Kevin! -Quan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
[Xen-devel] [PATCH v4 2/3] VT-d: Reduce spin timeout to 1ms, which can be boot-time changed.
Signed-off-by: Quan Xu--- xen/drivers/passthrough/vtd/qinval.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/vtd/qinval.c b/xen/drivers/passthrough/vtd/qinval.c index 946e812..b227e4e 100644 --- a/xen/drivers/passthrough/vtd/qinval.c +++ b/xen/drivers/passthrough/vtd/qinval.c @@ -28,6 +28,11 @@ #include "vtd.h" #include "extern.h" +static int __read_mostly iommu_qi_timeout_ms = 1; +integer_param("iommu_qi_timeout_ms", iommu_qi_timeout_ms); + +#define IOMMU_QI_TIMEOUT (iommu_qi_timeout_ms * MILLISECS(1)) + static void print_qi_regs(struct iommu *iommu) { u64 val; @@ -167,10 +172,12 @@ static int queue_invalidate_wait(struct iommu *iommu, start_time = NOW(); while ( poll_slot != QINVAL_STAT_DONE ) { -if ( NOW() > (start_time + DMAR_OPERATION_TIMEOUT) ) +if ( NOW() > (start_time + IOMMU_QI_TIMEOUT) ) { print_qi_regs(iommu); -panic("queue invalidate wait descriptor was not executed"); +dprintk(XENLOG_WARNING VTDPREFIX, +"Queue invalidate wait descriptor was timeout.\n"); +return -ETIMEDOUT; } cpu_relax(); } -- 1.9.1 ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel