Thread (233 messages) 233 messages, 15 authors, 2021-10-28

Re: [RFC] /dev/ioasid uAPI proposal

From: Jason Wang <jasowang@redhat.com>
Date: 2021-06-04 01:30:51
Also in: linux-iommu, lkml

在 2021/6/4 上午2:19, Jacob Pan 写道:
Hi Shenming,

On Wed, 2 Jun 2021 12:50:26 +0800, Shenming Lu [off-list ref]
wrote:
quoted
On 2021/6/2 1:33, Jason Gunthorpe wrote:
quoted
On Tue, Jun 01, 2021 at 08:30:35PM +0800, Lu Baolu wrote:
   
quoted
The drivers register per page table fault handlers to /dev/ioasid which
will then register itself to iommu core to listen and route the per-
device I/O page faults.
I'm still confused why drivers need fault handlers at all?
Essentially it is the userspace that needs the fault handlers,
one case is to deliver the faults to the vIOMMU, and another
case is to enable IOPF on the GPA address space for on-demand
paging, it seems that both could be specified in/through the
IOASID_ALLOC ioctl?
I would think IOASID_BIND_PGTABLE is where fault handler should be
registered. There wouldn't be any IO page fault without the binding anyway.

I also don't understand why device drivers should register the fault
handler, the fault is detected by the pIOMMU and injected to the vIOMMU. So
I think it should be the IOASID itself register the handler.

As discussed in another thread.

I think the reason is that ATS doesn't forbid the #PF to be reported via 
a device specific way.

Thanks

quoted
Thanks,
Shenming
Thanks,

Jacob
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help