lkml.org 
[lkml]   [2023]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH v1 14/14] iommu/arm-smmu-v3: Add arm_smmu_cache_invalidate_user
    Date
    > From: Jason Gunthorpe <jgg@nvidia.com>
    > Sent: Friday, March 24, 2023 10:45 PM
    >
    > > But still the main open for in-kernel short-path is what would be the
    > > framework to move part of vIOMMU emulation into the kernel. If this
    > > can be done cleanly then it's better than vhost-iommu which lacks
    > > behind significantly regarding to advanced features. But if it cannot
    > > be done cleanly leaving each vendor move random emulation logic
    > > into the kernel then vhost-iommu sounds more friendly to the kernel
    > > though lots of work remains to fill the feature gap.
    >
    > I assume there are reasonable ways to hook the kernel to kvm, vhost
    > does it. I've never looked at it. At worst we need to factor some of
    > the vhost code into some library to allow it.
    >
    > We want a kernel thread to wakeup on a doorbell ring basically.
    >

    kvm supports ioeventfd for the doorbell purpose.

    Aside from that I'm not sure which part of vhost can be generalized
    to be used by other vIOMMU. it's a in-memory ring structure plus
    doorbell so it's easy to fit in the kernel.

    But emulated vIOMMUs are typically MMIO-based ring structure
    which requires 1) kvm provides a synchronous ioeventfd for MMIO
    based head/tail emulation; 2) userspace vIOMMU shares its virtual
    register page with the kernel which can then update virtual tail/head
    registers w/o exiting to the userspace; 3) the kernel thread can
    selectively exit to userspace for cmds which it cannot directly handle.

    Those require a new framework to establish.

    \
     
     \ /
      Last update: 2023-03-28 04:50    [W:4.082 / U:0.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site