Re: [RFCv2 PATCH 09/36] iommu/fault: Allow blocking fault handlers

2017-11-29 Thread Yisheng Xie
hi jean, On 2017/11/29 23:01, Jean-Philippe Brucker wrote: > Hello, > > On 29/11/17 06:15, Yisheng Xie wrote: >> Hi Jean, >> >> On 2017/10/6 21:31, Jean-Philippe Brucker wrote: >>> - if (domain->ext_handler) { >>> + if (domain->handler_flags & IOMMU_FAULT_HANDLER_ATOMIC) { >>> + fau

Re: [RFCv2 PATCH 09/36] iommu/fault: Allow blocking fault handlers

2017-11-29 Thread Jean-Philippe Brucker
Hello, On 29/11/17 06:15, Yisheng Xie wrote: > Hi Jean, > > On 2017/10/6 21:31, Jean-Philippe Brucker wrote: >> -if (domain->ext_handler) { >> +if (domain->handler_flags & IOMMU_FAULT_HANDLER_ATOMIC) { >> +fault->flags |= IOMMU_FAULT_ATOMIC; > > Why remove the condition of do

Re: [RFCv2 PATCH 09/36] iommu/fault: Allow blocking fault handlers

2017-11-28 Thread Yisheng Xie
Hi Jean, On 2017/10/6 21:31, Jean-Philippe Brucker wrote: > - if (domain->ext_handler) { > + if (domain->handler_flags & IOMMU_FAULT_HANDLER_ATOMIC) { > + fault->flags |= IOMMU_FAULT_ATOMIC; Why remove the condition of domain->ext_handler? should it be much better like: if (

[RFCv2 PATCH 09/36] iommu/fault: Allow blocking fault handlers

2017-10-06 Thread Jean-Philippe Brucker
Allow device driver to register their fault handler at various stages of the handling path, by adding flags to iommu_set_ext_fault_handler. Since we now have a fault workqueue, it is quite easy to call their handler from thread context instead of IRQ handler. A driver can request to be called both