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: Thomas Huth
Subject: Re: [PATCH 11/18] pc-bios/s390-ccw: Remove panics from Netboot IPL path
Date: Mon, 30 Sep 2024 11:39:51 +0200
User-agent: Mozilla Thunderbird

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?

Anyway, if you want to change it, shouldn't there be a "return false" after the puts() statement?

 Thomas




reply via email to

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