[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <61b0e30a-568c-d7f6-7b67-e9fc8b68de25@arm.com>
Date: Fri, 24 Mar 2023 01:00:43 +0000
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 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?
No, EL1 does not need to handle the exceptions itself, but I don't see any
current use case for allowing EL2 to handle it.
If it was allowed, I think booting.txt would need to specify exactly what Linux
expects EL2 to do if MCE2 is set (eg, that EL2 handles the exception by
reformatting registers, modifying single step state, etc).
> There may even be a valid case to do this at
> EL2 if you run a guest that uses these instructions but has no clue on
> how to deal with the specific exception like WrongOption.
Not sure I follow - this series adds the exception handling, so how can a Linux
guest not know how to handle the exception?
Or do you mean that there may be times when EL1 can't take the exception but
EL2 may move it to another CPU, and so EL2 would need to handle the exception?
I'm not sure if Linux ever uses mops instructions at times like that. Note that
this series does not add support for mops in guests yet. I think booting.txt
can be updated when that support is added.
Thanks,
Kristina
Powered by blists - more mailing lists