Hi Ayan,

> On 4 Mar 2025, at 10:53, Ayan Kumar Halder <ayank...@amd.com> wrote:
> 
> Hi Luca,
> 
> On 28/02/2025 16:18, Luca Fancellu wrote:
>> CAUTION: This message has originated from an External Source. Please use 
>> proper judgment and caution when opening attachments, clicking links, or 
>> responding to this email.
>> 
>> 
>> From: Penny Zheng <penny.zh...@arm.com>
>> 
>> Introduce pr_t typedef which is a structure having the prbar
>> and prlar members, each being structured as the registers of
>> the aarch64 armv8-r architecture.
>> 
>> Introduce the array 'xen_mpumap' that will store a view of
>> the content of the MPU regions.
>> 
>> Introduce MAX_MPU_REGIONS macro that uses the value of
>> NUM_MPU_REGIONS_MASK just for clarity, because using the
>> latter as number of elements of the xen_mpumap array might
>> be misleading.
>> 
>> Signed-off-by: Penny Zheng <penny.zh...@arm.com>
>> Signed-off-by: Wei Chen <wei.c...@arm.com>
>> Signed-off-by: Luca Fancellu <luca.fance...@arm.com>
>> ---
>>  xen/arch/arm/Makefile                |  1 +
>>  xen/arch/arm/include/asm/arm64/mpu.h | 38 ++++++++++++++++++++++++++++
>>  xen/arch/arm/mpu/Makefile            |  1 +
>>  xen/arch/arm/mpu/mm.c                | 23 +++++++++++++++++
>>  4 files changed, 63 insertions(+)
>>  create mode 100644 xen/arch/arm/mpu/Makefile
>>  create mode 100644 xen/arch/arm/mpu/mm.c
>> 
>> diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
>> index 43ab5e8f2550..fb0948f067bd 100644
>> --- a/xen/arch/arm/Makefile
>> +++ b/xen/arch/arm/Makefile
>> @@ -1,6 +1,7 @@
>>  obj-$(CONFIG_ARM_32) += arm32/
>>  obj-$(CONFIG_ARM_64) += arm64/
>>  obj-$(CONFIG_MMU) += mmu/
>> +obj-$(CONFIG_MPU) += mpu/
>>  obj-$(CONFIG_ACPI) += acpi/
>>  obj-$(CONFIG_HAS_PCI) += pci/
>>  ifneq ($(CONFIG_NO_PLAT),y)
>> diff --git a/xen/arch/arm/include/asm/arm64/mpu.h 
>> b/xen/arch/arm/include/asm/arm64/mpu.h
>> index f8a029f1a135..38dbf5b2255a 100644
>> --- a/xen/arch/arm/include/asm/arm64/mpu.h
>> +++ b/xen/arch/arm/include/asm/arm64/mpu.h
>> @@ -13,6 +13,44 @@
>>  #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)
>> +
>> +#define MAX_MPU_REGIONS         NUM_MPU_REGIONS_MASK
> 
> Not really a comment, but a note. The above needs to be common between arm64 
> and arm32.
> 
> I had moved this in
> 
> 
>   "[PATCH 3/5] xen/arm: mpu: Move some of the definitions to common
>   file" .
> 
> Depending on whose patch goes in first, this code needs to be moved in the 
> initial patch so that there is less code movement in the latter patch.
> 

I will move them when your patch will be merged, if your patch is merged first. 
I will wait for comments on
this one by maintainers so that if I have to do changes I will do at once 
without respinning the series
multiple time.

Cheers,
Luca


Reply via email to