All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@redhat.com>
To: Zhenzhong Duan <zhenzhong.duan@intel.com>, qemu-devel@nongnu.org
Cc: alex.williamson@redhat.com, clg@redhat.com, peterx@redhat.com,
	jasowang@redhat.com, mst@redhat.com, jgg@nvidia.com,
	nicolinc@nvidia.com, joao.m.martins@oracle.com,
	kevin.tian@intel.com, yi.l.liu@intel.com, yi.y.sun@intel.com,
	chao.p.peng@intel.com
Subject: Re: [PATCH v1 00/11] Add a host IOMMU device abstraction
Date: Mon, 18 Mar 2024 15:57:34 +0100	[thread overview]
Message-ID: <0d8cba1e-a422-421b-9c02-c60452cf5f80@redhat.com> (raw)
In-Reply-To: <20240228035900.1085727-1-zhenzhong.duan@intel.com>



On 2/28/24 04:58, Zhenzhong Duan wrote:
> Hi,
>
> Based on Joao's suggestion, the iommufd nesting prerequisite series [1]
> is further splitted to host IOMMU device abstract part and vIOMMU
> check/sync part. This series implements the 1st part.
>
> This split also faciliates the dirty tracking series [2] and virtio-iommu
> series [3] to depend on 1st part.
>
> PATCH1-3: Introduce HostIOMMUDevice and two sub class
> PATCH4: Define HostIOMMUDevice handle in VFIODevice
> PATCH5-8: Introdcue host_iommu_device_create callback to allocate and intialize HostIOMMUDevice
Introduce, here and below

Eric
> PATCH9-10: Introdcue set/unset_iommu_device to pass HostIOMMUDevice to vIOMMU
> PATCH11: a helper to get host IOMMU info
>
> Because it's becoming clear on community's suggestion, I'd like to remove
> rfc tag from this version.
>
> Qemu code can be found at:
> https://github.com/yiliu1765/qemu/tree/zhenzhong/iommufd_nesting_preq_part1_v1
>
> [1] https://lore.kernel.org/qemu-devel/20240201072818.327930-1-zhenzhong.duan@intel.com/
> [2] https://lore.kernel.org/qemu-devel/20240212135643.5858-1-joao.m.martins@oracle.com/
> [3] https://lore.kernel.org/qemu-devel/20240117080414.316890-1-eric.auger@redhat.com/
>
> Thanks
> Zhenzhong
>
> Changelog:
> v1:
> - use HostIOMMUDevice handle instead of union in VFIODevice (Eric)
> - change host_iommu_device_init to host_iommu_device_create
> - allocate HostIOMMUDevice in host_iommu_device_create callback
>   and set the VFIODevice base_hdev handle (Eric)
> - refine pci_device_set/unset_iommu_device doc (Eric)
> - use HostIOMMUDevice handle instead of union in VTDHostIOMMUDevice (Eric)
>
> rfcv2:
> - introduce common abstract HostIOMMUDevice and sub struct for different BEs (Eric, Cédric)
> - remove iommufd_device.[ch] (Cédric)
> - remove duplicate iommufd/devid define from VFIODevice (Eric)
> - drop the p in aliased_pbus and aliased_pdevfn (Eric)
> - assert devfn and iommu_bus in pci_device_get_iommu_bus_devfn (Cédric, Eric)
> - use errp in iommufd_device_get_info (Eric)
> - split and simplify cap/ecap check/sync code in intel_iommu.c (Cédric)
> - move VTDHostIOMMUDevice declaration to intel_iommu_internal.h (Cédric)
> - make '(vtd->cap_reg >> 16) & 0x3fULL' a MACRO and add missed '+1' (Cédric)
> - block migration if vIOMMU cap/ecap updated based on host IOMMU cap/ecap
> - add R-B
>
>
> Yi Liu (1):
>   hw/pci: Introduce pci_device_set/unset_iommu_device()
>
> Zhenzhong Duan (10):
>   Introduce a common abstract struct HostIOMMUDevice
>   backends/iommufd: Introduce IOMMUFDDevice
>   vfio: Introduce IOMMULegacyDevice
>   vfio: Add HostIOMMUDevice handle into VFIODevice
>   vfio: Introduce host_iommu_device_create callback
>   vfio/container: Implement host_iommu_device_create callback in legacy
>     mode
>   vfio/iommufd: Implement host_iommu_device_create callback in iommufd
>     mode
>   vfio/pci: Allocate and initialize HostIOMMUDevice after attachment
>   vfio: Pass HostIOMMUDevice to vIOMMU
>   backends/iommufd: Introduce helper function iommufd_device_get_info()
>
>  include/hw/pci/pci.h                  | 38 +++++++++++++++-
>  include/hw/vfio/vfio-common.h         |  8 ++++
>  include/hw/vfio/vfio-container-base.h |  1 +
>  include/sysemu/host_iommu_device.h    | 22 ++++++++++
>  include/sysemu/iommufd.h              | 19 ++++++++
>  backends/iommufd.c                    | 32 +++++++++++++-
>  hw/pci/pci.c                          | 62 +++++++++++++++++++++++++--
>  hw/vfio/common.c                      |  8 ++++
>  hw/vfio/container.c                   |  9 ++++
>  hw/vfio/iommufd.c                     | 10 +++++
>  hw/vfio/pci.c                         | 24 ++++++++---
>  11 files changed, 223 insertions(+), 10 deletions(-)
>  create mode 100644 include/sysemu/host_iommu_device.h
>



  parent reply	other threads:[~2024-03-18 14:58 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28  3:58 [PATCH v1 00/11] Add a host IOMMU device abstraction Zhenzhong Duan
2024-02-28  3:58 ` [PATCH v1 01/11] Introduce a common abstract struct HostIOMMUDevice Zhenzhong Duan
2024-03-18 14:23   ` Eric Auger
2024-03-19  3:48     ` Duan, Zhenzhong
2024-03-19  8:16   ` Cédric Le Goater
2024-03-19 11:58     ` Duan, Zhenzhong
2024-03-27 10:25       ` Cédric Le Goater
2024-03-28  3:06         ` Duan, Zhenzhong
2024-03-29 15:30           ` Cédric Le Goater
2024-04-01  3:59             ` Duan, Zhenzhong
2024-02-28  3:58 ` [PATCH v1 02/11] backends/iommufd: Introduce IOMMUFDDevice Zhenzhong Duan
2024-02-28  3:58 ` [PATCH v1 03/11] vfio: Introduce IOMMULegacyDevice Zhenzhong Duan
2024-02-28  3:58 ` [PATCH v1 04/11] vfio: Add HostIOMMUDevice handle into VFIODevice Zhenzhong Duan
2024-03-18 13:49   ` Eric Auger
2024-03-19  3:05     ` Duan, Zhenzhong
2024-02-28  3:58 ` [PATCH v1 05/11] vfio: Introduce host_iommu_device_create callback Zhenzhong Duan
2024-03-18 13:52   ` Eric Auger
2024-03-18 14:23     ` Eric Auger
2024-03-19  3:14       ` Duan, Zhenzhong
2024-03-19  3:12     ` Duan, Zhenzhong
2024-03-18 14:32   ` Eric Auger
2024-03-19  5:44     ` Duan, Zhenzhong
2024-03-19  7:16       ` Eric Auger
2024-02-28  3:58 ` [PATCH v1 06/11] vfio/container: Implement host_iommu_device_create callback in legacy mode Zhenzhong Duan
2024-02-28  3:58 ` [PATCH v1 07/11] vfio/iommufd: Implement host_iommu_device_create callback in iommufd mode Zhenzhong Duan
2024-02-28  3:58 ` [PATCH v1 08/11] vfio/pci: Allocate and initialize HostIOMMUDevice after attachment Zhenzhong Duan
2024-03-18 14:27   ` Eric Auger
2024-03-19  3:46     ` Duan, Zhenzhong
2024-03-19  7:18       ` Eric Auger
2024-02-28  3:58 ` [PATCH v1 09/11] hw/pci: Introduce pci_device_set/unset_iommu_device() Zhenzhong Duan
2024-03-12 16:55   ` Michael S. Tsirkin
2024-03-12 17:10     ` Michael S. Tsirkin
2024-03-18 14:49   ` Eric Auger
2024-03-19  6:16     ` Duan, Zhenzhong
2024-02-28  3:58 ` [PATCH v1 10/11] vfio: Pass HostIOMMUDevice to vIOMMU Zhenzhong Duan
2024-02-28  3:59 ` [PATCH v1 11/11] backends/iommufd: Introduce helper function iommufd_device_get_info() Zhenzhong Duan
2024-03-18 14:54   ` Eric Auger
2024-03-18 15:09     ` Joao Martins
2024-03-18 15:11       ` Eric Auger
2024-03-19  6:25         ` Duan, Zhenzhong
2024-03-18 14:57 ` Eric Auger [this message]
2024-03-19  6:26   ` [PATCH v1 00/11] Add a host IOMMU device abstraction Duan, Zhenzhong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d8cba1e-a422-421b-9c02-c60452cf5f80@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=chao.p.peng@intel.com \
    --cc=clg@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=joao.m.martins@oracle.com \
    --cc=kevin.tian@intel.com \
    --cc=mst@redhat.com \
    --cc=nicolinc@nvidia.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yi.l.liu@intel.com \
    --cc=yi.y.sun@intel.com \
    --cc=zhenzhong.duan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.