Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-06-22 Thread Xu, Quan
On June 23, 2016 12:18 AM, Jan Beulich wrote: > >>> On 22.06.16 at 17:54, wrote: > > On June 17, 2016 3:01 PM, Jan Beulich wrote: > >> And again I don't understand: ASSERT()s are to verify assumed state. > >> If > > static > >> code analysis resulted in understanding a function is unreachable >

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-06-22 Thread Jan Beulich
>>> On 22.06.16 at 17:54, wrote: > On June 17, 2016 3:01 PM, Jan Beulich wrote: >> And again I don't understand: ASSERT()s are to verify assumed state. If > static >> code analysis resulted in understanding a function is unreachable when >> qi_ctrl->qinval_maddr is zero (because qinval ought to

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-06-22 Thread Xu, Quan
On June 17, 2016 3:01 PM, Jan Beulich wrote: > And again I don't understand: ASSERT()s are to verify assumed state. If static > code analysis resulted in understanding a function is unreachable when > qi_ctrl->qinval_maddr is zero (because qinval ought to have got disabled if > any > of the table

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue (+ crash logic )

2016-06-19 Thread Xu, Quan
On June 18, 2016 5:54 PM, Xu, Quan wrote: > On June 17, 2016 9:35 PM, Julien Grall wrote: > > On 17/06/16 09:51, Xu, Quan wrote: > > > + arm/amd maintainers.. > > > > > > On June 01, 2016 5:05 PM, Xu, Quan wrote: > > >> If Device-TLB flush timed out, we hide the target ATS device > > >> immediat

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue (+ crash logic )

2016-06-18 Thread Xu, Quan
On June 17, 2016 9:35 PM, Julien Grall wrote: > On 17/06/16 09:51, Xu, Quan wrote: > > + arm/amd maintainers.. > > > > On June 01, 2016 5:05 PM, Xu, Quan wrote: > >> If Device-TLB flush timed out, we hide the target ATS device > >> immediately and crash the domain owning this ATS device. If impac

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue (+ crash logic )

2016-06-17 Thread Julien Grall
Hi Quan, On 17/06/16 09:51, Xu, Quan wrote: + arm/amd maintainers.. On June 01, 2016 5:05 PM, Xu, Quan wrote: If Device-TLB flush timed out, we hide the target ATS device immediately and crash the domain owning this ATS device. If impacted domain is hardware domain, just throw out a warning.

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue (+ crash logic )

2016-06-17 Thread Xu, Quan
+ arm/amd maintainers.. On June 01, 2016 5:05 PM, Xu, Quan wrote: > If Device-TLB flush timed out, we hide the target ATS device immediately and > crash the domain owning this ATS device. If impacted domain is hardware > domain, just throw out a warning. > > By hiding the device, we make sure it

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-06-17 Thread Jan Beulich
>>> On 17.06.16 at 10:15, wrote: > On June 17, 2016 3:01 PM, Jan Beulich wrote: >> >>> On 17.06.16 at 08:08, wrote: >> >> > On June 16, 2016 5:05 PM, Jan Beulich wrote: >> >> >>> On 16.06.16 at 10:42, wrote: >> >> > On June 02, 2016 7:07 PM, Jan Beulich wrote: >> >> >> >>> On 01.06.16 at 11:

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-06-17 Thread Xu, Quan
On June 17, 2016 3:01 PM, Jan Beulich wrote: > >>> On 17.06.16 at 08:08, wrote: > > > On June 16, 2016 5:05 PM, Jan Beulich wrote: > >> >>> On 16.06.16 at 10:42, wrote: > >> > On June 02, 2016 7:07 PM, Jan Beulich wrote: > >> >> >>> On 01.06.16 at 11:05, wrote: > >> >> > +static void dev_inv

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-06-17 Thread Jan Beulich
>>> On 17.06.16 at 08:08, wrote: > On June 16, 2016 5:05 PM, Jan Beulich wrote: >> >>> On 16.06.16 at 10:42, wrote: >> > On June 02, 2016 7:07 PM, Jan Beulich wrote: >> >> >>> On 01.06.16 at 11:05, wrote: >> >> > +static void dev_invalidate_iotlb_timeout(struct iommu *iommu, u16 did, >> >> >

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-06-16 Thread Xu, Quan
On June 16, 2016 5:05 PM, Jan Beulich wrote: > >>> On 16.06.16 at 10:42, wrote: > > On June 02, 2016 7:07 PM, Jan Beulich wrote: > >> >>> On 01.06.16 at 11:05, wrote: > >> > +static void dev_invalidate_iotlb_timeout(struct iommu *iommu, u16 did, > >> > +

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-06-16 Thread Jan Beulich
>>> On 16.06.16 at 10:42, wrote: > On June 02, 2016 7:07 PM, Jan Beulich wrote: >> >>> On 01.06.16 at 11:05, wrote: >> > --- a/xen/drivers/passthrough/vtd/extern.h >> > +++ b/xen/drivers/passthrough/vtd/extern.h >> > @@ -21,6 +21,7 @@ >> > #define _VTD_EXTERN_H_ >> > >> > #include "dmar.h" >>

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-06-16 Thread Xu, Quan
(* I will CC arm/amd maintainer after this vt-d specific discussion, and then send out my proposal...) On June 02, 2016 7:07 PM, Jan Beulich wrote: > >>> On 01.06.16 at 11:05, wrote: > > --- a/xen/drivers/passthrough/vtd/extern.h > > +++ b/xen/drivers/passthrough/vtd/extern.h > > @@ -21,6 +21,7

Re: [Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-06-02 Thread Jan Beulich
>>> On 01.06.16 at 11:05, wrote: > --- a/xen/drivers/passthrough/vtd/extern.h > +++ b/xen/drivers/passthrough/vtd/extern.h > @@ -21,6 +21,7 @@ > #define _VTD_EXTERN_H_ > > #include "dmar.h" > +#include "../ats.h" Why? You don't de-reference struct pci_ats_dev * in this file, so all you'd need

[Xen-devel] [Patch v11 3/3] vt-d: fix vt-d Device-TLB flush timeout issue

2016-06-01 Thread Xu, Quan
From: Quan Xu If Device-TLB flush timed out, we hide the target ATS device immediately and crash the domain owning this ATS device. If impacted domain is hardware domain, just throw out a warning. By hiding the device, we make sure it can't be assigned to any domain any longer (see device_assign