mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
s390: move css_migration_enabled from machine to css.c
The CSS subsystem uses global variables, just face the truth and use a variable also for whether the CSS vmstate is in use; remove the indirection of fetching it from the machine type, which makes the TCG code depend unnecessarily on the virtio-ccw machine. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-ID: <20240509170044.190795-4-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
9d1b0f5bf5
commit
a55ae46683
4 changed files with 16 additions and 22 deletions
|
@ -23,6 +23,8 @@
|
|||
#include "hw/s390x/s390-virtio-ccw.h"
|
||||
#include "hw/s390x/s390-ccw.h"
|
||||
|
||||
bool css_migration_enabled = true;
|
||||
|
||||
typedef struct CrwContainer {
|
||||
CRW crw;
|
||||
QTAILQ_ENTRY(CrwContainer) sibling;
|
||||
|
@ -180,7 +182,7 @@ static const VMStateDescription vmstate_orb = {
|
|||
|
||||
static bool vmstate_schdev_orb_needed(void *opaque)
|
||||
{
|
||||
return css_migration_enabled();
|
||||
return css_migration_enabled;
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_schdev_orb = {
|
||||
|
@ -388,7 +390,7 @@ static int subch_dev_post_load(void *opaque, int version_id)
|
|||
css_subch_assign(s->cssid, s->ssid, s->schid, s->devno, s);
|
||||
}
|
||||
|
||||
if (css_migration_enabled()) {
|
||||
if (css_migration_enabled) {
|
||||
/* No compat voodoo to do ;) */
|
||||
return 0;
|
||||
}
|
||||
|
@ -412,7 +414,9 @@ static int subch_dev_post_load(void *opaque, int version_id)
|
|||
|
||||
void css_register_vmstate(void)
|
||||
{
|
||||
vmstate_register(NULL, 0, &vmstate_css, &channel_subsys);
|
||||
if (css_migration_enabled) {
|
||||
vmstate_register(NULL, 0, &vmstate_css, &channel_subsys);
|
||||
}
|
||||
}
|
||||
|
||||
IndAddr *get_indicator(hwaddr ind_addr, int len)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue