[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 2/3] arm/mpu: Introduce `v8r_el1_msa` device tree property for domains
- To: "Orzel, Michal" <michal.orzel@xxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Mon, 11 May 2026 11:07:00 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=amd.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L+Rb7bgn0tenNgBzKaW1W4YE+T7q9qHIjclUqsrketM=; b=KP4I0IStalFg9NJV6yLvvXHZ1qBer4b0utsF3akHfrQJP/3B23EHevvylKySIDRi+n/udDLSCHhJYIY/bDgwyEr0+/t6UyEw7gNk7v4sO/Q7IVG/+IMJxxbYgXzrbIjDx04jomMgc+nLxu2CCbHGmq9z20zXsiJQnQ5ylu87LlKwnXP86ksg7U12jiNwvnyiCMHryO3EGxAsRjvEraf/0Mv5+u2Jjzl2OVBEw6WmmOtHY5XXyE2GjYUnuZdpNFVDOUdTBX4Ei51xcMkkTW2yBfbZ6VjcjxsNPn/6qf23GbjTSWPNUokKRcWKaI4BJI5QH3nuaPRVs7FTkBRkdxyNvQ==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L+Rb7bgn0tenNgBzKaW1W4YE+T7q9qHIjclUqsrketM=; b=Sh5L8f5F8gJNB21IaLVkasUka94prl5n4InGpdLCjzs2oJQqQ5/DR0lrC8J6EseI5xTUDYnFcm94QZkraWThqxublP1yKLycUEDors5UxRGgmf5TKxFsC+UDQ20pphp90gh5tbO8BrLG/G7F8PI/P2ISPdZV/jGRZCSdjX2LrdqmxCWoEgIXKP/0frVX/Wyq4GyFUKBLrtbYpysvxa7RSJqwuvfUzJAOBWZ3CerWQnMZecsOTWdypPyFlbQzp3F4ii2AMP0m/2P+PrR/II+vN09lTyZ+GD0pkRJ4URPztBgJOGvcS8o605Nkof8ktc42wZCopm9bTdocHrAGL3CJ3A==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=RZsQh0kb0+BpEMqFfpC60k08uflqJ1CtA9fg9uK4eoPKTeUzd5cYqr6iktepYv+zn0enZrbO2fg4TdrUtVU5IQBtwCNb5QOIm1qU6QaGbHuUdIo7L59WwuOo9/QbE+zUtrPql/xny6jMJCTZYtgOLwq88kIgtkrl+1O8u9mNKsGXRlUV1rwAvINSia48VZrTabi8/FVfV2it+H143fb/xpLT5vyJ46knHnHJQVYa2tSkzfzYeQ5Yxa0Ad5uo1yFr7Q6OP3Ynik5amkLkJxxdKVjO3RRNPOKLGWpm9FAl+tNQokXJq2stw5sDugb7XTSdLl6PbtW8I4+b8JpkuX6fWw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UJIy3Ef3SeK7Dq3hRj5/q8kdQnNI0jB8h87sAcFfsLyvn2LMkOTMVNQtk5+1GJ94+eawMBvulNwpdVCbBhdYWLHQ5TNDvV1iM6Z6dfHI1fhf2efR9CWlErWcF/qkmPYVk3UR2o3cvrAjJKqCPn7T1LVt/4F4zV1sbBs+otbwNsFdcsf1rfgS4PQSulhl/caWA5g3JaSqvZ2lxwyC9STnzMUppGOM5OHp5IdGjzYnJ09VWFovkO3GoMWGn1GeqZCBggwvPgf8YDNVBGfpARjHMyfQoANpouzKssV8gGGaD0KznB3sy090/1eeTubllHKOOFtcpPIXpcU5xsmrKfmolQ==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Harry Ramsey <Harry.Ramsey@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Mon, 11 May 2026 11:08:19 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHc3vfGpFkxMscyakiMWMN4gJbZfLYIoFeAgAAH44CAAAHaAIAAAMeAgAABqICAAAH9AA==
- Thread-topic: [PATCH v5 2/3] arm/mpu: Introduce `v8r_el1_msa` device tree property for domains
Hi Michal,
>>
>>>>>> +
>>>>>> +static inline bool v8r_el1_msa_domain_sanitise_config(
>>>>>> + const struct xen_domctl_createdomain *config)
>>>>> Why can't this function be common? I can see 3 definitions (Arm64 MPU,
>>>>> Arm32
>>>>> MPU, MMU) but they do not have anything that would prevent from
>>>>> generalizing
>>>>> them in a single function.
>>>>
>>>> I can do a common one I think, just to be aligned, should the common one
>>>> behaves as the current implementation?
>>>>
>>>> Arm64/32 MMU: Only v8r_el1_msa == XEN_DOMCTL_CONFIG_ARM_V8R_EL1_MSA_NONE
>>>> allowed
>>>> Arm64: Only v8r_el1_msa ==
>>>> XEN_DOMCTL_CONFIG_ARM_V8R_EL1_MSA_{NONE,PMSA,VMSA} allowed
>>>> Arm32: Only v8r_el1_msa == XEN_DOMCTL_CONFIG_ARM_V8R_EL1_MSA_{NONE,PMSA}
>>>> allowed
>>> What's the reason for allowing NONE for MPU here? None denotes property not
>>> specified but at this point it should be set to a default.
>>
>> We treat NONE as PMSA on Armv8-R, so either NONE and PMSA are valid and lead
>> to PMSA at EL1
> NONE denotes property not set i.e. set a default. IMO at the place where we
> set
> a default, NONE should be switched to PMSA. This is a cleaner solution than
> giving two options the same meaning. Sanitization could then verify that
> indeed
> the default setting took place.
Ok so this is a bit different from how all other *_NONE are handled currently
(TEE and SCI).
So on MPU Arm32/64 now we will stop the domain creation if NONE is passed, is
that the behaviour
you are expecting for DOMCTL v8r_el1_msa? (Ideally we should not get this
because we will switch
during DT parse)
Cheers,
Luca
|