aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/s390_flic.c
diff options
context:
space:
mode:
authorHalil Pasic <pasic@linux.vnet.ibm.com>2017-07-11 16:54:38 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2017-07-14 12:29:47 +0200
commit457af62603c835a9fc235857b40140eaedcf999c (patch)
tree3d4f9f4dd6a1a9df9785b29659dece36b8b1db8c /hw/intc/s390_flic.c
parent52629b3ba871e606a55e4366d82193055ad34d11 (diff)
s390x/css: add missing css state conditionally
Although we have recently vmstatified the migration of some css infrastructure, for some css entities there is still state to be migrated left, because the focus was keeping migration stream compatibility (that is basically everything as-is). Let us add vmstate helpers and extend existing vmstate descriptions so that we have everything we need. Let us guard the added state via css_migration_enabled, so we keep the compatible behavior if css migration is disabled. Let's also annotate the bits which do not need to be migrated for better readability. Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20170711145441.33925-4-pasic@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'hw/intc/s390_flic.c')
-rw-r--r--hw/intc/s390_flic.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
index efcb1dd0f1..ff6e4ec839 100644
--- a/hw/intc/s390_flic.c
+++ b/hw/intc/s390_flic.c
@@ -200,6 +200,22 @@ static void qemu_s390_flic_register_types(void)
type_init(qemu_s390_flic_register_types)
+static bool adapter_info_so_needed(void *opaque)
+{
+ return css_migration_enabled();
+}
+
+const VMStateDescription vmstate_adapter_info_so = {
+ .name = "s390_adapter_info/summary_offset",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .needed = adapter_info_so_needed,
+ .fields = (VMStateField[]) {
+ VMSTATE_UINT32(summary_offset, AdapterInfo),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
const VMStateDescription vmstate_adapter_info = {
.name = "s390_adapter_info",
.version_id = 1,
@@ -213,6 +229,10 @@ const VMStateDescription vmstate_adapter_info = {
*/
VMSTATE_END_OF_LIST()
},
+ .subsections = (const VMStateDescription * []) {
+ &vmstate_adapter_info_so,
+ NULL
+ }
};
const VMStateDescription vmstate_adapter_routes = {