[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 05/21] vfio/iommufd: Relax assert check for iommufd backen
|
From: |
Eric Auger |
|
Subject: |
Re: [PATCH v6 05/21] vfio/iommufd: Relax assert check for iommufd backend |
|
Date: |
Wed, 15 Nov 2023 14:56:02 +0100 |
|
User-agent: |
Mozilla Thunderbird |
On 11/14/23 11:09, Zhenzhong Duan wrote:
> Currently iommufd doesn't support dirty page sync yet,
> but it will not block us doing live migration if VFIO
> migration is force enabled.
>
> So in this case we allow set_dirty_page_tracking to be NULL.
> Note we don't need same change for query_dirty_bitmap because
> when dirty page sync isn't supported, query_dirty_bitmap will
> never be called.
>
> Suggested-by: Cédric Le Goater <clg@redhat.com>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
> Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Eric
> ---
> hw/vfio/container-base.c | 4 ++++
> hw/vfio/container.c | 4 ----
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/vfio/container-base.c b/hw/vfio/container-base.c
> index 71f7274973..eee2dcfe76 100644
> --- a/hw/vfio/container-base.c
> +++ b/hw/vfio/container-base.c
> @@ -55,6 +55,10 @@ void vfio_container_del_section_window(VFIOContainerBase
> *bcontainer,
> int vfio_container_set_dirty_page_tracking(VFIOContainerBase *bcontainer,
> bool start)
> {
> + if (!bcontainer->dirty_pages_supported) {
> + return 0;
> + }
> +
> g_assert(bcontainer->ops->set_dirty_page_tracking);
> return bcontainer->ops->set_dirty_page_tracking(bcontainer, start);
> }
> diff --git a/hw/vfio/container.c b/hw/vfio/container.c
> index 6bacf38222..ed2d721b2b 100644
> --- a/hw/vfio/container.c
> +++ b/hw/vfio/container.c
> @@ -216,10 +216,6 @@ static int
> vfio_legacy_set_dirty_page_tracking(VFIOContainerBase *bcontainer,
> .argsz = sizeof(dirty),
> };
>
> - if (!bcontainer->dirty_pages_supported) {
> - return 0;
> - }
> -
> if (start) {
> dirty.flags = VFIO_IOMMU_DIRTY_PAGES_FLAG_START;
> } else {
- RE: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object, (continued)
Re: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object, Eric Auger, 2023/11/15
[PATCH v6 02/21] util/char_dev: Add open_cdev(), Zhenzhong Duan, 2023/11/14
[PATCH v6 03/21] vfio/common: return early if space isn't empty, Zhenzhong Duan, 2023/11/14
[PATCH v6 05/21] vfio/iommufd: Relax assert check for iommufd backend, Zhenzhong Duan, 2023/11/14
- Re: [PATCH v6 05/21] vfio/iommufd: Relax assert check for iommufd backend,
Eric Auger <=
[PATCH v6 04/21] vfio/iommufd: Implement the iommufd backend, Zhenzhong Duan, 2023/11/14
[PATCH v6 07/21] vfio/pci: Extract out a helper vfio_pci_get_pci_hot_reset_info, Zhenzhong Duan, 2023/11/14
[PATCH v6 06/21] vfio/iommufd: Add support for iova_ranges and pgsizes, Zhenzhong Duan, 2023/11/14
[PATCH v6 08/21] vfio/pci: Introduce a vfio pci hot reset interface, Zhenzhong Duan, 2023/11/14