Re: [PATCH 07/37] iommu: Add a page fault handler

2018-03-14 Thread Jean-Philippe Brucker
Hi Jonathan, Thanks for reviewing On 08/03/18 15:40, Jonathan Cameron wrote: >> +/** >> + * iommu_fault_queue_unregister() - Unregister an IOMMU driver from the >> fault >> + * queue. >> + * @flush_notifier: same parameter as iommu_fault_queue_register >> + */ >> +void iommu_fault_queue_unregist

Re: [PATCH 07/37] iommu: Add a page fault handler

2018-03-08 Thread Jonathan Cameron
On Mon, 12 Feb 2018 18:33:22 + Jean-Philippe Brucker wrote: > Some systems allow devices to handle IOMMU translation faults in the core > mm. For example systems supporting the PCI PRI extension or Arm SMMU stall > model. Infrastructure for reporting such recoverable page faults was > recentl

Re: [PATCH 07/37] iommu: Add a page fault handler

2018-03-06 Thread okaya
On 2018-03-06 05:46, Jean-Philippe Brucker wrote: On 05/03/18 21:53, Sinan Kaya wrote: On 2/12/2018 1:33 PM, Jean-Philippe Brucker wrote: +static struct workqueue_struct *iommu_fault_queue; Is there anyway we can make this fault queue per struct device? Since this is common code, I think it n

Re: [PATCH 07/37] iommu: Add a page fault handler

2018-03-06 Thread Jean-Philippe Brucker
On 05/03/18 21:53, Sinan Kaya wrote: > On 2/12/2018 1:33 PM, Jean-Philippe Brucker wrote: >> +static struct workqueue_struct *iommu_fault_queue; > > Is there anyway we can make this fault queue per struct device? > Since this is common code, I think it needs some care. I don't think it's better,

Re: [PATCH 07/37] iommu: Add a page fault handler

2018-03-06 Thread Jean-Philippe Brucker
On 05/03/18 21:44, Sinan Kaya wrote: > On 2/12/2018 1:33 PM, Jean-Philippe Brucker wrote: >> +static int iommu_queue_fault(struct iommu_domain *domain, struct device >> *dev, >> + struct iommu_fault_event *evt) >> +{ >> +struct iommu_fault_group *group; >> +struct i

Re: [PATCH 07/37] iommu: Add a page fault handler

2018-03-05 Thread Sinan Kaya
On 2/12/2018 1:33 PM, Jean-Philippe Brucker wrote: > +static struct workqueue_struct *iommu_fault_queue; Is there anyway we can make this fault queue per struct device? Since this is common code, I think it needs some care. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of

Re: [PATCH 07/37] iommu: Add a page fault handler

2018-03-05 Thread Sinan Kaya
On 2/12/2018 1:33 PM, Jean-Philippe Brucker wrote: > +static int iommu_queue_fault(struct iommu_domain *domain, struct device *dev, > + struct iommu_fault_event *evt) > +{ > + struct iommu_fault_group *group; > + struct iommu_fault_context *fault, *next; > + > +

Re: [PATCH 07/37] iommu: Add a page fault handler

2018-02-15 Thread Jean-Philippe Brucker
On 14/02/18 07:18, Jacob Pan wrote: [...] >> +/* Used to store incomplete fault groups */ >> +static LIST_HEAD(iommu_partial_faults); >> +static DEFINE_SPINLOCK(iommu_partial_faults_lock); >> + > should partial fault list be per iommu? That would be good, but I don't see an easy way to retrieve th

Re: [PATCH 07/37] iommu: Add a page fault handler

2018-02-13 Thread Jacob Pan
On Mon, 12 Feb 2018 18:33:22 + Jean-Philippe Brucker wrote: > Some systems allow devices to handle IOMMU translation faults in the > core mm. For example systems supporting the PCI PRI extension or Arm > SMMU stall model. Infrastructure for reporting such recoverable page > faults was recentl

[PATCH 07/37] iommu: Add a page fault handler

2018-02-12 Thread Jean-Philippe Brucker
Some systems allow devices to handle IOMMU translation faults in the core mm. For example systems supporting the PCI PRI extension or Arm SMMU stall model. Infrastructure for reporting such recoverable page faults was recently added to the IOMMU core, for SVA virtualization. Extend iommu_report_dev