>-----Original Message-----
>From: Steve Sistare <steven.sist...@oracle.com>
>Subject: [PATCH V4 08/43] vfio: move vfio-cpr.h
>
>Move vfio-cpr.h to include/hw/vfio, because it will need to be included by
>other files there.
>
>Signed-off-by: Steve Sistare <steven.sist...@oracle.com>
>Reviewed-by: Cédric Le Goater <c...@redhat.com>

Reviewed-by: Zhenzhong Duan <zhenzhong.d...@intel.com>

>---
> MAINTAINERS                |  1 +
> hw/vfio/vfio-cpr.h         | 15 ---------------
> include/hw/vfio/vfio-cpr.h | 18 ++++++++++++++++++
> hw/vfio/container.c        |  2 +-
> hw/vfio/cpr.c              |  2 +-
> hw/vfio/iommufd.c          |  2 +-
> 6 files changed, 22 insertions(+), 18 deletions(-)
> delete mode 100644 hw/vfio/vfio-cpr.h
> create mode 100644 include/hw/vfio/vfio-cpr.h
>
>diff --git a/MAINTAINERS b/MAINTAINERS
>index e29fb4f..7b919d7 100644
>--- a/MAINTAINERS
>+++ b/MAINTAINERS
>@@ -3034,6 +3034,7 @@ CheckPoint and Restart (CPR)
> R: Steve Sistare <steven.sist...@oracle.com>
> S: Supported
> F: hw/vfio/cpr*
>+F: include/hw/vfio/vfio-cpr.h
> F: include/migration/cpr.h
> F: migration/cpr*
> F: tests/qtest/migration/cpr*
>diff --git a/hw/vfio/vfio-cpr.h b/hw/vfio/vfio-cpr.h
>deleted file mode 100644
>index 134b83a..0000000
>--- a/hw/vfio/vfio-cpr.h
>+++ /dev/null
>@@ -1,15 +0,0 @@
>-/*
>- * VFIO CPR
>- *
>- * Copyright (c) 2025 Oracle and/or its affiliates.
>- *
>- * SPDX-License-Identifier: GPL-2.0-or-later
>- */
>-
>-#ifndef HW_VFIO_CPR_H
>-#define HW_VFIO_CPR_H
>-
>-bool vfio_cpr_register_container(VFIOContainerBase *bcontainer, Error **errp);
>-void vfio_cpr_unregister_container(VFIOContainerBase *bcontainer);
>-
>-#endif /* HW_VFIO_CPR_H */
>diff --git a/include/hw/vfio/vfio-cpr.h b/include/hw/vfio/vfio-cpr.h
>new file mode 100644
>index 0000000..750ea5b
>--- /dev/null
>+++ b/include/hw/vfio/vfio-cpr.h
>@@ -0,0 +1,18 @@
>+/*
>+ * VFIO CPR
>+ *
>+ * Copyright (c) 2025 Oracle and/or its affiliates.
>+ *
>+ * SPDX-License-Identifier: GPL-2.0-or-later
>+ */
>+
>+#ifndef HW_VFIO_VFIO_CPR_H
>+#define HW_VFIO_VFIO_CPR_H
>+
>+struct VFIOContainerBase;
>+
>+bool vfio_cpr_register_container(struct VFIOContainerBase *bcontainer,
>+                                 Error **errp);
>+void vfio_cpr_unregister_container(struct VFIOContainerBase *bcontainer);
>+
>+#endif /* HW_VFIO_VFIO_CPR_H */
>diff --git a/hw/vfio/container.c b/hw/vfio/container.c
>index a8c76eb..0f948d0 100644
>--- a/hw/vfio/container.c
>+++ b/hw/vfio/container.c
>@@ -33,8 +33,8 @@
> #include "qapi/error.h"
> #include "pci.h"
> #include "hw/vfio/vfio-container.h"
>+#include "hw/vfio/vfio-cpr.h"
> #include "vfio-helpers.h"
>-#include "vfio-cpr.h"
> #include "vfio-listener.h"
>
> #define TYPE_HOST_IOMMU_DEVICE_LEGACY_VFIO
>TYPE_HOST_IOMMU_DEVICE "-legacy-vfio"
>diff --git a/hw/vfio/cpr.c b/hw/vfio/cpr.c
>index 3214184..0210e76 100644
>--- a/hw/vfio/cpr.c
>+++ b/hw/vfio/cpr.c
>@@ -8,9 +8,9 @@
> #include "qemu/osdep.h"
> #include "hw/vfio/vfio-device.h"
> #include "migration/misc.h"
>+#include "hw/vfio/vfio-cpr.h"
> #include "qapi/error.h"
> #include "system/runstate.h"
>-#include "vfio-cpr.h"
>
> static int vfio_cpr_reboot_notifier(NotifierWithReturn *notifier,
>                                     MigrationEvent *e, Error **errp)
>diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
>index a8cc543..eb2f88d 100644
>--- a/hw/vfio/iommufd.c
>+++ b/hw/vfio/iommufd.c
>@@ -21,13 +21,13 @@
> #include "qapi/error.h"
> #include "system/iommufd.h"
> #include "hw/qdev-core.h"
>+#include "hw/vfio/vfio-cpr.h"
> #include "system/reset.h"
> #include "qemu/cutils.h"
> #include "qemu/chardev_open.h"
> #include "pci.h"
> #include "vfio-iommufd.h"
> #include "vfio-helpers.h"
>-#include "vfio-cpr.h"
> #include "vfio-listener.h"
>
> #define TYPE_HOST_IOMMU_DEVICE_IOMMUFD_VFIO             \
>--
>1.8.3.1

Reply via email to