[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: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Mon, 11 May 2026 12:59:23 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=Nl5j1KA24WKyWFg5Cml4YccFJsGQDTn/KT7vL1qPicE=; b=TtHdBCZnG65nZn59TgIBtF8J+MLfJLg2pMXmdoGbGgLUkeBxfWkbbgaXX1uYdW/gFxJ1KJRqxB6LtUi5S/+AZ/5JnC7bTicb742OaP/IanBxqWRd17v8ADoX3HbcEwVv4WwsqHXVYmzhRLsPItG0PnFHgu11sdPkCoE8ch7PVC8ZE6WjfQmj96nHkLy2c+IT7RvxvQm+W7dm3P0m7hU7YBuuzCWPCF121nRXYbUeO5Zl8rpBu4abYdeFBxTbW++AIC5obhbjR1R/0+sJ3WNgNfLhqbCOjtu1NBMH8bmRkjlFPgnYSMUWkrEFmd+LKWHtbbTam9RAFb2/d/Vj9GH2tg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FYW2gu6S/fhkiKQrSPHp4XzQB6iwUv+tjdVYofClcYGZmMvnWWRYcrScJAgQaR+v/4OPE/Eh5ZezYKnzeprC/H5U8GiUoEU7yfeGPOLPU5VTxa//T1P0Y8xx9+U+mi2qR4Vt+asVGSy0G3eEYunEugBTgWbkonZUYN9HydZBjuvhqBTAxf+1VTNkfeq5v7ReXH2jqGJT8iS9efmRvdXyqrWSWOOvKTHyGwcazLn/it/vvEgetFHFRQYYFrOD/4DYcRw/5dsRurEhnJjC6QvPJ0IO1jbjWCAT1C3CBgjj9PuZ+GWViCvyPgCPCvkV817auVRFFcdG0dKWhX3ehYA/Jw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • 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 10:59:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 11-May-26 12:53, Luca Fancellu wrote:
> 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.

~Michal




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.