[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v4 21/24] vfio/as: Add vfio device iterator callback for
From: |
Nicolin Chen |
Subject: |
Re: [RFC PATCH v4 21/24] vfio/as: Add vfio device iterator callback for iommufd |
Date: |
Wed, 16 Aug 2023 22:48:32 -0700 |
On Wed, Jul 12, 2023 at 03:25:25PM +0800, Zhenzhong Duan wrote:
> The way to get vfio device pointer is different between legacy
> container and iommufd container, with iommufd backend support
> added, it's time to add the iterator support for iommufd.
>
> In order to implement it, a pointer to hwpt is added in vbasedev.
[...]
> diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
> index 6434a442fd..d596e802b0 100644
> --- a/include/hw/vfio/vfio-common.h
> +++ b/include/hw/vfio/vfio-common.h
> @@ -133,6 +133,7 @@ typedef struct VFIODevice {
> #ifdef CONFIG_IOMMUFD
> int devid;
> IOMMUFDBackend *iommufd;
> + VFIOIOASHwpt *hwpt;
I don't feel quite confident about this, since a patch prior just
added the following function:
+static VFIOIOASHwpt *vfio_find_hwpt_for_dev(VFIOIOMMUFDContainer *container,
+ VFIODevice *vbasedev)
This feels a bit of conflict in the same series. Mind elaborating?
Thanks
Nicolin
- Re: [RFC PATCH v4 21/24] vfio/as: Add vfio device iterator callback for iommufd,
Nicolin Chen <=