Re: [PATCH v3 10/16] iommu: introduce device fault report API

2018-01-23 Thread Jacob Pan
On Thu, 18 Jan 2018 19:24:52 + Jean-Philippe Brucker wrote: > Hi Jacob, > > I've got minor comments after working with this patch, sorry for the > multiple replies > > On 17/11/17 18:55, Jacob Pan wrote: > [...] > > diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c > > index 829e9e

Re: [PATCH v3 10/16] iommu: introduce device fault report API

2018-01-18 Thread Jean-Philippe Brucker
Hi Jacob, I've got minor comments after working with this patch, sorry for the multiple replies On 17/11/17 18:55, Jacob Pan wrote: [...] > diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c > index 829e9e9..97b7990 100644 > --- a/drivers/iommu/iommu.c > +++ b/drivers/iommu/iommu.c > @@ -

Re: [PATCH v3 10/16] iommu: introduce device fault report API

2018-01-10 Thread Jean-Philippe Brucker
On 17/11/17 18:55, Jacob Pan wrote: [...] > +static inline int iommu_register_device_fault_handler(struct device *dev, > + iommu_dev_fault_handler_t > handler, > + void *data) > +{ > + return 0;> +} > + > +

Re: [PATCH v3 10/16] iommu: introduce device fault report API

2017-12-08 Thread Jacob Pan
On Fri, 8 Dec 2017 13:59:09 -0700 Alex Williamson wrote: > > > > > > Isn't this all rather racy? I see that we can have multiple > > > callers to register racing. > > I agree, should use a lock here to prevent unregister. For multiple > > caller race, it won't happen since there is only one

Re: [PATCH v3 10/16] iommu: introduce device fault report API

2017-12-08 Thread Jacob Pan
On Tue, 5 Dec 2017 14:22:41 +0800 Lu Baolu wrote: > > +int iommu_report_device_fault(struct device *dev, struct > > iommu_fault_event *evt) +{ > > + /* we only report device fault if there is a handler > > registered */ > > + if (!dev->iommu_param || !dev->iommu_param->fault_param || > > +

Re: [PATCH v3 10/16] iommu: introduce device fault report API

2017-12-08 Thread Alex Williamson
On Fri, 8 Dec 2017 12:23:58 -0800 Jacob Pan wrote: > On Thu, 7 Dec 2017 14:27:25 -0700 > Alex Williamson wrote: > > > On Fri, 17 Nov 2017 10:55:08 -0800 > > Jacob Pan wrote: > > > > > Traditionally, device specific faults are detected and handled > > > within their own device drivers. When

Re: [PATCH v3 10/16] iommu: introduce device fault report API

2017-12-08 Thread Jacob Pan
On Thu, 7 Dec 2017 14:27:25 -0700 Alex Williamson wrote: > On Fri, 17 Nov 2017 10:55:08 -0800 > Jacob Pan wrote: > > > Traditionally, device specific faults are detected and handled > > within their own device drivers. When IOMMU is enabled, faults such > > as DMA related transactions are detec

Re: [PATCH v3 10/16] iommu: introduce device fault report API

2017-12-07 Thread Alex Williamson
On Fri, 17 Nov 2017 10:55:08 -0800 Jacob Pan wrote: > Traditionally, device specific faults are detected and handled within > their own device drivers. When IOMMU is enabled, faults such as DMA > related transactions are detected by IOMMU. There is no generic > reporting mechanism to report fault

Re: [PATCH v3 10/16] iommu: introduce device fault report API

2017-12-04 Thread Lu Baolu
Hi, On 11/18/2017 02:55 AM, Jacob Pan wrote: > Traditionally, device specific faults are detected and handled within > their own device drivers. When IOMMU is enabled, faults such as DMA > related transactions are detected by IOMMU. There is no generic > reporting mechanism to report faults back t

[PATCH v3 10/16] iommu: introduce device fault report API

2017-11-17 Thread Jacob Pan
Traditionally, device specific faults are detected and handled within their own device drivers. When IOMMU is enabled, faults such as DMA related transactions are detected by IOMMU. There is no generic reporting mechanism to report faults back to the in-kernel device driver or the guest OS in case