aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/s390x/ipl.c3
-rw-r--r--hw/s390x/s390-virtio-ccw.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index d46b1f094f..3d2652d75a 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -630,7 +630,8 @@ void s390_ipl_reset_request(CPUState *cs, enum s390_reset reset_type)
}
}
if (reset_type == S390_RESET_MODIFIED_CLEAR ||
- reset_type == S390_RESET_LOAD_NORMAL) {
+ reset_type == S390_RESET_LOAD_NORMAL ||
+ reset_type == S390_RESET_PV) {
/* ignore -no-reboot, send no event */
qemu_system_reset_request(SHUTDOWN_CAUSE_SUBSYSTEM_RESET);
} else {
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 8cc2f25d8a..403d30e13b 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -701,8 +701,12 @@ bool hpage_1m_allowed(void)
static char *machine_get_loadparm(Object *obj, Error **errp)
{
S390CcwMachineState *ms = S390_CCW_MACHINE(obj);
+ char *loadparm_str;
- return g_memdup(ms->loadparm, sizeof(ms->loadparm));
+ /* make a NUL-terminated string */
+ loadparm_str = g_memdup(ms->loadparm, sizeof(ms->loadparm) + 1);
+ loadparm_str[sizeof(ms->loadparm)] = 0;
+ return loadparm_str;
}
static void machine_set_loadparm(Object *obj, const char *val, Error **errp)