qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH] ppc: abort if compat property contains an unknown


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCH] ppc: abort if compat property contains an unknown value
Date: Thu, 14 Jul 2016 12:07:40 +1000
User-agent: Mutt/1.6.1 (2016-04-27)

On Wed, Jul 13, 2016 at 12:00:17PM +0200, Greg Kurz wrote:
> It is not possible to set the compat property to an unknown value with
> powerpc_set_compat(). Something must have gone terribly wrong in QEMU,
> if we detect an "Internal error" in powerpc_get_compat(). Let's abort then.
> 
> This patch also drops the "max_compat ? *max_compat : -1" construct. It is
> useless since max_compat is dereferenced a few lines above.
> 
> Signed-off-by: Greg Kurz <address@hidden>

Applied to ppc-for-2.7, thanks.

> ---
>  target-ppc/translate_init.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index 55688db9c9db..79c86c477878 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
> @@ -8446,8 +8446,8 @@ static void powerpc_get_compat(Object *obj, Visitor *v, 
> const char *name,
>      case 0:
>          break;
>      default:
> -        error_setg(errp, "Internal error: compat is set to %x",
> -                   max_compat ? *max_compat : -1);
> +        error_report("Internal error: compat is set to %x", *max_compat);
> +        abort();
>          break;
>      }
>  
> 

-- 
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: signature.asc
Description: PGP signature


reply via email to

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