qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Jared Rossi
Subject: Re: [PATCH 11/18] pc-bios/s390-ccw: Remove panics from Netboot IPL path
Date: Mon, 30 Sep 2024 09:15:51 -0400
User-agent: Mozilla Thunderbird



On 9/30/24 5:39 AM, Thomas Huth wrote:
On 27/09/2024 02.51, jrossi@linux.ibm.com wrote:
From: Jared Rossi <jrossi@linux.ibm.com>

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 <jrossi@linux.ibm.com>

---
...
index bc6ad8695f..013f94d932 100644
--- a/pc-bios/s390-ccw/netmain.c
+++ b/pc-bios/s390-ccw/netmain.c
@@ -464,7 +464,7 @@ static bool find_net_dev(Schib *schib, int dev_no)
      return false;
  }
  -static void virtio_setup(void)
+static int virtio_setup(void)
  {
      Schib schib;
      int ssid;
@@ -479,7 +479,10 @@ static void virtio_setup(void)
      enable_mss_facility();
        if (store_iplb(&iplb)) {
-        IPL_assert(iplb.pbt == S390_IPL_TYPE_CCW, "IPL_TYPE_CCW expected");
+        if (iplb.pbt != S390_IPL_TYPE_CCW) {
+            puts("IPL_TYPE_CCW expected");
+        }

I think in this case, the IPL_assert() could maybe even stay: If we end up here without the correct type in iplb.pbt, there was likely a bug elsewhere in the earlier setup code already, or do you see a way we could end up here with another type?

I agree that the panic can stay in this case. The only way that the PBT could
be wrong at this stage is if there were in error earlier when building the
IPLB, so it is appropriate to terminate the entire IPL in that case.

Jared Rossi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]