From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvxgM-0002ak-4V for qemu-devel@nongnu.org; Tue, 23 Aug 2011 16:34:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvxgK-0006Cn-Hg for qemu-devel@nongnu.org; Tue, 23 Aug 2011 16:34:46 -0400 Received: from mail-fx0-f45.google.com ([209.85.161.45]:39618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvxgK-0006Cd-7w for qemu-devel@nongnu.org; Tue, 23 Aug 2011 16:34:44 -0400 Received: by fxbb27 with SMTP id b27so580637fxb.4 for ; Tue, 23 Aug 2011 13:34:43 -0700 (PDT) Date: Tue, 23 Aug 2011 22:34:40 +0200 From: "Edgar E. Iglesias" Message-ID: <20110823203440.GA20917@zapo> References: <1314075344-20839-1-git-send-email-agraf@suse.de> <1314075344-20839-2-git-send-email-agraf@suse.de> <1314075344-20839-3-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1314075344-20839-3-git-send-email-agraf@suse.de> Subject: Re: [Qemu-devel] [PATCH 2/3] PPC: E500: Inject SPE exception on invalid SPE access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: scottwood@freescale.com, qemu-devel@nongnu.org On Tue, Aug 23, 2011 at 06:55:43AM +0200, Alexander Graf wrote: > When accessing an SPE instruction despite it being not available, > throw an SPE exception instead of an APU exception. That way the > guest knows what's going on and actually uses SPE. > > Reported-by: Jason Wessel > Signed-off-by: Alexander Graf > --- > target-ppc/translate.c | 78 ++++++++++++++++++++++++------------------------ > 1 files changed, 39 insertions(+), 39 deletions(-) > > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > index fd7c208..f36363a 100644 > --- a/target-ppc/translate.c > +++ b/target-ppc/translate.c > @@ -6622,7 +6622,7 @@ static inline void gen_evmra(DisasContext *ctx) > { > > if (unlikely(!ctx->spe_enabled)) { > - gen_exception(ctx, POWERPC_EXCP_APU); > + gen_exception(ctx, POWERPC_EXCP_SPEU); > return; > } > > @@ -6693,7 +6693,7 @@ static inline void gen_speundef(DisasContext *ctx) > static inline void gen_##name(DisasContext *ctx) \ > { \ > if (unlikely(!ctx->spe_enabled)) { \ > - gen_exception(ctx, POWERPC_EXCP_APU); \ > + gen_exception(ctx, POWERPC_EXCP_SPEU); \ ^^ I've applied this (with a minor whitespace change), thanks Alex. Cheers