[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251008181752.GD77665@e132581.arm.com>
Date: Wed, 8 Oct 2025 19:17:52 +0100
From: Leo Yan <leo.yan@....com>
To: Mukesh Ojha <mukesh.ojha@....qualcomm.com>
Cc: Marc Zyngier <maz@...nel.org>, Oliver Upton <oliver.upton@...ux.dev>,
joey.gouly@....com, suzuki.poulose@....com, yuzenghui@...wei.com,
catalin.marinas@....com, will@...nel.org, alexandru.elisei@....com,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: arm64: Check cpu_has_spe() before initializing
PMSCR_EL1 in VHE
On Wed, Oct 08, 2025 at 10:20:58PM +0530, Mukesh Ojha wrote:
[...]
> > > To me, this smells a lot more like some sort of papering over a
> > > firmware bug. Why isn't SPE available the first place?
> >
> > TF-a grants permission to non-secure world [1], only access from secure
> > world or realm will trap to EL3.
> >
> > So yes, it would be good to check if any issue in firmware.
>
> We have our own implementation of EL3 and not using TF-A.
If you don't fix your firmware, you won't be able to use Arm SPE with
the Linux kernel.
> I believe, we should check in a similar way as we are doing for nVHE
> case.
>
> if (host_data_test_flag(HAS_SPE))
> write_sysreg_el1(0, SYS_PMSCR);
The document Documentation/arch/arm64/booting.rst does not state that
permission for Arm SPE is mandatory, and the SPE driver [2] can
tolerate the lack of permission. So I'm fine with applying your patch
to fix the boot issue.
Thanks,
Leo
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/perf/arm_spe_pmu.c#n1084
Powered by blists - more mailing lists