When QEMU fails to load the kernel or initrd image, it previously emitted a generic error message such as:
qemu-system-ppc64: Could not load kernel 'vmlinux' This provides little context on why the failure occurred, which can make debugging difficult, especially for new users or when dealing with large images. The new messages also include the configured size limits (in MiB) to help users verify that their image files are within acceptable bounds. Signed-off-by: Vishal Chourasia <[email protected]> --- hw/ppc/pnv.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index f0469cdb8b..dbecb721c1 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -1084,6 +1084,10 @@ static void pnv_init(MachineState *machine) if (kernel_size < 0) { error_report("Could not load kernel '%s'", machine->kernel_filename); + error_report( + "Possible reasons: file not found, permission denied, or size " + "exceeds the maximum supported limit (%ld MiB).", + KERNEL_MAX_SIZE / 1024 / 1024); exit(1); } } @@ -1096,6 +1100,10 @@ static void pnv_init(MachineState *machine) if (pnv->initrd_size < 0) { error_report("Could not load initial ram disk '%s'", machine->initrd_filename); + error_report( + "Possible reasons: file not found, permission denied, or size " + "exceeds the maximum supported limit (%ld MiB).", + INITRD_MAX_SIZE / 1024 / 1024); exit(1); } } -- 2.51.0
