[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/9] arm/mpu: Introduce MPU memory region map structure
- To: Ayan Kumar Halder <ayankuma@xxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Tue, 4 Mar 2025 13:11:30 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org 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=fsr8SSgV+VEW5gRX1P9iJ6PA0fowcH+M9lL6vcqRa2k=; b=P3UFLWDxmEDB8dexC6b5eMn2bZ2fObQ+O23VW25pB9rKVMQ+tO0DpYoGMCWszxhMiDThbxrFMFc1tTuSSMBeaGssSO0kWrAoQJyM6oeHV69Biycp0ZysGf+EnA4fVj5zzKTWHc0vRXrwxZaANtbpY9Q1BCGhJzmhPkb1N9W9owcco74VnDeHUVPLOa6wVnp8NM7CeXwY/Cz4Koy4mFetfJRficb1X8/bogGlO8YFj2OI/YtACnT0H8qSwihfXcQLzOA0wLgd7HHi7quVsENVYHSyfanrVFVpXlCg1AGdXLeROF3VkAUewJeLSGn9MktBNBbNI8C38ywM0nl/z1mmGA==
- 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=fsr8SSgV+VEW5gRX1P9iJ6PA0fowcH+M9lL6vcqRa2k=; b=wmZb7k9eXGFDGlcqdZwzpxhKRUpitv3uZFzBAy/MgmhW9dF2rGf3pFuN0tXks4lWIvaSMJqMf0Vs08Ks2ooenJQtHUwXY4LZj69ML5ZW3/Kxolc2Iw79cSc5uopGVG9fQLEzX4hSEnMJULkANsvsh5pHvm+d8eoQ+0RC54UmRYsBgY19NPAqaaHOo2sqDwra/GT65hYvgwLUf7jVtrPbd3aA8UqKUEaud/257WOgNaw2ee11UXwgPAFJwLfWL9BGQPsKNXSejDbTEH7P1HqDknvTyYpk588/HBrO5lcqWUDZkQzVGUkpU3Oj1/aUqNfRM0JecmReF7hQ2CwYFJOnfQ==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=uB+PUzOvUA2BFvE4GCOPCL/rwkd5WwQhTk1Uj+xG1Bg7YztcdB56c01T+k1lZvz3MvvkoFJvgArTUKzF1OYYdLgvb42aL0FwI+yBOOXa+eJ8JNjNsVH7/oWZVUjlfhsItyMBKH+cJJ5HgJAsm74SqFjzJk6Kvhc9MYnJev7wf8XxXICBC0vNiR5benFsjT4WTs7tFT1g8TGTQk15wgMVXsI4+bChZCJ47rEkxYKvJmFKz8fXLkNnoz2qOub9pF/lwprvBM7jvOraOgb6VbrM0vFDu9ItohVtzUL2Gri+THFOtJSY+L2NOZB361qXHpmwFpDJNS6G6Se6qScnvMJASw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=R5Q6DNCMaw7n6liqDQV/NMhhmYL51Ov9Q6BEJgVSIHC9UWQ7qNTCQ0uTxlIkY/TpftR2sjot72qHetnSw+5H92LJEk9gB3xKhNJWwvzJqVNSskACCVAUjzwOZSzN2TytP0Xw6wmjQb4lPJB/GbbokiKMsAF6pkNDp7fZC47BuxzoxU0ZrARdE/23laVnPbmW1A0w8f7mS5oNRvJbz39/aOeaQR395mpsOac4l07p8RtrJBwMcGu62Ljbgo59yc1o9mJDUwalURA3Gg+DFkL5wpNswoq5g5191N4TLibKeZd2udov7GNSXrQCAN1sW18VEmZxdOr4MuSilU55hJqLYw==
- 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>, Penny Zheng <Penny.Zheng@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>
- Delivery-date: Tue, 04 Mar 2025 13:11:53 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHbifxvvv/yUnZzCEOp3WVvr92oW7Ni02GAgAAmZQA=
- Thread-topic: [PATCH 3/9] arm/mpu: Introduce MPU memory region map structure
Hi Ayan,
> On 4 Mar 2025, at 10:53, Ayan Kumar Halder <ayankuma@xxxxxxx> 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.Zheng@xxxxxxx>
>>
>> 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.zheng@xxxxxxx>
>> Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
>> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>> ---
>> 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
|