qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v1 08/22] vfio: init HostIOMMUContext per-container


From: Liu, Yi L
Subject: RE: [PATCH v1 08/22] vfio: init HostIOMMUContext per-container
Date: Tue, 24 Mar 2020 13:03:28 +0000

> From: Peter Xu <address@hidden>
> Sent: Tuesday, March 24, 2020 5:40 AM
> To: Liu, Yi L <address@hidden>
> Subject: Re: [PATCH v1 08/22] vfio: init HostIOMMUContext per-container
> 
> On Sun, Mar 22, 2020 at 05:36:05AM -0700, Liu Yi L wrote:
> > After confirming dual stage DMA translation support with kernel by
> > checking VFIO_TYPE1_NESTING_IOMMU, VFIO inits HostIOMMUContet instance
> > and exposes it to PCI layer. Thus vIOMMU emualtors may make use of
> > such capability by leveraging the methods provided by HostIOMMUContext.
> >
> > Cc: Kevin Tian <address@hidden>
> > Cc: Jacob Pan <address@hidden>
> > Cc: Peter Xu <address@hidden>
> > Cc: Eric Auger <address@hidden>
> > Cc: Yi Sun <address@hidden>
> > Cc: David Gibson <address@hidden>
> > Cc: Alex Williamson <address@hidden>
> > Signed-off-by: Liu Yi L <address@hidden>
> > ---
> >  hw/vfio/common.c                      | 80 
> > +++++++++++++++++++++++++++++++++++
> >  hw/vfio/pci.c                         | 13 ++++++
> >  include/hw/iommu/host_iommu_context.h |  3 ++
> >  include/hw/vfio/vfio-common.h         |  4 ++
> >  4 files changed, 100 insertions(+)
> >
> > diff --git a/hw/vfio/common.c b/hw/vfio/common.c
> > index c276732..e4f5f10 100644
> > --- a/hw/vfio/common.c
> > +++ b/hw/vfio/common.c
> > @@ -1179,10 +1179,55 @@ static int vfio_get_iommu_type(VFIOContainer
> *container,
> >      return -EINVAL;
> >  }
> >
> > +static int vfio_host_icx_pasid_alloc(HostIOMMUContext *host_icx,
> 
> I'm not sure about Alex, but ... icx is confusing to me.  Maybe "ctx"
> as you always used?

At first I used vfio_host_iommu_ctx_pasid_alloc(), found it is long, so I
switched to "icx" which means iommu_context. Maybe the former one
looks better as it gives more precise info.

Regards,
Yi Liu

reply via email to

[Prev in Thread] Current Thread [Next in Thread]