[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:50:40 +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=3UUBguPlhjyv2WTqU3xP1vMGoLN6aTg6DByEoeNDgSA=; b=nWGyu+WwdKBN/UhiXjPYJPZQy+tJD/Te1tO/6eUEwy6bwK4nJPXk4cxLQkO0gaC8FdH0cTi+gbYGOW23Nr8ogc5w7LNB/1+SeWiYQCXuhRE2SLIKyTkzTavGfAIub49RQQ9GMficC/QtXGjhG3FyYHz4APa80njpdKPKRnKCPL05fZBG6faPoBgvEkE/C8uPnjQls4oII8aRCJrHNwz4k5yyfM59DMD66AFg2n867TK+p9wH5IxZlRdNvudrSBjE0Ml60EwOXGg8Pj4v93x6nPTceb1UO7kIbzYtrip73owerb60dsUJDzBQ6M3sg5uh3ZP/Jnqnx5e1PcO1TFrshQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GHonaANgBEZMW45qe4mECxeVBbDz2UGXCboUQpnSbNr1LX37kwvzMF+oetjz2FV7BJ7VjT+kW1XB0/cj/Grb6dSQSA1SPZxmkYAW+u0J2jtWSs/Dh8rmmxG2t8Dd1AtOadauqMSnir1q+jL0XvjMUo4Brk60h2HPH57otBEBxcdu9nzavo3CD5EX5ia6vpe1hgjCUvT5VlYWaZhweHPEiJShAKJ0RbUrv+pPt0oz7Rrhf1CpKtHJ3mqHMP0YMzribli+J39Q+sKGW5fbACKcmatdrvClW65Xnfaq+l7EH5X4gfW1XD9rIOphg9CNAS6ZgF1tNjbu3d40Dh7qPmpiPw==
- 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:50:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 11-May-26 12:44, Luca Fancellu wrote:
> Hi Michal,
>
>>> diff --git a/xen/arch/arm/include/asm/domain_build.h
>>> b/xen/arch/arm/include/asm/domain_build.h
>>> index 6674dac5e2f8..50ddc0511e7e 100644
>>> --- a/xen/arch/arm/include/asm/domain_build.h
>>> +++ b/xen/arch/arm/include/asm/domain_build.h
>>> @@ -19,6 +19,27 @@ int prepare_acpi(struct domain *d, struct kernel_info
>>> *kinfo);
>>>
>>> int add_ext_regions(unsigned long s_gfn, unsigned long e_gfn, void *data);
>>>
>>> +#ifdef CONFIG_MPU
>>> +/* Utility function to determine if an Armv8-R processor supports VMSA. */
>>> +bool has_v8r_vmsa_support(void);
>>> +bool v8r_el1_msa_domain_sanitise_config(
>>> + const struct xen_domctl_createdomain *config);
>>> +#else
>>> +static inline bool has_v8r_vmsa_support(void)
>>> +{
>>> + return false;
>>> +}
>>> +
>>> +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.
~Michal
|