diff options
author | Eric Auger <eric.auger@redhat.com> | 2025-07-14 10:05:13 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2025-07-15 02:56:40 -0400 |
commit | 745315784db4315644421f5def482ff1324503bd (patch) | |
tree | 1e64a77ac361306b96d33d41c9982ed65989cc70 | |
parent | 1816a337a126281de43aabb4b55689f69ee876bc (diff) | |
download | qemu-745315784db4315644421f5def482ff1324503bd.zip qemu-745315784db4315644421f5def482ff1324503bd.tar.gz qemu-745315784db4315644421f5def482ff1324503bd.tar.bz2 |
hw/acpi/ged: Support migration of AcpiPciHpState
Add a subsection to migrate the AcpiPciHpState state.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>
Message-Id: <20250714080639.2525563-30-eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | hw/acpi/generic_event_device.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c index 7535d07..95682b7 100644 --- a/hw/acpi/generic_event_device.c +++ b/hw/acpi/generic_event_device.c @@ -417,6 +417,25 @@ static const VMStateDescription vmstate_ghes_state = { } }; +static bool pcihp_needed(void *opaque) +{ + AcpiGedState *s = opaque; + return s->pcihp_state.use_acpi_hotplug_bridge; +} + +static const VMStateDescription vmstate_pcihp_state = { + .name = "acpi-ged/pcihp", + .version_id = 1, + .minimum_version_id = 1, + .needed = pcihp_needed, + .fields = (const VMStateField[]) { + VMSTATE_PCI_HOTPLUG(pcihp_state, + AcpiGedState, + NULL, NULL), + VMSTATE_END_OF_LIST() + } +}; + static const VMStateDescription vmstate_acpi_ged = { .name = "acpi-ged", .version_id = 1, @@ -429,6 +448,7 @@ static const VMStateDescription vmstate_acpi_ged = { &vmstate_memhp_state, &vmstate_cpuhp_state, &vmstate_ghes_state, + &vmstate_pcihp_state, NULL } }; |