All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: Matheus Ferst <matheus.ferst@eldorado.org.br>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: clg@kaod.org, david@gibson.dropbear.id.au, groug@kaod.org,
	farosas@linux.ibm.com, laurent@vivier.eu
Subject: Re: [PATCH 6/6] target/ppc: fix exception error code in spr_write_excp_vector
Date: Wed, 13 Jul 2022 17:08:32 -0300	[thread overview]
Message-ID: <bd97a38f-0b4a-1ead-d339-b0b8d9170260@gmail.com> (raw)
In-Reply-To: <20220627141104.669152-7-matheus.ferst@eldorado.org.br>



On 6/27/22 11:11, Matheus Ferst wrote:
> The 'error' argument of gen_inval_exception will be or-ed with
> POWERPC_EXCP_INVAL, so it should always be a constant prefixed with
> POWERPC_EXCP_INVAL_. No functional change is intended,
> spr_write_excp_vector is only used by register_BookE_sprs, and
> powerpc_excp_booke ignores the lower 4 bits of the error code on
> POWERPC_EXCP_INVAL exceptions.
> 
> Also, take the opportunity to replace printf with qemu_log_mask.
> 
> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
> ---

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>

>   target/ppc/translate.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target/ppc/translate.c b/target/ppc/translate.c
> index 30dd524959..da11472877 100644
> --- a/target/ppc/translate.c
> +++ b/target/ppc/translate.c
> @@ -907,9 +907,9 @@ void spr_write_excp_vector(DisasContext *ctx, int sprn, int gprn)
>       } else if (sprn >= SPR_BOOKE_IVOR38 && sprn <= SPR_BOOKE_IVOR42) {
>           sprn_offs = sprn - SPR_BOOKE_IVOR38 + 38;
>       } else {
> -        printf("Trying to write an unknown exception vector %d %03x\n",
> -               sprn, sprn);
> -        gen_inval_exception(ctx, POWERPC_EXCP_PRIV_REG);
> +        qemu_log_mask(LOG_GUEST_ERROR, "Trying to write an unknown exception"
> +                      " vector 0x%03x\n", sprn);
> +        gen_inval_exception(ctx, POWERPC_EXCP_INVAL_INVAL);
>           return;
>       }
>   


  reply	other threads:[~2022-07-13 20:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 14:10 [PATCH 0/6] Fix gen_*_exception error codes Matheus Ferst
2022-06-27 14:10 ` [PATCH 1/6] target/ppc: Fix gen_priv_exception error value in mfspr/mtspr Matheus Ferst
2022-06-27 14:11 ` [PATCH 2/6] target/ppc: fix exception error value in slbfee Matheus Ferst
2022-07-13 20:05   ` Daniel Henrique Barboza
2022-06-27 14:11 ` [PATCH 3/6] target/ppc: remove mfdcrux and mtdcrux Matheus Ferst
2022-06-27 17:49   ` Fabiano Rosas
2022-06-27 14:11 ` [PATCH 4/6] target/ppc: fix exception error code in helper_{load, store}_dcr Matheus Ferst
2022-07-13 20:07   ` [PATCH 4/6] target/ppc: fix exception error code in helper_{load,store}_dcr Daniel Henrique Barboza
2022-06-27 14:11 ` [PATCH 5/6] target/ppc: fix PMU Group A register read/write exceptions Matheus Ferst
2022-06-27 18:00   ` Daniel Henrique Barboza
2022-06-27 14:11 ` [PATCH 6/6] target/ppc: fix exception error code in spr_write_excp_vector Matheus Ferst
2022-07-13 20:08   ` Daniel Henrique Barboza [this message]
2022-07-14 13:00 ` [PATCH 0/6] Fix gen_*_exception error codes Daniel Henrique Barboza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd97a38f-0b4a-1ead-d339-b0b8d9170260@gmail.com \
    --to=danielhb413@gmail.com \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=farosas@linux.ibm.com \
    --cc=groug@kaod.org \
    --cc=laurent@vivier.eu \
    --cc=matheus.ferst@eldorado.org.br \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.