[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ed690c50-5188-e5f5-962a-b2b87d7ecf60@arm.com>
Date: Tue, 11 Apr 2023 17:57:34 +0100
From: Kristina Martsenko <kristina.martsenko@....com>
To: Catalin Marinas <catalin.marinas@....com>
Cc: linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev,
Will Deacon <will@...nel.org>, Marc Zyngier <maz@...nel.org>,
Oliver Upton <oliver.upton@...ux.dev>,
James Morse <james.morse@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Zenghui Yu <yuzenghui@...wei.com>,
Mark Rutland <mark.rutland@....com>,
Mark Brown <broonie@...nel.org>,
Luis Machado <luis.machado@....com>,
Vladimir Murzin <vladimir.murzin@....com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/10] arm64: mops: document boot requirements for MOPS
On 04/04/2023 11:50, Catalin Marinas wrote:
> On Fri, Mar 24, 2023 at 01:00:43AM +0000, Kristina Martsenko wrote:
>> On 17/03/2023 15:07, Catalin Marinas wrote:
>>> On Thu, Feb 16, 2023 at 04:00:06PM +0000, Kristina Martsenko wrote:
>>>> + For CPUs with Memory Copy and Memory Set instructions (FEAT_MOPS):
>>>> +
>>>> + - If the kernel is entered at EL1 and EL2 is present:
>>>> +
>>>> + - HCRX_EL2.MSCEn (bit 11) must be initialised to 0b1.
>>>> +
>>>> + - HCRX_EL2.MCE2 (bit 10) must be initialised to 0b0.
>>>
>>> Regarding MCE2, does EL1 actually care if EL2 wants to handle all the
>>> memcpy/memset exceptions?
>>
>> Note that this series does not add support for mops in guests yet.
>
> You mean there's no KVM support. But Linux may be run under a different
> hypervisor (e.g. Hyper-V) as a guest.
>
>> I think booting.txt can be updated when that support is added.
>
> In booting.txt, when you say the kernel entered at EL1, it implies that
> it may be run as a guest under a random hypervisor.
>
> So maybe we should detail the MCE2 requirement a bit, saying that it can
> be either 0 or 1 but, for the latter, the hypervisor must handle the
> corresponding exceptions.
That makes sense. I was going to add this, but then realized that MCE2 only
traps memcpy exceptions from EL1, not EL0, so it does not have any effect with
this series. So I think we can just drop the MCE2 requirement entirely for now
and specify the requirement later when we add memcpy instructions into the
kernel itself.
Thanks,
Kristina
Powered by blists - more mailing lists