All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Krowiak <akrowiak@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, mjrosato@linux.ibm.com,
	jjherne@linux.ibm.com, pasic@linux.ibm.com, clg@redhat.com,
	farman@linux.ibm.com, borntraeger@linux.ibm.com,
	alex@shazbot.org, cohuck@redhat.com,
	Anthony Krowiak <akrowiak@linux.ibm.com>
Subject: [PATCH v2 1/2] hw/vfio/ap: Extend vfio device state description to facilitate live migration
Date: Thu,  9 Apr 2026 10:13:44 -0400	[thread overview]
Message-ID: <20260409141352.997844-2-akrowiak@linux.ibm.com> (raw)
In-Reply-To: <20260409141352.997844-1-akrowiak@linux.ibm.com>

Make the changes needed to the VFIOAPDevice state description to facilitate
live guest migration.

Signed-off-by: Anthony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com>
---
 hw/vfio/ap.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index 5c8f305653..fd68983702 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -41,6 +41,16 @@ struct VFIOAPDevice {
     EventNotifier req_notifier;
     EventNotifier cfg_notifier;
 };
+OBJECT_DECLARE_SIMPLE_TYPE(VFIOAPDevice, VFIO_AP_DEVICE)
+
+static const VMStateDescription vmstate_ap_device = {
+    .name = "vfio-ap-device",
+    .version_id = 1,
+    .minimum_version_id = 1,
+    .fields = (const VMStateField[]) {
+        VMSTATE_END_OF_LIST()
+    },
+};
 
 typedef struct APConfigChgEvent {
     QTAILQ_ENTRY(APConfigChgEvent) next;
@@ -56,8 +66,6 @@ static void __attribute__((constructor)) vfio_ap_global_init(void)
     qemu_mutex_init(&cfg_chg_events_lock);
 }
 
-OBJECT_DECLARE_SIMPLE_TYPE(VFIOAPDevice, VFIO_AP_DEVICE)
-
 static void vfio_ap_compute_needs_reset(VFIODevice *vdev)
 {
     vdev->needs_reset = false;
@@ -297,11 +305,6 @@ static void vfio_ap_reset(DeviceState *dev)
     }
 }
 
-static const VMStateDescription vfio_ap_vmstate = {
-    .name = "vfio-ap",
-    .unmigratable = 1,
-};
-
 static void vfio_ap_instance_init(Object *obj)
 {
     VFIOAPDevice *vapdev = VFIO_AP_DEVICE(obj);
@@ -335,7 +338,7 @@ static void vfio_ap_class_init(ObjectClass *klass, const void *data)
 #ifdef CONFIG_IOMMUFD
     object_class_property_add_str(klass, "fd", NULL, vfio_ap_set_fd);
 #endif
-    dc->vmsd = &vfio_ap_vmstate;
+    dc->vmsd = &vmstate_ap_device;
     dc->desc = "VFIO-based AP device assignment";
     set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     dc->realize = vfio_ap_realize;
-- 
2.52.0



  reply	other threads:[~2026-04-09 14:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 14:13 [PATCH v2 0/2] Enable live migration of vfio-ap devices Anthony Krowiak
2026-04-09 14:13 ` Anthony Krowiak [this message]
2026-04-10  8:17   ` [PATCH v2 1/2] hw/vfio/ap: Extend vfio device state description to facilitate live migration Cédric Le Goater
2026-04-10 10:48     ` Anthony Krowiak
2026-04-09 14:13 ` [PATCH v2 2/2] hw/vfio/ap: Callbacks for migration of guests with pass-through access to AP devices Anthony Krowiak
2026-04-10  8:19   ` Cédric Le Goater
2026-04-10 10:47     ` Anthony Krowiak
2026-04-11  7:20       ` Cédric Le Goater
2026-04-10 10:50     ` Anthony Krowiak
2026-04-11  7:56       ` Cédric Le Goater
2026-04-13 15:23     ` Anthony Krowiak
2026-04-16 15:05       ` Cédric Le Goater

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=20260409141352.997844-2-akrowiak@linux.ibm.com \
    --to=akrowiak@linux.ibm.com \
    --cc=alex@shazbot.org \
    --cc=borntraeger@linux.ibm.com \
    --cc=clg@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=jjherne@linux.ibm.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    /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.