qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Alex Williamson" <alex.williamson@redhat.com>,
	"Steve Sistare" <steven.sistare@oracle.com>,
	"Cédric Le Goater" <clg@redhat.com>,
	"Zhenzhong Duan" <zhenzhong.duan@intel.com>
Subject: [PULL 16/16] vfio: move vfio-cpr.h
Date: Thu,  5 Jun 2025 10:42:45 +0200	[thread overview]
Message-ID: <20250605084245.1520562-17-clg@redhat.com> (raw)
In-Reply-To: <20250605084245.1520562-1-clg@redhat.com>

From: Steve Sistare <steven.sistare@oracle.com>

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.sistare@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Link: https://lore.kernel.org/qemu-devel/1748546679-154091-9-git-send-email-steven.sistare@oracle.com
Signed-off-by: Cédric Le Goater <clg@redhat.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 b189701357ccf1010d60c88916a8e1be42d2a615..aa6763077ea87af0d527319f1cb13e4468b1f299 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3036,6 +3036,7 @@ CheckPoint and Restart (CPR)
 R: Steve Sistare <steven.sistare@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 134b83a62461cbe9409bbe42057fb4134d84dcd1..0000000000000000000000000000000000000000
--- 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 0000000000000000000000000000000000000000..750ea5bcea38a953c781817f7e76a64422b79d4c
--- /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 a8c76eb48165405e2b41186a266dbc69ae1b782a..0f948d024711062e2facf44b4d4694a0f1e59b83 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 3214184f97421a17b4d981facdcadde3a1fcec9a..0210e76a10993e0c01403fec51918cc9fca7b636 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 c4bbf36241d3ee5c46bca9601688afd742e471f7..d3efef71afd4fd9e68455cefe7666c9f70e8c61e 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             \
-- 
2.49.0



  parent reply	other threads:[~2025-06-05  8:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05  8:42 [PULL 00/16] vfio queue Cédric Le Goater
2025-06-05  8:42 ` [PULL 01/16] vfio/igd: OpRegion not found fix error typo Cédric Le Goater
2025-06-05  8:42 ` [PULL 02/16] vfio: add more VFIOIOMMUClass docs Cédric Le Goater
2025-06-05  8:42 ` [PULL 03/16] vfio: move more cleanup into vfio_pci_put_device() Cédric Le Goater
2025-06-05  8:42 ` [PULL 04/16] vfio: move config space read into vfio_pci_config_setup() Cédric Le Goater
2025-06-05  8:42 ` [PULL 05/16] vfio: refactor out IRQ signalling setup Cédric Le Goater
2025-06-05  8:42 ` [PULL 06/16] vfio/iommufd: Add comment emphasizing no movement of hiod->realize() call Cédric Le Goater
2025-06-05  8:42 ` [PULL 07/16] vfio/igd: Fix incorrect error propagation in vfio_pci_igd_opregion_detect() Cédric Le Goater
2025-06-05  8:42 ` [PULL 08/16] vfio: return mr from vfio_get_xlat_addr Cédric Le Goater
2025-06-05  8:42 ` [PULL 09/16] vfio/container: pass MemoryRegion to DMA operations Cédric Le Goater
2025-06-05  8:42 ` [PULL 10/16] backends/iommufd: Add a helper to invalidate user-managed HWPT Cédric Le Goater
2025-06-05  8:42 ` [PULL 11/16] vfio/iommufd: Add properties and handlers to TYPE_HOST_IOMMU_DEVICE_IOMMUFD Cédric Le Goater
2025-06-05  8:42 ` [PULL 12/16] vfio/iommufd: Implement [at|de]tach_hwpt handlers Cédric Le Goater
2025-06-05  8:42 ` [PULL 13/16] vfio/iommufd: Save vendor specific device info Cédric Le Goater
2025-06-05  8:42 ` [PULL 14/16] MAINTAINERS: Add reviewer for CPR Cédric Le Goater
2025-06-05  8:42 ` [PULL 15/16] vfio: vfio_find_ram_discard_listener Cédric Le Goater
2025-06-05  8:42 ` Cédric Le Goater [this message]
2025-06-05 19:00 ` [PULL 00/16] vfio queue Stefan Hajnoczi

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=20250605084245.1520562-17-clg@redhat.com \
    --to=clg@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=steven.sistare@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).