[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/2] xen/arm: mpu: Move some of the definitions to common file


  • To: Ayan Kumar Halder <ayankuma@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Wed, 5 Mar 2025 15:56:15 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • 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=v+UdBwJd0w0TKG4z/Dod7jgy+alHNvbEKUZojfNqXQE=; b=BaFV3u3djjuGH9sDnendnI8e65dNTbu+j7tLCf/5HKXsnNrsObRGYfBaaMGOOxJO8bteBeRecVi4iTeitQXT4GexkX60FL9V+q6p9MFLG2hRRrlUXui8RZ8j/4rTIXUuwjiQZcH2ly00JT20FTMdfqVDzaX/83zAJcnAMXczZ9/Bnu9hgaXgDw8UqUI90mDpBMAFXzb/pV5e6mELNHTFOpw2rRjTEYcqyP4W8LC4RaXQQpDtlVnMo/Fwptqyc92uJ7rnyOqYU4+cBK7rA7QGOn6abim1oRThdsB6VwKt6KoSKa5/ho9e3Y+oDh5IiI910eBXBy211VE1eQSAbuLM6A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eqx08f9eVDLpFitODAQYrCwighUmM2p2v3SlhpUp2MzeDpdmdre8+7urC5UGKLwqK1oATSiTLD7jOfDFYEml0KcPLhv3TM0JWm3gGbueq84WWAkURmNHVVCkvwqA9eupr9q7VScqsM4URHuGppbB1k/jaYtz5KBZ3qBYaPxiiREQ6LvA4vN74LNQ5tmd7+xumpxBeRj6PpN6VxFVTtFGqYtnJ0maEsWWXUa/ZDCGm+PIoSKsHSFc4I8pEmKxsJGHHPdoAGj2sq1oWLWlLUePkQPF8yZQWYIKgJkkbLQ84O91ZZdeh4OOQqJBe/+1yzJ6lj7FHe7B2FAnfXeGDXSiNg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>
  • Delivery-date: Wed, 05 Mar 2025 14:56:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 05/03/2025 10:37, Ayan Kumar Halder wrote:
> Hi Michal
> 
> On 05/03/2025 07:28, Orzel, Michal wrote:
>>
>> On 04/03/2025 18:57, Ayan Kumar Halder wrote:
>>> For AArch32, refer to ARM DDI 0568A.c ID110520.
>>> MPU_REGION_SHIFT is same between AArch32 and AArch64 (HPRBAR).
>>> Also, NUM_MPU_REGIONS_SHIFT is same between AArch32 and AArch64
>>> (HMPUIR).
>>>
>>> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
>>> Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>>> ---
>>> Changes from
>>>
>>> v1 - 1. Add the R-b.
>>>
>>>   xen/arch/arm/arm64/mpu/head.S              | 2 +-
>>>   xen/arch/arm/include/asm/early_printk.h    | 2 +-
>>>   xen/arch/arm/include/asm/{arm64 => }/mpu.h | 6 +++---
>>>   3 files changed, 5 insertions(+), 5 deletions(-)
>>>   rename xen/arch/arm/include/asm/{arm64 => }/mpu.h (87%)
>>>
>>> diff --git a/xen/arch/arm/arm64/mpu/head.S b/xen/arch/arm/arm64/mpu/head.S
>>> index e4f2021f45..7b659aa42b 100644
>>> --- a/xen/arch/arm/arm64/mpu/head.S
>>> +++ b/xen/arch/arm/arm64/mpu/head.S
>>> @@ -3,7 +3,7 @@
>>>    * Start-of-day code for an Armv8-R MPU system.
>>>    */
>>>   
>>> -#include <asm/arm64/mpu.h>
>>> +#include <asm/mpu.h>
>>>   #include <asm/early_printk.h>
>> These should be sorted alphabetically
>>
>>>   
>>>   /* Backgroud region enable/disable */
>>> diff --git a/xen/arch/arm/include/asm/early_printk.h 
>>> b/xen/arch/arm/include/asm/early_printk.h
>>> index 219705a8b6..644fd0fcfb 100644
>>> --- a/xen/arch/arm/include/asm/early_printk.h
>>> +++ b/xen/arch/arm/include/asm/early_printk.h
>>> @@ -11,7 +11,7 @@
>>>   #define __ARM_EARLY_PRINTK_H__
>>>   
>>>   #include <xen/page-size.h>
>>> -#include <asm/arm64/mpu.h>
>>> +#include <asm/mpu.h>
>>>   #include <asm/fixmap.h>
>> These should be sorted alphabetically
> This and ..
>>
>>>   
>>>   #ifdef CONFIG_EARLY_PRINTK
>>> diff --git a/xen/arch/arm/include/asm/arm64/mpu.h 
>>> b/xen/arch/arm/include/asm/mpu.h
>>> similarity index 87%
>>> rename from xen/arch/arm/include/asm/arm64/mpu.h
>>> rename to xen/arch/arm/include/asm/mpu.h
>>> index f8a029f1a1..40fa6eaaca 100644
>>> --- a/xen/arch/arm/include/asm/arm64/mpu.h
>>> +++ b/xen/arch/arm/include/asm/mpu.h
>>> @@ -3,8 +3,8 @@
>>>    * mpu.h: Arm Memory Protection Unit definitions.
>>>    */
>>>   
>>> -#ifndef __ARM64_MPU_H__
>>> -#define __ARM64_MPU_H__
>>> +#ifndef __ARM_MPU_H__
>>> +#define __ARM_MPU_H__
>>>   
>>>   #define MPU_REGION_SHIFT  6
>>>   #define MPU_REGION_ALIGN  (_AC(1, UL) << MPU_REGION_SHIFT)
>>> @@ -13,7 +13,7 @@
>>>   #define NUM_MPU_REGIONS_SHIFT   8
>>>   #define NUM_MPU_REGIONS         (_AC(1, UL) << NUM_MPU_REGIONS_SHIFT)
>>>   #define NUM_MPU_REGIONS_MASK    (NUM_MPU_REGIONS - 1)
>>> -#endif /* __ARM64_MPU_H__ */
>>> +#endif /* __ARM_MPU_H__ */
>> Would you mind adding extra line between last definition and #endif?
> 
> this, can you fix them on commit, please ? Or do you want me to send a v3.
If I end up committing this patch (I can do that tomorrow), then I can do these
changes on commit.

~Michal




 


Rackspace

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