All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hw/arm/boot: fix SVE for EL3 direct kernel boot
@ 2020-10-30 15:15 remi
  2020-10-30 18:55 ` Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: remi @ 2020-10-30 15:15 UTC (permalink / raw)
  To: qemu-arm; +Cc: qemu-devel

From: Rémi Denis-Courmont <remi.denis.courmont@huawei.com>

When booting a CPU with EL3 using the -kernel flag, set up CPTR_EL3 so
that SVE will not trap to EL3.

Signed-off-by: Rémi Denis-Courmont <remi.denis.courmont@huawei.com>
---
 hw/arm/boot.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 3e9816af80..cf97600a91 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -742,6 +742,9 @@ static void do_cpu_reset(void *opaque)
                     if (cpu_isar_feature(aa64_mte, cpu)) {
                         env->cp15.scr_el3 |= SCR_ATA;
                     }
+                    if (cpu_isar_feature(aa64_sve, cpu)) {
+                        env->cp15.cptr_el[3] |= CPTR_EZ;
+                    }
                     /* AArch64 kernels never boot in secure mode */
                     assert(!info->secure_boot);
                     /* This hook is only supported for AArch32 currently:
-- 
2.29.1



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

* Re: [PATCH] hw/arm/boot: fix SVE for EL3 direct kernel boot
  2020-10-30 15:15 [PATCH] hw/arm/boot: fix SVE for EL3 direct kernel boot remi
@ 2020-10-30 18:55 ` Richard Henderson
  2020-11-02 11:43   ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2020-10-30 18:55 UTC (permalink / raw)
  To: remi, qemu-arm; +Cc: qemu-devel

On 10/30/20 8:15 AM, remi@remlab.net wrote:
> From: Rémi Denis-Courmont <remi.denis.courmont@huawei.com>
> 
> When booting a CPU with EL3 using the -kernel flag, set up CPTR_EL3 so
> that SVE will not trap to EL3.
> 
> Signed-off-by: Rémi Denis-Courmont <remi.denis.courmont@huawei.com>
> ---
>  hw/arm/boot.c | 3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~


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

* Re: [PATCH] hw/arm/boot: fix SVE for EL3 direct kernel boot
  2020-10-30 18:55 ` Richard Henderson
@ 2020-11-02 11:43   ` Peter Maydell
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2020-11-02 11:43 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-arm, QEMU Developers, Rémi Denis-Courmont

On Fri, 30 Oct 2020 at 18:56, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 10/30/20 8:15 AM, remi@remlab.net wrote:
> > From: Rémi Denis-Courmont <remi.denis.courmont@huawei.com>
> >
> > When booting a CPU with EL3 using the -kernel flag, set up CPTR_EL3 so
> > that SVE will not trap to EL3.
> >
> > Signed-off-by: Rémi Denis-Courmont <remi.denis.courmont@huawei.com>
> > ---
> >  hw/arm/boot.c | 3 +++
> >  1 file changed, 3 insertions(+)
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>



Applied to target-arm.next, thanks.

-- PMM


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

end of thread, other threads:[~2020-11-02 11:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-30 15:15 [PATCH] hw/arm/boot: fix SVE for EL3 direct kernel boot remi
2020-10-30 18:55 ` Richard Henderson
2020-11-02 11:43   ` Peter Maydell

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.