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:
Paolo Bonzini 2024-05-09 19:00:34 +02:00
parent 9d1b0f5bf5
commit a55ae46683
4 changed files with 16 additions and 22 deletions

View file

@ -333,4 +333,10 @@ static inline int ccw_dstream_read_buf(CcwDataStream *cds, void *buff, int len)
#define ccw_dstream_read(cds, v) ccw_dstream_read_buf((cds), &(v), sizeof(v))
#define ccw_dstream_write(cds, v) ccw_dstream_write_buf((cds), &(v), sizeof(v))
/**
* true if (vmstate based) migration of the channel subsystem
* is enabled, false if it is disabled.
*/
extern bool css_migration_enabled;
#endif

View file

@ -46,7 +46,6 @@ struct S390CcwMachineClass {
/*< public >*/
bool ri_allowed;
bool cpu_model_allowed;
bool css_migration_enabled;
bool hpage_1m_allowed;
int max_threads;
};
@ -58,10 +57,4 @@ bool cpu_model_allowed(void);
/* 1M huge page mappings allowed by the machine */
bool hpage_1m_allowed(void);
/**
* Returns true if (vmstate based) migration of the channel subsystem
* is enabled, false if it is disabled.
*/
bool css_migration_enabled(void);
#endif