[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aD6BlXfuCGCOw4PM@yilunxu-OptiPlex-7050>
Date: Tue, 3 Jun 2025 13:01:09 +0800
From: Xu Yilun <yilun.xu@...ux.intel.com>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: kvm@...r.kernel.org, sumit.semwal@...aro.org, christian.koenig@....com,
pbonzini@...hat.com, seanjc@...gle.com, alex.williamson@...hat.com,
dan.j.williams@...el.com, aik@....com, linux-coco@...ts.linux.dev,
dri-devel@...ts.freedesktop.org, linux-media@...r.kernel.org,
linaro-mm-sig@...ts.linaro.org, vivek.kasireddy@...el.com,
yilun.xu@...el.com, linux-kernel@...r.kernel.org, lukas@...ner.de,
yan.y.zhao@...el.com, daniel.vetter@...ll.ch, leon@...nel.org,
baolu.lu@...ux.intel.com, zhenzhong.duan@...el.com,
tao1.su@...el.com, linux-pci@...r.kernel.org, zhiw@...dia.com,
simona.vetter@...ll.ch, shameerali.kolothum.thodi@...wei.com,
aneesh.kumar@...nel.org, iommu@...ts.linux.dev,
kevin.tian@...el.com
Subject: Re: [RFC PATCH 10/30] vfio/pci: Export vfio dma-buf specific info
for importers
On Mon, Jun 02, 2025 at 10:30:09AM -0300, Jason Gunthorpe wrote:
> On Thu, May 29, 2025 at 01:34:53PM +0800, Xu Yilun wrote:
> > Export vfio dma-buf specific info by attaching vfio_dma_buf_data in
> > struct dma_buf::priv. Provide a helper vfio_dma_buf_get_data() for
> > importers to fetch these data. Exporters identify VFIO dma-buf by
> > successfully getting these data.
> >
> > VFIO dma-buf supports disabling host access to these exported MMIO
> > regions when the device is converted to private. Exporters like KVM
> > need to identify this type of dma-buf to decide if it is good to use.
> > KVM only allows host unaccessible MMIO regions been mapped in private
> > roots.
> >
> > Export struct kvm * handler attached to the vfio device. This
> > allows KVM to do another sanity check. MMIO should only be assigned to
> > a CoCo VM if its owner device is already assigned to the same VM.
>
> This doesn't seem right, it should be encapsulated into the standard
> DMABUF API in some way.
OK.
>
> Jason
Powered by blists - more mailing lists