Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-22 Thread Xu, Quan
On March 23, 2016 1:37pm, wrote: > > From: Xu, Quan > > Sent: Wednesday, March 23, 2016 11:30 AM > > > > > > > > Yes, still inconsistent. As I said, you put invalidation sync within > > > dev_invalidate_iotlb, while for all other IOMMU invalidations the > > > sync is put after. Below would be cons

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-22 Thread Tian, Kevin
> From: Xu, Quan > Sent: Wednesday, March 23, 2016 11:30 AM > > > > > Yes, still inconsistent. As I said, you put invalidation sync within > > dev_invalidate_iotlb, while for all other IOMMU invalidations the sync is > > put > > after. Below would be consistent then: > > > > if ( flush_de

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-22 Thread Xu, Quan
On March 21, 2016 11:27am, Tian, Kevin wrote: > > From: Xu, Quan > > Sent: Friday, March 18, 2016 8:22 PM > > > > static void queue_invalidate_iec(struct iommu *iommu, u8 granu, > > > > u8 im, u16 iidx) { > > > > unsigned long flags; > > > > @@ -342,8 +393,6 @@ static int flush_iotlb_qi( >

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-22 Thread Xu, Quan
(( __ sorry, I was out of office on Mon./Tues. __)) On March 21, 2016 11:27am, Tian, Kevin wrote: > > From: Xu, Quan > > Sent: Friday, March 18, 2016 8:22 PM > > > > static void queue_invalidate_iec(struct iommu *iommu, u8 granu, > > > > u8 im, u16 iidx) { > > > > unsigned long flags; > >

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-20 Thread Tian, Kevin
> From: Xu, Quan > Sent: Friday, March 18, 2016 8:22 PM > > > > +int dev_invalidate_iotlb_sync(struct iommu *iommu, u16 did, > > > + u16 seg, u8 bus, u8 devfn) { > > > +struct qi_ctrl *qi_ctrl = iommu_qi_ctrl(iommu); > > > +int rc = 0; > > > + > > > +if ( q

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-19 Thread Jan Beulich
>>> On 18.03.16 at 12:31, wrote: > On March 18, 2016 7:19pm, wrote: >> >>> On 17.03.16 at 08:12, wrote: >> > --- a/xen/drivers/passthrough/vtd/qinval.c >> > +++ b/xen/drivers/passthrough/vtd/qinval.c >> > @@ -233,6 +233,57 @@ int qinval_device_iotlb(struct iommu *iommu, >> > return 0; >> >

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-19 Thread Xu, Quan
On March 17, 2016 4:17pm, Tian, Kevin wrote: > > From: Xu, Quan > > Sent: Thursday, March 17, 2016 3:13 PM diff --git > > a/xen/drivers/passthrough/vtd/qinval.c > > b/xen/drivers/passthrough/vtd/qinval.c > > index 37a15fb..2a5c638 100644 > > --- a/xen/drivers/passthrough/vtd/qinval.c > > +++ b/xen

[Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-19 Thread Quan Xu
If Device-TLB flush timed out, we would hide the target ATS device and crash the domain owning this ATS device. If impacted domain is hardware domain, just throw out a warning. The hidden device should be disallowed to be further assigned to any domain. Signed-off-by: Quan Xu --- xen/drivers/pa

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-19 Thread Jan Beulich
>>> On 17.03.16 at 08:12, wrote: > --- a/xen/drivers/passthrough/vtd/qinval.c > +++ b/xen/drivers/passthrough/vtd/qinval.c > @@ -233,6 +233,57 @@ int qinval_device_iotlb(struct iommu *iommu, > return 0; > } > > +static void dev_invalidate_iotlb_timeout(struct iommu *iommu, u16 did, > +

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-19 Thread Xu, Quan
On March 17, 2016 7:14pm, Tian, Kevin wrote: > > From: Jan Beulich [mailto:jbeul...@suse.com] > > Sent: Thursday, March 17, 2016 5:43 PM > > > > >>> On 17.03.16 at 09:17, wrote: > > >> From: Xu, Quan > > >> Sent: Thursday, March 17, 2016 3:13 PM > > >> --- a/xen/drivers/passthrough/vtd/qinval.c

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-19 Thread Tian, Kevin
> From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Thursday, March 17, 2016 5:43 PM > > >>> On 17.03.16 at 09:17, wrote: > >> From: Xu, Quan > >> Sent: Thursday, March 17, 2016 3:13 PM > >> --- a/xen/drivers/passthrough/vtd/qinval.c > >> +++ b/xen/drivers/passthrough/vtd/qinval.c > >> @@ -23

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-19 Thread Jan Beulich
>>> On 17.03.16 at 09:17, wrote: >> From: Xu, Quan >> Sent: Thursday, March 17, 2016 3:13 PM >> --- a/xen/drivers/passthrough/vtd/qinval.c >> +++ b/xen/drivers/passthrough/vtd/qinval.c >> @@ -233,6 +233,57 @@ int qinval_device_iotlb(struct iommu *iommu, >> return 0; >> } >> >> +static void

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-19 Thread Tian, Kevin
> From: Xu, Quan > Sent: Thursday, March 17, 2016 3:13 PM > diff --git a/xen/drivers/passthrough/vtd/qinval.c > b/xen/drivers/passthrough/vtd/qinval.c > index 37a15fb..2a5c638 100644 > --- a/xen/drivers/passthrough/vtd/qinval.c > +++ b/xen/drivers/passthrough/vtd/qinval.c > @@ -233,6 +233,57 @@ in

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-19 Thread Xu, Quan
On March 18, 2016 7:19pm, wrote: > >>> On 17.03.16 at 08:12, wrote: > > --- a/xen/drivers/passthrough/vtd/qinval.c > > +++ b/xen/drivers/passthrough/vtd/qinval.c > > @@ -233,6 +233,57 @@ int qinval_device_iotlb(struct iommu *iommu, > > return 0; > > } > > > > +static void dev_invalidate_iot

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-18 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Thursday, March 17, 2016 7:14 PM > > > From: Jan Beulich [mailto:jbeul...@suse.com] > > Sent: Thursday, March 17, 2016 5:43 PM > > > > >>> On 17.03.16 at 09:17, wrote: > > >> From: Xu, Quan > > >> Sent: Thursday, March 17, 2016 3:13 PM > > >> --- a/xen/drivers/passthr

Re: [Xen-devel] [PATCH v7 2/2] VT-d: Fix vt-d Device-TLB flush timeout issue

2016-03-18 Thread Jan Beulich
>>> On 17.03.16 at 12:13, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Thursday, March 17, 2016 5:43 PM >> >> >>> On 17.03.16 at 09:17, wrote: >> >> From: Xu, Quan >> >> Sent: Thursday, March 17, 2016 3:13 PM >> >> --- a/xen/drivers/passthrough/vtd/qinval.c >> >> +++ b/xen/d