While adding the new flexible boot order feature on s390x recently,
we missed to add the "loadparm" property to the scsi-hd and scsi-cd
devices. This property is required on s390x to pass the information
to the boot loader about which kernel should be started or whether
the boot menu should be shown. But even more serious: The missing
property is now causing trouble with the corresponding libvirt patches
that assume that the "loadparm" property is either settable for all
bootable devices (when the "boot order" feature is implemented in
QEMU), or none (meaning the behaviour of older QEMUs that only allowed
one "loadparm" at the machine level). To fix this broken situation,
let's implement the "loadparm" property in for the SCSI devices, too.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
v2:
- Only add the property when running with the s390x target
(checked via the arch_type variable during runtime)
- Check bootindex property before setting the loadparm property
- Call the sanitize function before setting the property, so we
can now immediately reject bad properties for the scsi devices,
too (had to move the sanitize function to the common code in
qdev-properties-system.c for this)
include/hw/qdev-properties-system.h | 3 ++
hw/core/qdev-properties-system.c | 26 +++++++++++++++++
hw/s390x/ipl.c | 19 ++++---------
hw/scsi/scsi-disk.c | 43
+++++++++++++++++++++++++++++
4 files changed, 78 insertions(+), 13 deletions(-)
[snip...]