[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 5/8] VFIO: Add new IOTCL for PASID Table bin
From: |
Liu, Yi L |
Subject: |
Re: [Qemu-devel] [RFC PATCH 5/8] VFIO: Add new IOTCL for PASID Table bind propagation |
Date: |
Thu, 27 Apr 2017 13:43:32 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Apr 26, 2017 at 05:56:50PM +0100, Jean-Philippe Brucker wrote:
> On 26/04/17 11:12, Liu, Yi L wrote:
> > From: "Liu, Yi L" <address@hidden>
> >
> > This patch adds VFIO_IOMMU_SVM_BIND_TASK for potential PASID table
> > binding requests.
> >
> > On VT-d, this IOCTL cmd would be used to link the guest PASID page table
> > to host. While for other vendors, it may also be used to support other
> > kind of SVM bind request. Previously, there is a discussion on it with
> > ARM engineer. It can be found by the link below. This IOCTL cmd may
> > support SVM PASID bind request from userspace driver, or page table(cr3)
> > bind request from guest. These SVM bind requests would be supported by
> > adding different flags. e.g. VFIO_SVM_BIND_PASID is added to support
> > PASID bind from userspace driver, VFIO_SVM_BIND_PGTABLE is added to
> > support page table bind from guest.
> >
> > https://patchwork.kernel.org/patch/9594231/
> >
> > Signed-off-by: Liu, Yi L <address@hidden>
> > ---
> > include/uapi/linux/vfio.h | 17 +++++++++++++++++
> > 1 file changed, 17 insertions(+)
> >
> > diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
> > index 519eff3..6b97987 100644
> > --- a/include/uapi/linux/vfio.h
> > +++ b/include/uapi/linux/vfio.h
> > @@ -547,6 +547,23 @@ struct vfio_iommu_type1_dma_unmap {
> > #define VFIO_IOMMU_ENABLE _IO(VFIO_TYPE, VFIO_BASE + 15)
> > #define VFIO_IOMMU_DISABLE _IO(VFIO_TYPE, VFIO_BASE + 16)
> >
> > +/* IOCTL for Shared Virtual Memory Bind */
> > +struct vfio_device_svm {
> > + __u32 argsz;
> > +#define VFIO_SVM_BIND_PASIDTBL (1 << 0) /* Bind PASID Table */
> > +#define VFIO_SVM_BIND_PASID (1 << 1) /* Bind PASID from userspace
> > driver */
> > +#define VFIO_SVM_BIND_PGTABLE (1 << 2) /* Bind guest mmu page table */
> > + __u32 flags;
> > + __u32 length;
> > + __u8 data[];
> > +};
> > +
> > +#define VFIO_SVM_TYPE_MASK (VFIO_SVM_BIND_PASIDTBL | \
> > + VFIO_SVM_BIND_PASID | \
> > + VFIO_SVM_BIND_PGTABLE)
> > +
> > +#define VFIO_IOMMU_SVM_BIND_TASK _IO(VFIO_TYPE, VFIO_BASE + 22)
>
> This could be called "VFIO_IOMMU_SVM_BIND, since it will be used both to
> bind tables and individual tasks.
yes, it is. would modify it in next version.
Thanks,
Yi L
> Thanks,
> Jean
>
- Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function, (continued)
- Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function, Jean-Philippe Brucker, 2017/04/26
- Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function, Liu, Yi L, 2017/04/27
- Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function, Jean-Philippe Brucker, 2017/04/27
- Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function, Liu, Yi L, 2017/04/28
- Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function, Liu, Yi L, 2017/04/28
[Qemu-devel] [RFC PATCH 2/8] iommu/vt-d: add bind_pasid_table function, Liu, Yi L, 2017/04/26
[Qemu-devel] [RFC PATCH 3/8] iommu: Introduce iommu do invalidate API function, Liu, Yi L, 2017/04/26
[Qemu-devel] [RFC PATCH 4/8] iommu/vt-d: Add iommu do invalidate function, Liu, Yi L, 2017/04/26
[Qemu-devel] [RFC PATCH 5/8] VFIO: Add new IOTCL for PASID Table bind propagation, Liu, Yi L, 2017/04/26
[Qemu-devel] [RFC PATCH 6/8] VFIO: do pasid table binding, Liu, Yi L, 2017/04/26
[Qemu-devel] [RFC PATCH 8/8] VFIO: do IOMMU TLB invalidation from guest, Liu, Yi L, 2017/04/26
[Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation, Liu, Yi L, 2017/04/26