#include "qemu/osdep.h"
#include "qemu/units.h"
-#include "hw/boards.h"
#include "cpu.h"
#include "migration/qemu-file.h"
#include "migration/register.h"
#include "qapi/error.h"
#include "qapi/qmp/qdict.h"
-#define CMMA_BLOCK_SIZE (1 * KiB)
+/* 512KiB cover 2GB of guest memory */
+#define CMMA_BLOCK_SIZE (512 * KiB)
#define STATTR_FLAG_EOS 0x01ULL
#define STATTR_FLAG_MORE 0x02ULL
}
object_property_add_child(qdev_get_machine(), TYPE_S390_STATTRIB,
- obj, NULL);
+ obj);
object_unref(obj);
qdev_init_nofail(DEVICE(obj));
S390StAttribClass *sac = S390_STATTRIB_GET_CLASS(sas);
uint8_t *buf;
int r, cx, reallen = 0, ret = 0;
- uint32_t buflen = 1 << 19; /* 512kB cover 2GB of guest memory */
+ uint32_t buflen = CMMA_BLOCK_SIZE;
uint64_t start_gfn = sas->migration_cur_gfn;
buf = g_try_malloc(buflen);
dc->realize = s390_stattrib_realize;
}
-static inline bool s390_stattrib_get_migration_enabled(Object *obj, Error **e)
+static inline bool s390_stattrib_get_migration_enabled(Object *obj,
+ Error **errp)
{
S390StAttribState *s = S390_STATTRIB(obj);
{
S390StAttribState *sas = S390_STATTRIB(obj);
- register_savevm_live(NULL, TYPE_S390_STATTRIB, 0, 0,
+ register_savevm_live(TYPE_S390_STATTRIB, 0, 0,
&savevm_s390_stattrib_handlers, sas);
object_property_add_bool(obj, "migration-enabled",
s390_stattrib_get_migration_enabled,
- s390_stattrib_set_migration_enabled, NULL);
+ s390_stattrib_set_migration_enabled);
object_property_set_bool(obj, true, "migration-enabled", NULL);
sas->migration_cur_gfn = 0;
}