Skip to content

Commit 9303ecb

Browse files
committed
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200727' into staging
fixes for protected virtualization and loadparm handling # gpg: Signature made Mon 27 Jul 2020 15:01:32 BST # gpg: using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF # gpg: issuer "[email protected]" # gpg: Good signature from "Cornelia Huck <[email protected]>" [marginal] # gpg: aka "Cornelia Huck <[email protected]>" [full] # gpg: aka "Cornelia Huck <[email protected]>" [full] # gpg: aka "Cornelia Huck <[email protected]>" [marginal] # gpg: aka "Cornelia Huck <[email protected]>" [marginal] # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20200727: s390x/s390-virtio-ccw: fix loadparm property getter s390x/protvirt: allow to IPL secure guests with -no-reboot Signed-off-by: Peter Maydell <[email protected]>
2 parents cb320a0 + d664548 commit 9303ecb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

hw/s390x/ipl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,8 @@ void s390_ipl_reset_request(CPUState *cs, enum s390_reset reset_type)
630630
}
631631
}
632632
if (reset_type == S390_RESET_MODIFIED_CLEAR ||
633-
reset_type == S390_RESET_LOAD_NORMAL) {
633+
reset_type == S390_RESET_LOAD_NORMAL ||
634+
reset_type == S390_RESET_PV) {
634635
/* ignore -no-reboot, send no event */
635636
qemu_system_reset_request(SHUTDOWN_CAUSE_SUBSYSTEM_RESET);
636637
} else {

hw/s390x/s390-virtio-ccw.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,12 @@ bool hpage_1m_allowed(void)
701701
static char *machine_get_loadparm(Object *obj, Error **errp)
702702
{
703703
S390CcwMachineState *ms = S390_CCW_MACHINE(obj);
704+
char *loadparm_str;
704705

705-
return g_memdup(ms->loadparm, sizeof(ms->loadparm));
706+
/* make a NUL-terminated string */
707+
loadparm_str = g_memdup(ms->loadparm, sizeof(ms->loadparm) + 1);
708+
loadparm_str[sizeof(ms->loadparm)] = 0;
709+
return loadparm_str;
706710
}
707711

708712
static void machine_set_loadparm(Object *obj, const char *val, Error **errp)

0 commit comments

Comments
 (0)