[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL 01/11] hw/s390x/ipl: Bail out if the network bootload
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PULL 01/11] hw/s390x/ipl: Bail out if the network bootloader can not be found |
Date: |
Thu, 8 Mar 2018 19:04:13 +0100 |
From: Thomas Huth <address@hidden>
If QEMU fails to load 's390-netboot.img', the guest firmware currently
loops forever and just floods the console with "Network boot device
detected" messages. The code in ipl.c apparently already tried to stop
the VM with vm_stop() in this case, but this is in vain since the run
state is later reset due to a call to vm_start() from vl.c again.
To avoid the ugly firmware loop, let's simply exit QEMU directly instead
since it just does not make sense to continue if the required firmware
image can not be loaded. While we're at it, also add the file name of
the netboot binary to the error message, so that the user has a better
hint about what is missing.
Signed-off-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Reviewed-by: Farhan Ali <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
hw/s390x/ipl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index 798e99aadf..8512aaacf7 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -380,7 +380,8 @@ static int load_netboot_image(Error **errp)
netboot_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, ipl->netboot_fw);
if (netboot_filename == NULL) {
- error_setg(errp, "Could not find network bootloader");
+ error_setg(errp, "Could not find network bootloader '%s'",
+ ipl->netboot_fw);
goto unref_mr;
}
@@ -489,7 +490,7 @@ void s390_ipl_prepare_cpu(S390CPU *cpu)
if (ipl->netboot) {
if (load_netboot_image(&err) < 0) {
error_report_err(err);
- vm_stop(RUN_STATE_INTERNAL_ERROR);
+ exit(1);
}
ipl->qipl.netboot_start_addr = cpu_to_be64(ipl->start_addr);
}
--
2.13.6
- [qemu-s390x] [PULL 00/11] s390x patches for the 2.12 softfreeze, Cornelia Huck, 2018/03/08
- [qemu-s390x] [PULL 02/11] s390/ipl: only print boot menu error if -boot menu=on was specified, Cornelia Huck, 2018/03/08
- [qemu-s390x] [PULL 04/11] hw/s390x: Add the possibility to specify the netboot image on the command line, Cornelia Huck, 2018/03/08
- [qemu-s390x] [PULL 05/11] numa: we don't implement NUMA for s390x, Cornelia Huck, 2018/03/08
- [qemu-s390x] [PULL 03/11] target/s390x: Remove leading underscores from #defines, Cornelia Huck, 2018/03/08
- [qemu-s390x] [PULL 01/11] hw/s390x/ipl: Bail out if the network bootloader can not be found,
Cornelia Huck <=
- [qemu-s390x] [PULL 07/11] vfio-ccw: license text should indicate GPL v2 or later, Cornelia Huck, 2018/03/08
- [qemu-s390x] [PULL 06/11] s390x/sclpconsole: Remove dead code - remove exit handlers, Cornelia Huck, 2018/03/08
- [qemu-s390x] [PULL 08/11] s390x/sclp: proper support of larger send and receive masks, Cornelia Huck, 2018/03/08
- [qemu-s390x] [PULL 09/11] s390x/sclp: clean up sclp masks, Cornelia Huck, 2018/03/08
- [qemu-s390x] [PULL 10/11] pc-bios/s390-ccw: Move string arrays from bootmap header to .c file, Cornelia Huck, 2018/03/08
- [qemu-s390x] [PULL 11/11] s390x/virtio: Convert virtio-ccw from *_exit to *_unrealize, Cornelia Huck, 2018/03/08
- Re: [qemu-s390x] [PULL 00/11] s390x patches for the 2.12 softfreeze, Peter Maydell, 2018/03/09