Re: [PATCH v2] iommu/amd: Use report_iommu_fault()

2021-09-25 Thread Lennert Buytenhek
On Sat, Aug 21, 2021 at 06:44:39PM +0300, Lennert Buytenhek wrote: > > > - EVENT_FLAG_I unset, but the request was a translation request > > > (EVENT_FLAG_TR set) or the target page was not present > > > (EVENT_FLAG_PR unset): call report_iommu_fault(), but the RW > > > bit will be invalid,

Re: [PATCH v2] iommu/amd: Use report_iommu_fault()

2021-08-21 Thread Lennert Buytenhek
On Thu, Aug 05, 2021 at 11:26:25AM -0500, Suthikulpanit, Suravee wrote: > Lennert, Hi Suravee, > > - EVENT_FLAG_I unset, but the request was a translation request > > (EVENT_FLAG_TR set) or the target page was not present > > (EVENT_FLAG_PR unset): call report_iommu_fault(), but the RW > >

Re: [PATCH v2] iommu/amd: Use report_iommu_fault()

2021-08-05 Thread Suthikulpanit, Suravee via iommu
Lennert, On 7/29/2021 9:32 PM, Lennert Buytenhek wrote: We have three cases to handle: - EVENT_FLAG_I set: IRQ remapping fault, don't call report_iommu_fault() - EVENT_FLAG_I unset, but the request was a translation request (EVENT_FLAG_TR set) or the target page was not present

Re: [PATCH v2] iommu/amd: Use report_iommu_fault()

2021-08-03 Thread Lennert Buytenhek
On Fri, Jul 30, 2021 at 05:32:16AM +0300, Lennert Buytenhek wrote: > > > This patch makes iommu/amd call report_iommu_fault() when an I/O page > > > fault occurs, which has two effects: > > > > > > 1) It allows device drivers to register a callback to be notified of > > > I/O page faults,

Re: [PATCH v2] iommu/amd: Use report_iommu_fault()

2021-07-29 Thread Lennert Buytenhek
On Wed, Jul 28, 2021 at 04:51:27PM -0500, Suthikulpanit, Suravee wrote: > Lennert, Hi Suravee, > > This patch makes iommu/amd call report_iommu_fault() when an I/O page > > fault occurs, which has two effects: > > > > 1) It allows device drivers to register a callback to be notified of > >

Re: [PATCH v2] iommu/amd: Use report_iommu_fault()

2021-07-28 Thread Suthikulpanit, Suravee via iommu
Lennert, On 7/26/2021 11:31 AM, Lennert Buytenhek wrote: This patch makes iommu/amd call report_iommu_fault() when an I/O page fault occurs, which has two effects: 1) It allows device drivers to register a callback to be notified of I/O page faults, via the iommu_set_fault_handler() API.

[PATCH v2] iommu/amd: Use report_iommu_fault()

2021-07-26 Thread Lennert Buytenhek
This patch makes iommu/amd call report_iommu_fault() when an I/O page fault occurs, which has two effects: 1) It allows device drivers to register a callback to be notified of I/O page faults, via the iommu_set_fault_handler() API. 2) It triggers the io_page_fault tracepoint in