From: Nicholas Piggin <npiggin@gmail.com>
To: "Cédric Le Goater" <clg@kaod.org>,
"David Gibson" <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, Greg Kurz <groug@kaod.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH] target/ppc: Do not check for LPCR[HAIL] on power10_v1.0 CPUs
Date: Tue, 04 May 2021 20:49:16 +1000 [thread overview]
Message-ID: <1620125242.e97yybasbv.astroid@bobo.none> (raw)
In-Reply-To: <20210504095900.505668-1-clg@kaod.org>
Excerpts from Cédric Le Goater's message of May 4, 2021 7:59 pm:
> The LPCR[HAIL] bit only applies to POWER10 DD2 CPUs. On POWER10 DD1,
> the ail value should be extracted using the LPCR_AIL mask like on P9.
>
> Cc: Nicholas Piggin <npiggin@gmail.com>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Thanks for this, my oversight for not realising the P10 CPU is DD1
(which doesn't have HAIL).
I wonder if it could just use the POWER9 excp_model?
> ---
> target/ppc/excp_helper.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
> index c0605f84d70f..ba18444f5d1e 100644
> --- a/target/ppc/excp_helper.c
> +++ b/target/ppc/excp_helper.c
> @@ -198,6 +198,7 @@ static inline void ppc_excp_apply_ail(PowerPCCPU *cpu, int excp_model, int excp,
> target_ulong *vector)
> {
> #if defined(TARGET_PPC64)
> + PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
> CPUPPCState *env = &cpu->env;
> bool mmu_all_on = ((msr >> MSR_IR) & 1) && ((msr >> MSR_DR) & 1);
> bool hv_escalation = !(msr & MSR_HVB) && (*new_msr & MSR_HVB);
> @@ -240,7 +241,7 @@ static inline void ppc_excp_apply_ail(PowerPCCPU *cpu, int excp_model, int excp,
> return;
> }
>
> - if (*new_msr & MSR_HVB) {
> + if (*new_msr & MSR_HVB && pcc->lpcr_mask & LPCR_HAIL) {
> if (!(env->spr[SPR_LPCR] & LPCR_HAIL)) {
> /* HV interrupts depend on LPCR[HAIL] */
> return;
> --
> 2.26.3
>
>
next prev parent reply other threads:[~2021-05-04 10:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 9:59 [PATCH] target/ppc: Do not check for LPCR[HAIL] on power10_v1.0 CPUs Cédric Le Goater
2021-05-04 10:49 ` Nicholas Piggin [this message]
2021-05-04 11:54 ` Cédric Le Goater
2021-05-05 5:00 ` David Gibson
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=1620125242.e97yybasbv.astroid@bobo.none \
--to=npiggin@gmail.com \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--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 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).