From: "Orzel, Michal" <michal.orzel@amd.com>
To: Luca Fancellu <luca.fancellu@arm.com>, xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Julien Grall <julien@xen.org>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH v4 5/7] arm/mpu: Introduce utility functions for the pr_t type
Date: Mon, 5 May 2025 14:08:10 +0200 [thread overview]
Message-ID: <a11855ac-62f1-439b-8fc0-dcf2006a76b0@amd.com> (raw)
In-Reply-To: <20250429152057.2380536-6-luca.fancellu@arm.com>
On 29/04/2025 17:20, Luca Fancellu wrote:
> Introduce few utility function to manipulate and handle the
s/few/a few/
s/function/functions/
> pr_t type.
>
> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
> ---
> v4 changes:
> - Modify comment on top of the helpers. Clarify pr_set_limit
> takes exclusive address.
> Protected common code with #ifdef Arm64 until Arm32 is ready
> with pr_t
> ---
> xen/arch/arm/include/asm/mpu.h | 64 ++++++++++++++++++++++++++++++++++
> 1 file changed, 64 insertions(+)
>
> diff --git a/xen/arch/arm/include/asm/mpu.h b/xen/arch/arm/include/asm/mpu.h
> index 40a86140b6cc..0e0a7f05ade9 100644
> --- a/xen/arch/arm/include/asm/mpu.h
> +++ b/xen/arch/arm/include/asm/mpu.h
> @@ -24,6 +24,70 @@
> #define NUM_MPU_REGIONS_MASK (NUM_MPU_REGIONS - 1)
> #define MAX_MPU_REGION_NR 255
>
> +#ifndef __ASSEMBLY__
> +
> +#ifdef CONFIG_ARM_64
> +/*
> + * Set base address of MPU protection region.
> + *
> + * @pr: pointer to the protection region structure.
> + * @base: base address as base of the protection region.
> + */
> +static inline void pr_set_base(pr_t *pr, paddr_t base)
> +{
> + pr->prbar.reg.base = (base >> MPU_REGION_SHIFT);
Shouldn't you take MPU_REGION_RES0 into account?
~Michal
next prev parent reply other threads:[~2025-05-05 12:08 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 15:20 [PATCH v4 0/7] First chunk for Arm R82 and MPU support Luca Fancellu
2025-04-29 15:20 ` [PATCH v4 1/7] docs/arm: Document Xen booting protocol on Armv8-R Luca Fancellu
2025-04-29 17:11 ` Ayan Kumar Halder
2025-04-30 6:37 ` Orzel, Michal
2025-04-30 6:58 ` Luca Fancellu
2025-04-30 7:04 ` Orzel, Michal
2025-04-30 7:22 ` Luca Fancellu
2025-05-06 11:44 ` Julien Grall
2025-05-06 12:24 ` Luca Fancellu
2025-05-06 12:29 ` Julien Grall
2025-05-06 12:40 ` Luca Fancellu
2025-04-29 15:20 ` [PATCH v4 2/7] arm/mpu: Introduce MPU memory region map structure Luca Fancellu
2025-04-30 6:50 ` Orzel, Michal
2025-05-06 11:50 ` Julien Grall
2025-04-29 15:20 ` [PATCH v4 3/7] arm/mpu: Provide and populate MPU C data structures Luca Fancellu
2025-04-30 6:56 ` Luca Fancellu
2025-04-30 10:57 ` Orzel, Michal
2025-04-30 12:22 ` Luca Fancellu
2025-04-29 15:20 ` [PATCH v4 4/7] arm/mpu: Provide access to the MPU region from the C code Luca Fancellu
2025-05-05 11:56 ` Orzel, Michal
2025-05-06 8:45 ` Luca Fancellu
2025-04-29 15:20 ` [PATCH v4 5/7] arm/mpu: Introduce utility functions for the pr_t type Luca Fancellu
2025-05-05 12:08 ` Orzel, Michal [this message]
2025-05-06 8:45 ` Luca Fancellu
2025-04-29 15:20 ` [PATCH v4 6/7] arm/mpu: Provide a constructor for " Luca Fancellu
2025-04-29 17:16 ` Ayan Kumar Halder
2025-04-29 19:39 ` Luca Fancellu
2025-05-06 10:06 ` Orzel, Michal
2025-05-06 12:56 ` Luca Fancellu
2025-05-06 13:51 ` Julien Grall
2025-05-06 13:53 ` Luca Fancellu
2025-05-06 13:29 ` Luca Fancellu
2025-04-29 15:20 ` [PATCH v4 7/7] arm/mpu: Introduce MPU memory mapping flags Luca Fancellu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a11855ac-62f1-439b-8fc0-dcf2006a76b0@amd.com \
--to=michal.orzel@amd.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=julien@xen.org \
--cc=luca.fancellu@arm.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.