qemu-s390x
[Top][All Lists]
Advanced

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

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


From: Thomas Huth
Subject: Re: [PATCH 09/18] pc-bios/s390-ccw: Remove panics from SCSI IPL path
Date: Mon, 30 Sep 2024 12:13:34 +0200
User-agent: Mozilla Thunderbird

On 30/09/2024 09.48, 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 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 <jrossi@linux.ibm.com>

---
...
@@ -572,23 +575,37 @@ static void zipl_load_segment(ComponentEntry *entry)
              }
              address = virtio_load_direct(cur_desc[0], cur_desc[1], 0,
                                           (void *)address);
-            IPL_assert(address != -1, "zIPL load segment failed");
+            if (!address) {

Shouldn't that be "if (address == -1)" or "if (address < 0)" instead?

Hmm, virtio_load_direct() seems to return an "unsigned long", so maybe that one rather needs to be fixed, too?

(see my comments on patch 12)

+                puts("zIPL load segment failed");
+                return -EIO;
+            }
          }
      } while (blockno);
+
+    return 0;
  }
...
@@ -78,24 +84,30 @@ static void prepare_request(VDev *vdev, const void *cdb, int cdb_size,
      }
  }
-static inline void vs_io_assert(bool term, const char *msg)
+static inline bool vs_io_assert(bool term, const char *msg)
  {
-    if (!term) {
-        virtio_scsi_verify_response(&resp, msg);
+    if (!term && !virtio_scsi_verify_response(&resp, msg)) {

Should that be "||" instead of "&&" ?

Ah, never mind, I got it wrong, the "&&" should be fine here.

 Thomas




reply via email to

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