[RESEND PATCH 0/1] pc-bios: Support List-Directed IPL from ECKD DASD

2023-02-21 Thread jrossi
From: Jared Rossi Add support for List-Directed IPL (LD-IPL) type pointers. We check for a boot record indicating LD-IPL and use it if it is valid, otherwise we use the CCW CDL or LDL format as usual. When a block is accessed during IPL the block number is first calculated based on the cylinder,

[RESEND PATCH 1/1] pc-bios: Add support for List-Directed IPL from ECKD DASD

2023-02-21 Thread jrossi
From: Jared Rossi Check for a List Directed IPL Boot Record, which would supersede the CCW type entries. If the record is valid, proceed to use the new style pointers and perform LD-IPL. Each block pointer is interpreted as either an LD-IPL pointer or a legacy CCW pointer depending on the type o

[PATCH 5/5] s390x: Enable and document boot device fallback on panic

2024-05-29 Thread jrossi
From: Jared Rossi On a panic during IPL (i.e. a device failed to boot) check for another device to boot from, as indicated by the presence of an unused IPLB. If an IPLB is successfully loaded, then jump to the start of BIOS, restarting IPL using the updated IPLB. Otherwise enter disabled wait.

[PATCH 2/5] s390x: Add loadparm to CcwDevice

2024-05-29 Thread jrossi
From: Jared Rossi Add a loadparm property to the CcwDevice object so that different loadparms can be defined on a per-device basis when using multiple boot devices. The machine/global loadparm is still supported. If both a global and per-device loadparm are defined, the per-device value will ove

[PATCH 3/5] s390x: Build IPLB chain for multiple boot devices

2024-05-29 Thread jrossi
From: Jared Rossi Write a chain of IPLBs into memory for future use. The IPLB chain is placed immediately before the BIOS in memory at the highest unused page boundary providing sufficient space to fit the chain. Because this is not a fixed address, the location of the next IPLB and number of re

[PATCH 0/5] s390x: Add Full Boot Order Support

2024-05-29 Thread jrossi
From: Jared Rossi This patch set primarily adds support for the specification of multiple boot devices, allowing for the guest to automatically use an alternative device on a failed boot without needing to be reconfigured. It additionally provides the ability to define the loadparm attribute on a

[PATCH 1/5] s390x: Create include files for s390x IPL definitions

2024-05-29 Thread jrossi
From: Jared Rossi Currently, stuctures defined in both hw/s390x/ipl.h and pc-bios/s390-ccw/iplb.h must be kept in sync, which is prone to error. Instead, create a new directory at include/hw/s390x/ipl/ to contain the definitions that must be shared. Signed-off-by: Jared Rossi --- hw/s390x/ipl.

[PATCH 4/5] s390x: Add boot device fallback infrastructure

2024-05-29 Thread jrossi
From: Jared Rossi Add a routine for loading the next IPLB if a device fails to boot. This includes some minor changes to the List-Directed IPL routine so that the failing device may be retried using the legacy boot pointers before moving on to the next device. Signed-off-by: Jared Rossi --- p

[PATCH v3 05/19] pc-bios/s390-ccw: Merge netboot.mak into the main Makefile

2024-10-07 Thread jrossi
From: Jared Rossi Now that the netboot code has been merged into the main s390-ccw.img, it also does not make sense to keep the build rules in a separate file. Thus let's merge netboot.mak into the main Makefile. Co-authored by: Thomas Huth Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/netb

[PATCH v3 01/19] hw/s390x/ipl: Provide more memory to the s390-ccw.img firmware

2024-10-07 Thread jrossi
From: Jared Rossi We are going to link the SLOF libc into the s390-ccw.img, and this libc needs more memory for providing space for malloc() and friends. Thus bump the memory size that we reserve for the bios to 3 MiB instead of only 2 MiB. While we're at it, add a proper check that there is real

[PATCH v3 07/19] pc-bios/s390-ccw: Remove panics from ISO IPL path

2024-10-07 Thread jrossi
From: Jared Rossi Remove panic-on-error from IPL ISO El Torito specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/bootmap.h | 15 +++ pc-bios/s390-ccw/s3

[PATCH v3 14/19] s390x: Add individual loadparm assignment to CCW device

2024-10-07 Thread jrossi
From: Jared Rossi Add a loadparm property to the VirtioCcwDevice object so that different loadparms can be defined on a per-device basis for CCW boot devices. The machine/global loadparm is still supported. If both a global and per-device loadparm are defined, the per-device value will override

[PATCH v3 03/19] pc-bios/s390-ccw: Link the netboot code into the main s390-ccw.img binary

2024-10-07 Thread jrossi
From: Jared Rossi We originally built a separate binary for the netboot code since it was considered as experimental and we could not be sure that the necessary SLOF module had been checked out. Time passed, the code proved its usefulness, and the build system nowadays makes sure that the SLOF mo

[PATCH v3 00/19] s390x: Add Full Boot Order Support

2024-10-07 Thread jrossi
From: Jared Rossi Version 3 fixes ISO IPL and restores the ability to probe for boot devices when no primary b0ot device has been specified. Two automated qtests are added, one that tests a cdrom device as the only fallback device after the primary boot target fails and one that that defines the

[PATCH v3 09/19] pc-bios/s390-ccw: Remove panics from SCSI IPL path

2024-10-07 Thread jrossi
From: Jared Rossi Remove panic-on-error from virtio-scsi IPL specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/bootmap.c | 88 +- pc-b

[PATCH v3 11/19] pc-bios/s390-ccw: Remove panics from Netboot IPL path

2024-10-07 Thread jrossi
From: Jared Rossi Remove panic-on-error from Netboot specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/s390-ccw.h | 2 +- pc-bios/s390-ccw/bootmap.c|

[PATCH v3 17/19] pc-bios/s390x: Enable multi-device boot loop

2024-10-07 Thread jrossi
From: Jared Rossi Allow attempts to boot from multiple IPL devices. If the first device fails to IPL, select the pre-built IPLB for the next device in the boot order and attempt to IPL from it. Continue this process until IPL is successful or there are no devices left to try. Signed-off-by: Jare

[PATCH v3 06/19] docs/system/s390x/bootdevices: Update the documentation about network booting

2024-10-07 Thread jrossi
From: Jared Rossi Remove the information about the separate s390-netboot.img from the documentation. Co-authored by: Thomas Huth Signed-off-by: Jared Rossi --- docs/system/s390x/bootdevices.rst | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/docs/syst

[PATCH v3 13/19] include/hw/s390x: Add include files for common IPL structs

2024-10-07 Thread jrossi
From: Jared Rossi Currently, structures defined in both hw/s390x/ipl.h and pc-bios/s390-ccw/iplb.h must be kept in sync, which is prone to error. Instead, create a new directory at include/hw/s390x/ipl/ to contain the definitions that must be shared. Signed-off-by: Jared Rossi Reviewed-by: Thom

[PATCH v3 12/19] pc-bios/s390-ccw: Enable failed IPL to return after error

2024-10-07 Thread jrossi
From: Jared Rossi Remove panic-on-error from IPL functions such that a return code is propagated back to the main IPL calling function (rather than terminating immediately), which facilitates possible error recovery in the future. A select few panics remain, which indicate fatal non-devices erro

[PATCH v3 18/19] docs/system: Update documentation for s390x IPL

2024-10-07 Thread jrossi
From: Jared Rossi Update docs to show that s390x PC BIOS can support more than one boot device. Signed-off-by: Jared Rossi --- docs/system/bootindex.rst | 7 --- docs/system/s390x/bootdevices.rst | 9 ++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/sy

[PATCH v3 08/19] pc-bios/s390-ccw: Remove panics from ECKD IPL path

2024-10-07 Thread jrossi
From: Jared Rossi Remove panic-on-error from ECKD block device IPL specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/s390-ccw.h | 1 + pc-bios/s390-ccw/boo

[PATCH v3 19/19] tests/qtest: Add s390x boot order tests to cdrom-test.c

2024-10-07 Thread jrossi
From: Jared Rossi Add two new qtests to verify that a valid IPL device can successfully boot after failed IPL attempts from one or more invalid devices. cdrom-test/as-fallback-device: Defines the primary boot target as a device that is invalid for IPL and a second boot target that is valid for I

[PATCH v3 16/19] s390x: Rebuild IPLB for SCSI device directly from DIAG308

2024-10-07 Thread jrossi
From: Jared Rossi Because virtio-scsi type devices use a non-architected IPLB pbt code they cannot be set and stored normally. Instead, the IPLB must be rebuilt during re-ipl. As s390x does not natively support multiple boot devices, the devno field is used to store the position in the boot orde

[PATCH v3 02/19] pc-bios/s390-ccw: Use the libc from SLOF and remove sclp prints

2024-10-07 Thread jrossi
From: Jared Rossi We are already using the libc from SLOF for the s390-netboot.img, and this libc implementation is way more complete and accurate than the simple implementation that we currently use for the s390-ccw.img binary. Since we are now always assuming that the SLOF submodule is availabl

[PATCH v3 15/19] hw/s390x: Build an IPLB for each boot device

2024-10-07 Thread jrossi
From: Jared Rossi Build an IPLB for any device with a bootindex (up to a maximum of 8 devices). The IPLB chain is placed immediately before the BIOS in memory. Because this is not a fixed address, the location of the next IPLB and number of remaining boot devices is stored in the QIPL global var

[PATCH v3 04/19] hw/s390x: Remove the possibility to load the s390-netboot.img binary

2024-10-07 Thread jrossi
From: Jared Rossi Since the netboot code has now been merged into the main s390-ccw.img binary, we don't need the separate s390-netboot.img anymore. Remove it and the code that was responsible for loading it. Co-authored by: Thomas Huth Signed-off-by: Jared Rossi --- hw/s390x/ipl.h

[PATCH v3 10/19] pc-bios/s390-ccw: Remove panics from DASD IPL path

2024-10-07 Thread jrossi
From: Jared Rossi Remove panic-on-error from DASD IPL specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi Reviewed-by: Thomas Huth --- pc-bios/s390-ccw/dasd-ipl.h | 2 +- pc-bios

[PATCH v5 01/19] hw/s390x/ipl: Provide more memory to the s390-ccw.img firmware

2024-10-19 Thread jrossi
From: Jared Rossi We are going to link the SLOF libc into the s390-ccw.img, and this libc needs more memory for providing space for malloc() and friends. Thus bump the memory size that we reserve for the bios to 3 MiB instead of only 2 MiB. While we're at it, add a proper check that there is real

[PATCH v5 00/19] s390x: Add Full Boot Order Support

2024-10-19 Thread jrossi
From: Jared Rossi changes v4 -> v5: - Fix a bug with per-deice loadparm support: The machine loadparm is no longer overwritten by device values, which now allows an empty machine loadparm to propagate to later devices even if the primary boot device set an initial loadparm - Fix two i

[PATCH v5 08/19] pc-bios/s390-ccw: Remove panics from ECKD IPL path

2024-10-19 Thread jrossi
From: Jared Rossi Remove panic-on-error from ECKD block device IPL specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/bootmap.h | 1 + pc-bios/s390-ccw/boot

[PATCH v5 05/19] pc-bios/s390-ccw: Merge netboot.mak into the main Makefile

2024-10-19 Thread jrossi
From: Jared Rossi Now that the netboot code has been merged into the main s390-ccw.img, it also does not make sense to keep the build rules in a separate file. Thus let's merge netboot.mak into the main Makefile. Co-authored by: Thomas Huth Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/netb

[PATCH v5 03/19] pc-bios/s390-ccw: Link the netboot code into the main s390-ccw.img binary

2024-10-19 Thread jrossi
From: Jared Rossi We originally built a separate binary for the netboot code since it was considered as experimental and we could not be sure that the necessary SLOF module had been checked out. Time passed, the code proved its usefulness, and the build system nowadays makes sure that the SLOF mo

[PATCH v5 16/19] s390x: Rebuild IPLB for SCSI device directly from DIAG308

2024-10-19 Thread jrossi
From: Jared Rossi Because virtio-scsi type devices use a non-architected IPLB pbt code they cannot be set and stored normally. Instead, the IPLB must be rebuilt during re-ipl. As s390x does not natively support multiple boot devices, the devno field is used to store the position in the boot orde

[PATCH v5 14/19] s390x: Add individual loadparm assignment to CCW device

2024-10-19 Thread jrossi
From: Jared Rossi Add a loadparm property to the VirtioCcwDevice object so that different loadparms can be defined on a per-device basis for CCW boot devices. The machine/global loadparm is still supported. If both a global and per-device loadparm are defined, the per-device value will override

[PATCH v5 17/19] pc-bios/s390x: Enable multi-device boot loop

2024-10-19 Thread jrossi
From: Jared Rossi Allow attempts to boot from multiple IPL devices. If the first device fails to IPL, select the pre-built IPLB for the next device in the boot order and attempt to IPL from it. Continue this process until IPL is successful or there are no devices left to try. Signed-off-by: Jare

[PATCH v5 12/19] pc-bios/s390-ccw: Enable failed IPL to return after error

2024-10-19 Thread jrossi
From: Jared Rossi Remove panic-on-error from IPL functions such that a return code is propagated back to the main IPL calling function (rather than terminating immediately), which facilitates possible error recovery in the future. A select few panics remain, which indicate fatal non-devices erro

[PATCH v5 04/19] hw/s390x: Remove the possibility to load the s390-netboot.img binary

2024-10-19 Thread jrossi
From: Jared Rossi Since the netboot code has now been merged into the main s390-ccw.img binary, we don't need the separate s390-netboot.img anymore. Remove it and the code that was responsible for loading it. Co-authored by: Thomas Huth Signed-off-by: Jared Rossi --- hw/s390x/ipl.h

[PATCH v5 19/19] tests/qtest: Add s390x boot order tests to cdrom-test.c

2024-10-19 Thread jrossi
From: Jared Rossi Add two new qtests to verify that a valid IPL device can successfully boot after failed IPL attempts from one or more invalid devices. cdrom-test/as-fallback-device: Defines the primary boot target as a device that is invalid for IPL and a second boot target that is valid for I

[PATCH v5 07/19] pc-bios/s390-ccw: Remove panics from ISO IPL path

2024-10-19 Thread jrossi
From: Jared Rossi Remove panic-on-error from IPL ISO El Torito specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/bootmap.h | 15 +++ pc-bios/s390-ccw/s3

[PATCH v5 15/19] hw/s390x: Build an IPLB for each boot device

2024-10-19 Thread jrossi
From: Jared Rossi Build an IPLB for any device with a bootindex (up to a maximum of 8 devices). The IPLB chain is placed immediately before the BIOS in memory. Because this is not a fixed address, the location of the next IPLB and number of remaining boot devices is stored in the QIPL global var

[PATCH v5 13/19] include/hw/s390x: Add include files for common IPL structs

2024-10-19 Thread jrossi
From: Jared Rossi Currently, structures defined in both hw/s390x/ipl.h and pc-bios/s390-ccw/iplb.h must be kept in sync, which is prone to error. Instead, create a new directory at include/hw/s390x/ipl/ to contain the definitions that must be shared. Signed-off-by: Jared Rossi Reviewed-by: Thom

[PATCH v5 02/19] pc-bios/s390-ccw: Use the libc from SLOF and remove sclp prints

2024-10-19 Thread jrossi
From: Jared Rossi We are already using the libc from SLOF for the s390-netboot.img, and this libc implementation is way more complete and accurate than the simple implementation that we currently use for the s390-ccw.img binary. Since we are now always assuming that the SLOF submodule is availabl

[PATCH v5 18/19] docs/system: Update documentation for s390x IPL

2024-10-19 Thread jrossi
From: Jared Rossi Update docs to show that s390x PC BIOS can support more than one boot device. Signed-off-by: Jared Rossi Reviewed-by: Thomas Huth --- docs/system/bootindex.rst | 7 --- docs/system/s390x/bootdevices.rst | 9 ++--- 2 files changed, 10 insertions(+), 6 deletion

[PATCH v5 06/19] docs/system/s390x/bootdevices: Update the documentation about network booting

2024-10-19 Thread jrossi
From: Jared Rossi Remove the information about the separate s390-netboot.img from the documentation. Co-authored by: Thomas Huth Signed-off-by: Jared Rossi --- docs/system/s390x/bootdevices.rst | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/docs/syst

[PATCH v5 11/19] pc-bios/s390-ccw: Remove panics from Netboot IPL path

2024-10-19 Thread jrossi
From: Jared Rossi Remove panic-on-error from Netboot specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/s390-ccw.h | 2 +- pc-bios/s390-ccw/bootmap.c|

[PATCH v5 10/19] pc-bios/s390-ccw: Remove panics from DASD IPL path

2024-10-19 Thread jrossi
From: Jared Rossi Remove panic-on-error from DASD IPL specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi Reviewed-by: Thomas Huth --- pc-bios/s390-ccw/dasd-ipl.h | 2 +- pc-bios

[PATCH v5 09/19] pc-bios/s390-ccw: Remove panics from SCSI IPL path

2024-10-19 Thread jrossi
From: Jared Rossi Remove panic-on-error from virtio-scsi IPL specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/bootmap.c | 88 ++- pc-

[PATCH v4 00/19] s390x: Add Full Boot Order Support

2024-10-16 Thread jrossi
From: Jared Rossi changes v3 -> v4: - Ensure signed-ness of return values is appropriate - Add missing newline character in replacements of sclp_print_int() - Add a missing return in a SCSI error path - Restore break that was incorrectly removed for Virtio CU devices - Remove an extra/early retur

[PATCH v4 02/19] pc-bios/s390-ccw: Use the libc from SLOF and remove sclp prints

2024-10-16 Thread jrossi
From: Jared Rossi We are already using the libc from SLOF for the s390-netboot.img, and this libc implementation is way more complete and accurate than the simple implementation that we currently use for the s390-ccw.img binary. Since we are now always assuming that the SLOF submodule is availabl

[PATCH v4 12/19] pc-bios/s390-ccw: Enable failed IPL to return after error

2024-10-16 Thread jrossi
From: Jared Rossi Remove panic-on-error from IPL functions such that a return code is propagated back to the main IPL calling function (rather than terminating immediately), which facilitates possible error recovery in the future. A select few panics remain, which indicate fatal non-devices erro

[PATCH v4 03/19] pc-bios/s390-ccw: Link the netboot code into the main s390-ccw.img binary

2024-10-16 Thread jrossi
From: Jared Rossi We originally built a separate binary for the netboot code since it was considered as experimental and we could not be sure that the necessary SLOF module had been checked out. Time passed, the code proved its usefulness, and the build system nowadays makes sure that the SLOF mo

[PATCH v4 09/19] pc-bios/s390-ccw: Remove panics from SCSI IPL path

2024-10-16 Thread jrossi
From: Jared Rossi Remove panic-on-error from virtio-scsi IPL specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/iplb.h | 2 + pc-bios/s390-ccw/boot

[PATCH 1/1] pc-bios/s390x: Initialize cdrom type to false for each IPL device

2024-11-08 Thread jrossi
From: Jared Rossi Clear information about cdrom type so that current IPL device isn't tainted by stale data from previous devices. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c index

[PATCH 12/18] pc-bios/s390-ccw: Enable failed IPL to return after error

2024-09-26 Thread jrossi
From: Jared Rossi Remove panic-on-error from IPL functions such that a return code is propagated back to the main IPL calling function (rather than terminating immediately), which facilitates possible error recovery in the future. A select few panics remain, which indicate fatal non-devices erro

[PATCH 14/18] s390x: Add individual loadparm assignment to CCW device

2024-09-26 Thread jrossi
From: Jared Rossi Add a loadparm property to the VirtioCcwDevice object so that different loadparms can be defined on a per-device basis for CCW boot devices. The machine/global loadparm is still supported. If both a global and per-device loadparm are defined, the per-device value will override

[PATCH 11/18] pc-bios/s390-ccw: Remove panics from Netboot IPL path

2024-09-26 Thread jrossi
From: Jared Rossi Remove panic-on-error from Netboot specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/s390-ccw.h | 2 +- pc-bios/s390-ccw/bootmap.c|

[PATCH V2 0/18] s390x: Add Full Boot Order Support

2024-09-26 Thread jrossi
From: Jared Rossi Loosely a v2, this updated patch set is a significant rework to most aspects of the initially proposed multi-device boot order. Of particular note, the original patch set used code jumps to restart the IPL while this version does not. In order to remove the code jumps, two signi

[PATCH 04/18] hw/s390x: Remove the possibility to load the s390-netboot.img binary

2024-09-26 Thread jrossi
From: Jared Rossi Since the netboot code has now been merged into the main s390-ccw.img binary, we don't need the separate s390-netboot.img anymore. Remove it and the code that was responsible for loading it. Co-authored by: Thomas Huth Signed-off-by: Jared Rossi --- hw/s390x/ipl.h

[PATCH 15/18] hw/s390x: Build an IPLB for each boot device

2024-09-26 Thread jrossi
From: Jared Rossi Build an IPLB for any device with a bootindex (up to a maximum of 8 devices). The IPLB chain is placed immediately before the BIOS in memory. Because this is not a fixed address, the location of the next IPLB and number of remaining boot devices is stored in the QIPL global var

[PATCH 02/18] pc-bios/s390-ccw: Use the libc from SLOF and remove sclp prints

2024-09-26 Thread jrossi
From: Jared Rossi We are already using the libc from SLOF for the s390-netboot.img, and this libc implementation is way more complete and accurate than the simple implementation that we currently use for the s390-ccw.img binary. Since we are now always assuming that the SLOF submodule is availabl

[PATCH 08/18] pc-bios/s390-ccw: Remove panics from ECKD IPL path

2024-09-26 Thread jrossi
From: Jared Rossi Remove panic-on-error from ECKD block device IPL specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/bootmap.c | 183 +++

[PATCH 06/18] docs/system/s390x/bootdevices: Update the documentation about network booting

2024-09-26 Thread jrossi
From: Jared Rossi Remove the information about the separate s390-netboot.img from the documentation. Co-authored by: Thomas Huth Signed-off-by: Jared Rossi --- docs/system/s390x/bootdevices.rst | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/docs/sys

[PATCH 16/18] s390x: Rebuild IPLB for SCSI device directly from DIAG308

2024-09-26 Thread jrossi
From: Jared Rossi Because virtio-scsi type devices use a non-architected IPLB pbt code they cannot be set and stored normally. Instead, the IPLB must be rebuilt during re-ipl. As s390x does not natively support multiple boot devices, the devno field is used to store the position in the boot orde

[PATCH 09/18] pc-bios/s390-ccw: Remove panics from SCSI IPL path

2024-09-26 Thread jrossi
From: Jared Rossi Remove panic-on-error from virtio-scsi IPL specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/bootmap.c | 88 +++- pc-

[PATCH 13/18] include/hw/s390x: Add include files for common IPL structs

2024-09-26 Thread jrossi
From: Jared Rossi Currently, structures defined in both hw/s390x/ipl.h and pc-bios/s390-ccw/iplb.h must be kept in sync, which is prone to error. Instead, create a new directory at include/hw/s390x/ipl/ to contain the definitions that must be shared. Signed-off-by: Jared Rossi --- hw/s390x/ip

[PATCH 03/18] pc-bios/s390-ccw: Link the netboot code into the main s390-ccw.img binary

2024-09-26 Thread jrossi
From: Jared Rossi We originally built a separate binary for the netboot code since it was considered as experimental and we could not be sure that the necessary SLOF module had been checked out. Time passed, the code proved its usefulness, and the build system nowadays makes sure that the SLOF mo

[PATCH 10/18] pc-bios/s390-ccw: Remove panics from DASD IPL path

2024-09-26 Thread jrossi
From: Jared Rossi Remove panic-on-error from DASD IPL specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/dasd-ipl.h | 2 +- pc-bios/s390-ccw/dasd-ipl.c | 66

[PATCH 05/18] pc-bios/s390-ccw: Merge netboot.mak into the main Makefile

2024-09-26 Thread jrossi
From: Jared Rossi Now that the netboot code has been merged into the main s390-ccw.img, it also does not make sense to keep the build rules in a separate file. Thus let's merge netboot.mak into the main Makefile. Co-authored by: Thomas Huth Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/net

[PATCH 01/18] hw/s390x/ipl: Provide more memory to the s390-ccw.img firmware

2024-09-26 Thread jrossi
From: Jared Rossi We are going to link the SLOF libc into the s390-ccw.img, and this libc needs more memory for providing space for malloc() and friends. Thus bump the memory size that we reserve for the bios to 3 MiB instead of only 2 MiB. While we're at it, add a proper check that there is real

[PATCH 17/18] pc-bios/s390x: Enable multi-device boot loop

2024-09-26 Thread jrossi
From: Jared Rossi Allow attempts to boot from multiple IPL devices. If the first device fails to IPL, select the pre-built IPLB for the next device in the boot order and attempt to IPL from it. Continue this process until IPL is successful or there are no devices left to try. Signed-off-by: Jare

[PATCH 07/18] pc-bios/s390-ccw: Remove panics from ISO IPL path

2024-09-26 Thread jrossi
From: Jared Rossi Remove panic-on-error from IPL ISO El Torito specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/bootmap.h | 17 +++--- pc-bios/s390-cc

[PATCH 18/18] docs/system: Update documentation for s390x IPL

2024-09-26 Thread jrossi
From: Jared Rossi Update docs to show that s390x PC BIOS can support more than one boot device. Signed-off-by: Jared Rossi --- docs/system/bootindex.rst | 7 --- docs/system/s390x/bootdevices.rst | 9 ++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/s

[PATCH v4 01/19] hw/s390x/ipl: Provide more memory to the s390-ccw.img firmware

2024-10-16 Thread jrossi
From: Jared Rossi We are going to link the SLOF libc into the s390-ccw.img, and this libc needs more memory for providing space for malloc() and friends. Thus bump the memory size that we reserve for the bios to 3 MiB instead of only 2 MiB. While we're at it, add a proper check that there is real

[PATCH v4 05/19] pc-bios/s390-ccw: Merge netboot.mak into the main Makefile

2024-10-16 Thread jrossi
From: Jared Rossi Now that the netboot code has been merged into the main s390-ccw.img, it also does not make sense to keep the build rules in a separate file. Thus let's merge netboot.mak into the main Makefile. Co-authored by: Thomas Huth Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/netb

[PATCH v4 13/19] include/hw/s390x: Add include files for common IPL structs

2024-10-16 Thread jrossi
From: Jared Rossi Currently, structures defined in both hw/s390x/ipl.h and pc-bios/s390-ccw/iplb.h must be kept in sync, which is prone to error. Instead, create a new directory at include/hw/s390x/ipl/ to contain the definitions that must be shared. Signed-off-by: Jared Rossi Reviewed-by: Thom

[PATCH v4 06/19] docs/system/s390x/bootdevices: Update the documentation about network booting

2024-10-16 Thread jrossi
From: Jared Rossi Remove the information about the separate s390-netboot.img from the documentation. Co-authored by: Thomas Huth Signed-off-by: Jared Rossi --- docs/system/s390x/bootdevices.rst | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/docs/syst

[PATCH v4 04/19] hw/s390x: Remove the possibility to load the s390-netboot.img binary

2024-10-16 Thread jrossi
From: Jared Rossi Since the netboot code has now been merged into the main s390-ccw.img binary, we don't need the separate s390-netboot.img anymore. Remove it and the code that was responsible for loading it. Co-authored by: Thomas Huth Signed-off-by: Jared Rossi --- hw/s390x/ipl.h

[PATCH v4 16/19] s390x: Rebuild IPLB for SCSI device directly from DIAG308

2024-10-16 Thread jrossi
From: Jared Rossi Because virtio-scsi type devices use a non-architected IPLB pbt code they cannot be set and stored normally. Instead, the IPLB must be rebuilt during re-ipl. As s390x does not natively support multiple boot devices, the devno field is used to store the position in the boot orde

[PATCH v4 07/19] pc-bios/s390-ccw: Remove panics from ISO IPL path

2024-10-16 Thread jrossi
From: Jared Rossi Remove panic-on-error from IPL ISO El Torito specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/bootmap.h | 15 +++ pc-bios/s390-ccw/s3

[PATCH v4 10/19] pc-bios/s390-ccw: Remove panics from DASD IPL path

2024-10-16 Thread jrossi
From: Jared Rossi Remove panic-on-error from DASD IPL specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi Reviewed-by: Thomas Huth --- pc-bios/s390-ccw/dasd-ipl.h | 2 +- pc-bios

[PATCH v4 08/19] pc-bios/s390-ccw: Remove panics from ECKD IPL path

2024-10-16 Thread jrossi
From: Jared Rossi Remove panic-on-error from ECKD block device IPL specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/bootmap.h | 1 + pc-bios/s390-ccw/boot

[PATCH v4 15/19] hw/s390x: Build an IPLB for each boot device

2024-10-16 Thread jrossi
From: Jared Rossi Build an IPLB for any device with a bootindex (up to a maximum of 8 devices). The IPLB chain is placed immediately before the BIOS in memory. Because this is not a fixed address, the location of the next IPLB and number of remaining boot devices is stored in the QIPL global var

[PATCH v4 19/19] tests/qtest: Add s390x boot order tests to cdrom-test.c

2024-10-16 Thread jrossi
From: Jared Rossi Add two new qtests to verify that a valid IPL device can successfully boot after failed IPL attempts from one or more invalid devices. cdrom-test/as-fallback-device: Defines the primary boot target as a device that is invalid for IPL and a second boot target that is valid for I

[PATCH v4 14/19] s390x: Add individual loadparm assignment to CCW device

2024-10-16 Thread jrossi
From: Jared Rossi Add a loadparm property to the VirtioCcwDevice object so that different loadparms can be defined on a per-device basis for CCW boot devices. The machine/global loadparm is still supported. If both a global and per-device loadparm are defined, the per-device value will override

[PATCH v4 17/19] pc-bios/s390x: Enable multi-device boot loop

2024-10-16 Thread jrossi
From: Jared Rossi Allow attempts to boot from multiple IPL devices. If the first device fails to IPL, select the pre-built IPLB for the next device in the boot order and attempt to IPL from it. Continue this process until IPL is successful or there are no devices left to try. Signed-off-by: Jare

[PATCH v4 18/19] docs/system: Update documentation for s390x IPL

2024-10-16 Thread jrossi
From: Jared Rossi Update docs to show that s390x PC BIOS can support more than one boot device. Signed-off-by: Jared Rossi Reviewed-by: Thomas Huth --- docs/system/bootindex.rst | 7 --- docs/system/s390x/bootdevices.rst | 9 ++--- 2 files changed, 10 insertions(+), 6 deletion

[PATCH v4 11/19] pc-bios/s390-ccw: Remove panics from Netboot IPL path

2024-10-16 Thread jrossi
From: Jared Rossi Remove panic-on-error from Netboot specific functions so that error recovery may be possible in the future. Functions that would previously panic now provide a return code. Signed-off-by: Jared Rossi --- pc-bios/s390-ccw/s390-ccw.h | 2 +- pc-bios/s390-ccw/bootmap.c|

[PATCH] docs/system/s390x/bootdevices: Update loadparm documentation

2024-11-14 Thread jrossi
From: Jared Rossi Update documentation to include per-device loadparm support. Signed-off-by: Jared Rossi --- docs/system/s390x/bootdevices.rst | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/system/s390x/bootdevices.rst b/docs/system/s390x/bo

[PATCH] pc-bios/s390x: Initialize machine loadparm before probing IPL devices

2024-11-14 Thread jrossi
From: Jared Rossi Commit bb185de423 ("s390x: Add individual loadparm assignment to CCW device") allowed boot devices to be assigned a loadparm value independent of the machine value, however, when no boot devices are defined, the machine loadparm becomes ignored. Therefore, let's check the machin

[PATCH 1/1] pc-bios/s390-ccw: Abort IPL on invalid loadparm

2025-01-17 Thread jrossi
From: Jared Rossi Because the loadparm specifies an exact kernel the user wants to boot, if the loadparm is invalid it must represent a misconfiguration of the guest. Thus we should abort the IPL immediately, without attempting to use other devices, to avoid booting into an unintended guest image

[PATCH 0/1] s390x: Abort immediately on invalid loadparm

2025-01-17 Thread jrossi
From: Jared Rossi This is a small fix to the IPL behavior in case the user has entered an invalid loadparm. The loadparm is a very specific value, which must be deliberately set by the user. Therefore, if it is not valid, then it is a mistake in the guest configuration. As such, we immediately