On Wed, 2016-02-03 at 11:35 +0000, David Woodhouse wrote: > > In the ideal case, there's no need for the device driver to get > involved at all. When a page isn't found in the page tables, the IOMMU > code calls handle_mm_fault() and either populates the page and sends a > a 'success' response, or sends an 'invalid fault' response back. I missed a bit here; I should have made it explicit: The device hardware receives that page-request response, successful or otherwise, and is supposed to act on it accordingly. The device's own request then fails, and it should have some coherent way of reporting that to the device driver. The point is that there should be no need to 'short-circuit' that and pass notification directly from the IOMMU code to the device driver that "there was a fault on PASID x". That direct notification hack doesn't even *tell* us which device-side context was affected, if there's more than one context accessing a given PASID. (Actually, in the Intel case for integrated devices, there *are* some opaque¹ bits in the page-request which do include that information. But that's horrid, and not a solution for the general case.) -- David Woodhouse Open Source Technology Centre David.Woodhouse@xxxxxxxxx Intel Corporation ¹ to the IOMMU code.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature