qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] spapr: exit gentfully when CPU doesn't support requested compat mode
@ 2017-06-13  8:26 Greg Kurz
  2017-06-13  8:45 ` David Gibson
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kurz @ 2017-06-13  8:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-ppc, Andrea Bolognani, David Gibson

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 <abologna@redhat.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
---
 hw/ppc/spapr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index b2217f39eeea..d0cc124935c0 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] spapr: exit gentfully when CPU doesn't support requested compat mode
  2017-06-13  8:26 [Qemu-devel] [PATCH] spapr: exit gentfully when CPU doesn't support requested compat mode Greg Kurz
@ 2017-06-13  8:45 ` David Gibson
  2017-06-13  8:50   ` Greg Kurz
  0 siblings, 1 reply; 3+ messages in thread
From: David Gibson @ 2017-06-13  8:45 UTC (permalink / raw)
  To: Greg Kurz; +Cc: qemu-devel, qemu-ppc, Andrea Bolognani

[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]

On Tue, Jun 13, 2017 at 10:26:02AM +0200, Greg Kurz wrote:
> 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 <abologna@redhat.com>
> Signed-off-by: Greg Kurz <groug@kaod.org>

Heh, I already folded an identical fix into ppc-for-2.10.


> ---
>  hw/ppc/spapr.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index b2217f39eeea..d0cc124935c0 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -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);
> 

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] spapr: exit gentfully when CPU doesn't support requested compat mode
  2017-06-13  8:45 ` David Gibson
@ 2017-06-13  8:50   ` Greg Kurz
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kurz @ 2017-06-13  8:50 UTC (permalink / raw)
  To: David Gibson; +Cc: qemu-devel, qemu-ppc, Andrea Bolognani

[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]

On Tue, 13 Jun 2017 16:45:55 +0800
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Tue, Jun 13, 2017 at 10:26:02AM +0200, Greg Kurz wrote:
> > 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 <abologna@redhat.com>
> > Signed-off-by: Greg Kurz <groug@kaod.org>  
> 
> Heh, I already folded an identical fix into ppc-for-2.10.
> 

Yeah I saw your other mail just after sending this :)

> 
> > ---
> >  hw/ppc/spapr.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > index b2217f39eeea..d0cc124935c0 100644
> > --- a/hw/ppc/spapr.c
> > +++ b/hw/ppc/spapr.c
> > @@ -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);
> >   
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-13  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-13  8:26 [Qemu-devel] [PATCH] spapr: exit gentfully when CPU doesn't support requested compat mode Greg Kurz
2017-06-13  8:45 ` David Gibson
2017-06-13  8:50   ` Greg Kurz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).