[PATCH 3/5] arm64: mops: Document booting requirement for HCR_EL2.MCE2

Kristina Martsenko kristina.martsenko at arm.com
Wed Oct 2 06:31:47 PDT 2024


On 02/10/2024 11:38, Catalin Marinas wrote:
> On Mon, Sep 30, 2024 at 05:10:49PM +0100, Kristina Martsenko wrote:
>> diff --git a/Documentation/arch/arm64/booting.rst b/Documentation/arch/arm64/booting.rst
>> index b57776a68f15..db46af5b9f0f 100644
>> --- a/Documentation/arch/arm64/booting.rst
>> +++ b/Documentation/arch/arm64/booting.rst
>> @@ -385,6 +385,9 @@ Before jumping into the kernel, the following conditions must be met:
>>  
>>      - HCRX_EL2.MSCEn (bit 11) must be initialised to 0b1.
>>  
>> +    - HCRX_EL2.MCE2 (bit 10) must be initialised to 0b1. The exception
>> +      handler must set PSTATE.SS to 0b0.
> 
> That's a booting document, do we need to specify the single-step
> exception?

A hypervisor can't just set MCE2 at kernel boot without also implementing an
exception handler for MOPS exceptions. The handler needs to implement the
algorithm from the Arm ARM, and in addition the kernel needs it to also clear
SS so that breakpoints/watchpoints (and KGDB single stepping) work as expected.
Is there a better place to specify this?

Thanks,
Kristina




More information about the linux-arm-kernel mailing list