[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZnDGqww5SLbVD6ET@yilunxu-OptiPlex-7050>
Date: Tue, 18 Jun 2024 07:28:43 +0800
From: Xu Yilun <yilun.xu@...ux.intel.com>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: kvm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-media@...r.kernel.org, linaro-mm-sig@...ts.linaro.org,
sumit.semwal@...aro.org, christian.koenig@....com,
pbonzini@...hat.com, seanjc@...gle.com, alex.williamson@...hat.com,
vivek.kasireddy@...el.com, dan.j.williams@...el.com, aik@....com,
yilun.xu@...el.com, linux-coco@...ts.linux.dev,
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
Subject: Re: [RFC PATCH 08/12] vfio/pci: Create host unaccessible dma-buf for
private device
On Mon, Jan 13, 2025 at 12:49:35PM -0400, Jason Gunthorpe wrote:
> On Sat, Jan 11, 2025 at 11:48:06AM +0800, Xu Yilun wrote:
>
> > > > > can be sure what is the correct UAPI. In other words, make the
> > > > > VFIO device into a CC device should also prevent mmaping it and so on.
> > > >
> > > > My idea is prevent mmaping first, then allow VFIO device into CC dev (TDI).
> > >
> > > I think you need to start the TDI process much earlier. Some arches
> > > are going to need work to prepare the TDI before the VM is started.
> >
> > Could you elaborate more on that? AFAICS Intel & AMD are all good on
> > "late bind", but not sure for other architectures.
>
> I'm not sure about this, the topic has been confused a bit, and people
> often seem to misunderstand what the full scenario actually is. :\
Yes, it is in early stage and open to discuss.
>
> What I'm talking abou there is that you will tell the secure world to
> create vPCI function that has the potential to be secure "TDI run"
> down the road. The VM will decide when it reaches the run state. This
Yes.
> is needed so the secure world can prepare anything it needs prior to
> starting the VM.
OK. From Dan's patchset there are some touch point for vendor tsm
drivers to do secure world preparation. e.g. pci_tsm_ops::probe().
Maybe we could move to Dan's thread for discussion.
https://lore.kernel.org/linux-coco/173343739517.1074769.13134786548545925484.stgit@dwillia2-xfh.jf.intel.com/
> Setting up secure vIOMMU emulation, for instance. I
I think this could be done at VM late bind time.
> expect ARM will need this, I'd be surprised if AMD actually doesn't in
> the full scenario with secure viommu.
AFAICS, AMD needs secure viommu.
>
> It should not be a surprise to the secure world after the VM has
> started that suddenly it learns about a vPCI function that wants to be
With some pre-VM stage touch point, it wouldn't be all of a sudden.
> secure. This should all be pre-arranged as possible before starting
But our current implementation is not to prepare as much as possible,
but only necessary, so most of the secure work for vPCI function is done
at late bind time.
Thank,
Yilun
> the VM, even if alot of steps happen after the VM starts running (or
> maybe don't happen at all).
>
> Jason
Powered by blists - more mailing lists