spapr: exit gentfully when CPU doesn't support requested compat mode
PATCH 1/1 spapr: exit gentfully when CPU doesn't support requested compat mode
QEMU currently aborts if the user asks something unrealistic like power9 compat mode with a POWER8 CPU for example. Since this isn't a bug in QEMU, there's no point in aborting. The same goes with the other possible error paths in ppc_set_compat_all(). Let's just terminate QEMU instead.
--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/spapr.c +1 -1
@@ -1345,7 +1345,7 @@ static void ppc_spapr_reset(void)spapr_ovec_cleanup (spapr->ov5_cas); spapr->ov5_cas =spapr_ovec_new (); -ppc_set_compat_all (spapr->max_compat_pvr, &error_abort); +ppc_set_compat_all (spapr->max_compat_pvr, &error_fatal); } fdt =spapr_build_fdt (spapr, rtas_addr, spapr->rtas_size);
Quoted 7 lines · Greg Kurz
QEMU currently aborts if the user asks something unrealistic like power9 compat mode with a POWER8 CPU for example. Since this isn't a bug in QEMU, there's no point in aborting. The same goes with the other possible error paths in
ppc_set_compat_all(). Let's just terminate QEMU instead.Reported-by Andrea Bolognani <[email protected]>Signed-off-by Greg Kurz <[email protected]>
Heh, I already folded an identical fix into ppc-for-2.10.
Quoted 18 lines
--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/ppc/spapr.c +1
-1@@ -1345,7 +1345,7 @@ static void ppc_spapr_reset(void)spapr_ovec_cleanup (spapr->ov5_cas); spapr->ov5_cas =spapr_ovec_new (); -ppc_set_compat_all (spapr->max_compat_pvr, &error_abort); +ppc_set_compat_all (spapr->max_compat_pvr, &error_fatal); } fdt =spapr_build_fdt (spapr, rtas_addr, spapr->rtas_size);
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 11 lines · On Tue, 13 Jun 2017 16:45:55 +0800 David Gibson <[email protected]>…
Quoted 7 lines · Greg Kurz
QEMU currently aborts if the user asks something unrealistic like power9 compat mode with a POWER8 CPU for example. Since this isn't a bug in QEMU, there's no point in aborting. The same goes with the other possible error paths in
ppc_set_compat_all(). Let's just terminate QEMU instead.Reported-by Andrea Bolognani <[email protected]>Signed-off-by Greg Kurz <[email protected]>Heh, I already folded an identical fix into ppc-for-2.10.
Yeah I saw your other mail just after sending this :)
Quoted 20 lines
Quoted 19 lines
--- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/ppc/spapr.c +1
-1@@ -1345,7 +1345,7 @@ static void ppc_spapr_reset(void)spapr_ovec_cleanup (spapr->ov5_cas); spapr->ov5_cas =spapr_ovec_new (); -ppc_set_compat_all (spapr->max_compat_pvr, &error_abort); +ppc_set_compat_all (spapr->max_compat_pvr, &error_fatal); } fdt =spapr_build_fdt (spapr, rtas_addr, spapr->rtas_size);