mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
52629b3ba8
commit
457af62603
2 changed files with 94 additions and 0 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue