lkml.org 
[lkml]   [2022]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v5 01/14] iommu: Add dma ownership management interfaces
    From
    Date
    Hi Bjorn,

    On 1/5/22 12:41 AM, Bjorn Helgaas wrote:
    >>> This adds dma ownership management in iommu core and exposes several
    >>> interfaces for the device drivers and the device userspace assignment
    >>> framework (i.e. vfio), so that any conflict between user and kernel
    >>> controlled DMA could be detected at the beginning.
    > Maybe I'm missing the point because I don't know what "conflict
    > between user and kernel controlled DMA" is. Are you talking about
    > both userspace and the kernel programming the same device to do DMA?

    It's about both userspace and kernel programming different devices
    belonging to a same iommu group to do DMA. For example, PCI device A and
    B sit in a some iommu group. Userspace programs device A for DMA and a
    kernel driver programs device B. Userspace may intentionally or
    unintentionally program device A to access and change device B's MMIO
    with P2P DMA transactions which cause the kernel driver for device B
    result in an inconsistent state.

    This may not be all, just an example.

    Best regards,
    baolu

    \
     
     \ /
      Last update: 2022-01-06 04:45    [W:2.255 / U:0.104 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site