Re: [PATCH v2 09/16] driver core: add iommu device fault reporting data

2017-10-06 Thread Jacob Pan
On Fri, 6 Oct 2017 10:39:31 +0200 Joerg Roedel wrote: > On Fri, Oct 06, 2017 at 12:11:45AM -0700, Christoph Hellwig wrote: > > This is the 3rd iommu field, in addition to 8 dma-specific fields > > that we carry around for each struct device. > > Agreed, consolidating the

Re: [PATCH v2 09/16] driver core: add iommu device fault reporting data

2017-10-06 Thread Joerg Roedel
On Fri, Oct 06, 2017 at 12:11:45AM -0700, Christoph Hellwig wrote: > This is the 3rd iommu field, in addition to 8 dma-specific fields > that we carry around for each struct device. Agreed, consolidating the iommu-fields in 'struct device' into a single 'struct iommu_data' is on my todo-list.

Re: [PATCH v2 09/16] driver core: add iommu device fault reporting data

2017-10-06 Thread Greg Kroah-Hartman
On Fri, Oct 06, 2017 at 12:11:45AM -0700, Christoph Hellwig wrote: > On Thu, Oct 05, 2017 at 04:03:37PM -0700, Jacob Pan wrote: > > DMA faults can be detected by IOMMU at device level. Adding a pointer > > to struct device allows IOMMU subsystem to report relevant faults > > back to the device

Re: [PATCH v2 09/16] driver core: add iommu device fault reporting data

2017-10-06 Thread Christoph Hellwig
On Thu, Oct 05, 2017 at 04:03:37PM -0700, Jacob Pan wrote: > DMA faults can be detected by IOMMU at device level. Adding a pointer > to struct device allows IOMMU subsystem to report relevant faults > back to the device driver for further handling. > For direct assigned device (or user space

Re: [PATCH v2 09/16] driver core: add iommu device fault reporting data

2017-10-05 Thread Greg Kroah-Hartman
On Thu, Oct 05, 2017 at 04:03:37PM -0700, Jacob Pan wrote: > DMA faults can be detected by IOMMU at device level. Adding a pointer > to struct device allows IOMMU subsystem to report relevant faults > back to the device driver for further handling. > For direct assigned device (or user space

[PATCH v2 09/16] driver core: add iommu device fault reporting data

2017-10-05 Thread Jacob Pan
DMA faults can be detected by IOMMU at device level. Adding a pointer to struct device allows IOMMU subsystem to report relevant faults back to the device driver for further handling. For direct assigned device (or user space drivers), guest OS holds responsibility to handle and respond per device