Hi Lennert,
On Mon, Jul 19, 2021 at 12:54:43PM +0300, Lennert Buytenhek wrote:
> + if (dev_data) {
> + int report_flags;
> +
> + /*
> + * AMD I/O Virtualization Technology (IOMMU) Specification,
> + * revision 3.00, section 2.5.3 ("IO_PAGE_FAULT Event") says
> + * that the RW ("read-write") bit is only valid if the I/O
> + * page fault was caused by a memory transaction request
> + * referencing a page that was marked present.
> + */
> + report_flags = 0;
> + if ((flags & (EVENT_FLAG_TR | EVENT_FLAG_PR | EVENT_FLAG_I)) ==
> + EVENT_FLAG_PR) {
> + if (flags & EVENT_FLAG_RW)
> + report_flags |= IOMMU_FAULT_WRITE;
> + else
> + report_flags |= IOMMU_FAULT_READ;
> + }
> +
> + if (!report_iommu_fault(&dev_data->domain->domain,
> + &pdev->dev, address, report_flags))
> + goto out;
> + }
I'd like to limit calling report_iommu_fault() to dma-faults and leave
IRQ remapping faults unreported. The IOMMU layer does not really care a
lot about IRQs and a potential domain handler will also not be prepared
to handler IRQ specific faults (there is no generic way to detect them).
Regards,
Joerg
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu