[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:26:29 +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=WdlZIU2PP+msux/Ann/M7BCZaM2zeQD8OPawu/rv7VQ=; b=IiX2pNn4Xn3q2fDEsnYiMNliKrP4yQqTdEQXp+ziGatHzYo/otMkm+nwkHbF/MChZwiwBoEogGbPd3A1fVZ8STQBSdp8xjxT6Uk+gA/SVi+/iKa9rkVI3TDNFM0i756+/9zPA08xhVmaS6RF2xWHTMAa3bY0rB70HfF9PoUpBeUL2a7slL3Is3lnS34EAeHafUzhAJVtM0OQTSASWs2l82r4l/6C0lah1lvbM1jPRvaco4VCZ14c1T7RfPBDP2JQQLYnypXFspIJ53ha/OIWHzZa/z2eGWWL0aX3mzq+iF0pXFuEKQBc+d5Ut/a+rtf9N9eHMvojMA47rkID0oiQXw==
  • 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=WdlZIU2PP+msux/Ann/M7BCZaM2zeQD8OPawu/rv7VQ=; b=uK0tJdpYmutHaatBQm70d2qCPfzIqNqTIboZW+Cs7v7STNhFbq1y/6FWTxRZXqxOgLlB0hHGKwYpFUz3sOK2PWkloCgiTBla6EM8uyYVlLoRavXPaTLH5UHKqT1gxUHEH3mPKS300NJS40b1yjKK2+EkmPxST53x/pykuy2PIwXHUDj20i0DoZchvSsmJxSiUEN7ZK9G2orQXgwT4VdvINF0BASP2p+6tHe4ekmeB83bd2sKQc218f6Npvcw0waT3ChFc7KhD7wQKR1H8FPMa/spDWYNKYL5/3zU2u/frURgW4oTbXJ/ceYv0Iz/StxQJyBQHChrhrRj7DXK5kJFag==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=wKU/rZDbz3cktZ3dsQfGpCG3q4YfhxNv69pJP7ttiM3OuCH8ZzKAxoyMDX23mQaZIxcWGb8sHGEvRGtUfd4mhw5LTzzlGAsBGyUeDB+z1l6CRG3ioL/BwYJNBq8/KRa0jra/kEvCS+vD6v5Ze6BXLIDEoGky80lMMqFMPE9WBMYAj5Amn2j3CmLgNHy6slGt/teowU70lxG//eYtsJ/vGhWHdyIxNOlArGrU1C2XfKhCS4HfpU7G4KriMjqRF1og2vO+oilD4uL7wi3iwTEy4hXzI8QigKeN/N2TPU5O5r73acPwEmycbTlyTFio9A3N/j9KOe2blwEKoOuyRa1rLQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ic+AEbS6jr5NAkfSfQOyiU04MtuUIBdIjD62YSERT0f9/WV0EcclO1OoF1HynNlP4swP+pHTk7X2fOCU62EtTZZkPCIDtxZbKdceNQ2SqdHYOFH7xvURjJkRnQXD4iDOxLufYZRTdays7eh8XLihiaDgxgj5M/IMGYO9arnKFcRkIX4ocBtfiWOddIXpZrD2IQCRpFz+072hnD6fq76DYOyhlwI73VrrwT/eblvFiEp/JWr3r4nWAwHTFdmrfBgaVV+nBNx5nwsAUs29X+WDtWGoANYLxIPSVuW4lQ3UndiDMsPqPZbLnrGgByWeFHppfw7cFYYl4DY18fj/T2i/nQ==
  • 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:27:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHc3vfGpFkxMscyakiMWMN4gJbZfLYIoFeAgAAH44CAAAHaAIAAAMeAgAABqICAAAH9AIAAAx8AgAACTIA=
  • Thread-topic: [PATCH v5 2/3] arm/mpu: Introduce `v8r_el1_msa` device tree property for domains

>> 
>>>> 
>>>>>>>> +
>>>>>>>> +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)
> I think the confusion is that you are mixing the meaning of none (i.e. I don't
> want it) with not set. In case of TEE and SCI, none means you I don't want TEE
> or SCI, please disable them. Now, how would this look like for MPU. I don't 
> want
> PMSA or VMSA? This does not make any sense because it's something impossible.

ok makes sense, I will then:

Arm 64/32 MMU: allow only XEN_DOMCTL_CONFIG_ARM_V8R_EL1_MSA_NONE
Arm 64 MPU: allow XEN_DOMCTL_CONFIG_ARM_V8R_EL1_MSA_{PMSA,VMSA}
Arm 32 MPU: allow XEN_DOMCTL_CONFIG_ARM_V8R_EL1_MSA_PMSA

Cheers,
Luca




 


Rackspace

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