lkml.org 
[lkml]   [2021]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC 0/7] Support in-kernel DMA with PASID and SVA
    On Wed, Sep 29, 2021 at 12:37:19PM -0700, Jacob Pan wrote:

    > For #2, it seems we can store the kernel PASID in struct device. This will
    > preserve the DMA API interface while making it PASID capable. Essentially,
    > each PASID capable device would have two special global PASIDs:
    > - PASID 0 for DMA request w/o PASID, aka RID2PASID
    > - PASID 1 (randomly selected) for in-kernel DMA request w/ PASID

    This seems reasonable, I had the same thought. Basically just have the
    driver issue some trivial call:
    pci_enable_pasid_dma(pdev, &pasid)

    And then DMA tagged with the PASID will be handled equivilant to
    untagged DMA. Basically PASID and no PASID point to the exact same IO
    page table and the DMA API manipulates that single page table.

    Having multiple RID's pointing at the same IO page table is something
    we expect iommufd to require so the whole thing should ideally fall
    out naturally.

    Jason

    \
     
     \ /
      Last update: 2021-09-29 21:41    [W:4.609 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site