From: Jared Rossi <[email protected]>
This patch series introduces an IPLB subtype to support PCI devices, which may
be built if a device has been assigned a boot index and is identified as a PCI
device with a corresponding s390 PCI Bus device.
A simple test to check basic functionality is added to the cdrom-tests in qtest.
Boot support is only added for virtio-blk-pci at this time and has the
following limitations:
1) A PCI device must be assigned a boot index to be eligible for boot
2) A PCI boot device cannot be assigned a per-device loadparm
Point 1 relates to boot device probing, which occurs if no device has been
assigned a boot index. Currently, there is a basic probing routine to scan
through the CCW devices for any devices that *might* boot, and to then try
booting them; however, the routine provides limited coverage even for CCW
devices (some CCW devices, such as net devices, are not probed). The PCI bus
could be added to this routine in a similarly limited form, or it may be more
desirable to do a comprehensive enhancement of the probing routine as a separate
patch series.
Point 2 relates to the QOM device properties. The loadparm is specific to s390x
and has generally only been relevant for CCW devices, of which bootable types
have a corresponding QOM property for the loadparm. There is some precedence
for making the s390x loadparm property assignable to non-CCW devices (see QEMU
commit 429442e), but it may not be an acceptable solution for generic PCI
devices, in which case an alternative solution would be needed.
Further consideration is needed on how to best handle to above points and
feedback is encouraged. Additionally, it is worth noting that all of the s390
BIOS code lives in the "s390-ccw" directory. Should the entire directory be
renamed, given that non-ccw devices will be supported?
Referenced commit ID 429442e: hw: Add "loadparm" property to scsi disk devices
for booting on s390x
(https://gitlab.com/qemu-project/qemu/-/commit/429442e52d94f890fa194a151e8cd649b04e9e63)
Jared Rossi (7):
pc-bios/s390-ccw: Fix Misattributed Function Prototypes
pc-bios/s390-ccw: Split virtio-ccw and generic virtio
pc-bios/s390-ccw: Introduce CLP Architecture
pc-bios/s390-ccw: Introduce PCI device IPL format
pc-bios/s390-ccw: Add support for virtio-blk-pci IPL
s390x: Build IPLB for virtio-pci devices
tests/qtest: Add s390x PCI boot test to cdrom-test.c
hw/s390x/ipl.h | 8 +-
include/hw/s390x/ipl/qipl.h | 15 ++
include/hw/s390x/s390-pci-bus.h | 2 +
pc-bios/s390-ccw/clp.h | 24 +++
pc-bios/s390-ccw/iplb.h | 4 -
pc-bios/s390-ccw/pci.h | 77 +++++++
pc-bios/s390-ccw/s390-ccw.h | 4 -
pc-bios/s390-ccw/virtio-ccw.h | 25 +++
pc-bios/s390-ccw/virtio-pci.h | 73 +++++++
pc-bios/s390-ccw/virtio-scsi.h | 2 +-
pc-bios/s390-ccw/virtio.h | 17 +-
hw/s390x/ipl.c | 56 ++++-
hw/s390x/s390-pci-bus.c | 2 +-
pc-bios/s390-ccw/bootmap.c | 2 +-
pc-bios/s390-ccw/clp.c | 106 +++++++++
pc-bios/s390-ccw/main.c | 72 ++++++-
pc-bios/s390-ccw/pci.c | 191 +++++++++++++++++
pc-bios/s390-ccw/virtio-blkdev.c | 62 ++++--
pc-bios/s390-ccw/virtio-ccw.c | 240 +++++++++++++++++++++
pc-bios/s390-ccw/virtio-net.c | 5 +-
pc-bios/s390-ccw/virtio-pci.c | 357 +++++++++++++++++++++++++++++++
pc-bios/s390-ccw/virtio-scsi.c | 7 +-
pc-bios/s390-ccw/virtio.c | 214 ++++--------------
tests/qtest/cdrom-test.c | 7 +
pc-bios/s390-ccw/Makefile | 3 +-
25 files changed, 1342 insertions(+), 233 deletions(-)
create mode 100644 pc-bios/s390-ccw/clp.h
create mode 100644 pc-bios/s390-ccw/pci.h
create mode 100644 pc-bios/s390-ccw/virtio-ccw.h
create mode 100644 pc-bios/s390-ccw/virtio-pci.h
create mode 100644 pc-bios/s390-ccw/clp.c
create mode 100644 pc-bios/s390-ccw/pci.c
create mode 100644 pc-bios/s390-ccw/virtio-ccw.c
create mode 100644 pc-bios/s390-ccw/virtio-pci.c
--
2.49.0