for initialization.
Signed-off-by: Penny Zheng
Signed-off-by: Wei Chen
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
xen/arch/arm/include/asm/mmu/mm.h | 3 +++
xen/arch/arm/include/asm/mpu/mm.h | 4
xen/arch/arm/mpu/setup.c | 11 +++
xen/include/xen
Hi all,
This series is the third set of patches in the ongoing work to
introduce support for MPU systems and Cortex R82 in Xen.
The patches in this series implement the necessary logic to transiently
map and unmap the static memory banks for initialization.
Cheers,
Hari
Luca Fancellu (4):
arm
From: Luca Fancellu
Introduce helpers (un)map_mm_range() in order to allow the temporary
mapping of a range of memory, and use these to implement the function
`ioremap_attr` for MPU systems.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
xen/arch/arm/include/asm/mpu/mm.h | 22
From: Luca Fancellu
Add a scheme to distinguish transient MPU regions, to identify MPU
regions which will be mapped for a short period of time.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
xen/arch/arm/include/asm/arm32/mpu.h | 2 ++
xen/arch/arm/include/asm/arm64/mpu.h
From: Luca Fancellu
Implement `setup_mm` for MPU systems. This variant doesn't need to set
up the direct map.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
xen/arch/arm/mpu/mm.c | 64 ++-
1 file changed, 63 insertions(+), 1 del
From: Luca Fancellu
Implement the MPU variant of `setup_frametable_mappings`. This function
will be called by `setup_mm` when an implementation for MPU systems is
added in a follow up commit.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
xen/arch/arm/mpu/mm.c | 19
Hi Grygorii,
> On Fri, Jul 18, 2025 at 10:15:36AM +, Grygorii Strashko wrote:
> From: Grygorii Strashko
>
> The dump_p2m_lookup() is not used, so remove it.
NIT: I think this would read better as 'The function dump_p2m_lookup()...'
Otherwise LGTM!
Reviewed-by: Hari Limaye
Cheers,
Hari
Hi Michal,
> NIT: In this patch you start adding mpu: prefix, even though other messages do
> not have it. I don't think it's needed.
>
> Otherwise:
> Reviewed-by: Michal Orzel
>
> ~Michal
>
Would you like me to respin for this change, or can it be addressed on commit?
Many thanks,
Hari
From: Luca Fancellu
Implement remove_early_mappings for MPU systems.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
Reviewed-by: Michal Orzel
---
Changes from v1:
- Add Ayan's R-b
Changes from v2:
- Remove full stop
- Remove sanity check for `mapped_fdt_paddr == INVALID_
: Wei Chen
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
Changes from v1:
- Move check for part-region removal outside if condition
- Use normal printk
Changes from v2:
- Fix assert from `ASSERT(s <= e)` -> `ASSERT(s < e)`
- Remove call to context_sync_mpu
- Use register
the case that the
initial mapping of the fdt_header is insufficient to cover the entire
DTB, as we must destroy and then remap the region due to the APIs no
providing support for extending the size of an existing region.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
Reviewed-by: Ayan
ff-by: Luca Fancellu
Signed-off-by: Hari Limaye
Reviewed-by: Ayan Kumar Halder
Reviewed-by: Michal Orzel
---
Changes from v1:
- Add Ayan and Michal's R-b
- Fix typos
---
xen/arch/arm/include/asm/mm.h | 2 ++
xen/arch/arm/mm.c | 15 +++
xen/arch/arm/mmu/pt.c
Hi all,
This series is the second set of patches in the ongoing work to
introduce support for MPU systems and Cortex R82 in Xen.
The patches in this series implement the necessary logic to map and
unmap the Device Tree Blob in the early stages of the boot process.
Changes from v3:
- Changes ment
.
This commit only implements populating a new entry in Xen MPU memory mapping
table(xen_mpumap).
Signed-off-by: Penny Zheng
Signed-off-by: Wei Chen
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
Reviewed-by: Michal Orzel
---
Changes from v1:
- Simplify if condition
- Use normal
From: Luca Fancellu
Implement a function to find the index of a MPU region in the xen_mpumap
MPU region array. This function will be used in future commits to
implement creating and destroying MPU regions.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
Reviewed-by: Michal Orzel
Hi Michal,
> On 17 Jul 2025, at 13:54, Orzel, Michal wrote:
>> +/*
>> + * DTB starting at a different address has been mapped, so destroy this
>> + * before continuing.
> I don't understand this scenario. Can you describe it in more details?
> I know that early_fdt_map will be called
Hi Michal,
> On 15 Jul 2025, at 09:45, Orzel, Michal wrote:
>
>
>
> On 15/07/2025 10:36, Hari Limaye wrote:
>> Hi Michal,
>>
>>>> +int mpumap_contains_region(pr_t *table, uint8_t nr_regions, paddr_t base,
>>>> +
Hi Michal.
>> +if ( base >= limit )
> Given that limit is exclusive, to prevent empty regions, you would need to
> check
> for base >= (limit - 1), even though it's not really possible because today we
> require page aligned addresses (limit must be at least bigger or equal than
> base
> + P
Hi Michal,
>> +int mpumap_contains_region(pr_t *table, uint8_t nr_regions, paddr_t base,
>> + paddr_t limit, uint8_t *index)
>> +{
>> +ASSERT(index);
>> +*index = INVALID_REGION_IDX;
>> +
>> +/*
>> + * The caller supplies a half-open interval [base, limit)
From: Luca Fancellu
Implement remove_early_mappings for MPU systems.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
Reviewed-by: Ayan Kumar Halder
---
Changes from v1:
- Add Ayan's R-b
Changes from v2:
- Remove full stop
- Remove sanity check for `mapped_fdt_paddr == INVALID_
: Wei Chen
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
Changes from v1:
- Move check for part-region removal outside if condition
- Use normal printk
Changes from v2:
- Fix assert from `ASSERT(s <= e)` -> `ASSERT(s < e)`
- Remove call to context_sync_mpu
- Use register
ff-by: Luca Fancellu
Signed-off-by: Hari Limaye
Reviewed-by: Ayan Kumar Halder
Reviewed-by: Michal Orzel
---
Changes from v1:
- Add Ayan and Michal's R-b
- Fix typos
---
xen/arch/arm/include/asm/mm.h | 2 ++
xen/arch/arm/mm.c | 15 +++
xen/arch/arm/mmu/pt.c
Hi all,
This series is the second set of patches in the ongoing work to
introduce support for MPU systems and Cortex R82 in Xen.
The patches in this series implement the necessary logic to map and
unmap the Device Tree Blob in the early stages of the boot process.
Changes from v2:
- Changes ment
the case that the
initial mapping of the fdt_header is insufficient to cover the entire
DTB, as we must destroy and then remap the region due to the APIs no
providing support for extending the size of an existing region.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
Reviewed-by: Ayan
.
This commit only implements populating a new entry in Xen MPU memory mapping
table(xen_mpumap).
Signed-off-by: Penny Zheng
Signed-off-by: Wei Chen
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
Changes from v1:
- Simplify if condition
- Use normal printk
- Use %# over 0x%
- Add
From: Luca Fancellu
Implement a function to find the index of a MPU region in the xen_mpumap
MPU region array. This function will be used in future commits to
implement creating and destroying MPU regions.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
Changes from v1:
- Update
Hi Michal,
>> +int map_pages_to_xen(unsigned long virt, mfn_t mfn, unsigned long nr_mfns,
>> + unsigned int flags)
>> +{
>> +int rc = xen_mpumap_update(mfn_to_maddr(mfn),
> What do you expect to be passed as virt? I would expect maddr which could save
> you the conversion h
Hi Michal,
Thank you for reviewing the patch. To answer the following question:
> > +/* DTB starting at this address has already been mapped. */
> When can this happen?
In xen/arch/arm/setup.c `start_xen` early_fdt_map(fdt_paddr) is called twice,
before and after `setup_page_tables` - which i
Hi Michal,
Thank you for reviewing the patch.
> > +/* Zeroing the region will also zero the region enable */
> > +memset(&xen_mpumap[index], 0, sizeof(pr_t));
> Is it ok that for a fast case (i.e. 0-31) our representation of prbar/prlar
> will
> be different from the HW i.e. xen_mpumap[in
# Proposal for supporting EL1 MPU region context switch in Xen
This proposal will introduce the proposed design for supporting EL1 MPU region
context switch for guests.
## Purpose
We would like to be able to support the PMSAv8-64 translation regime at EL1 for
Xen guests. We would also like to co
keep the two loops iterating over all the memory banks.
>
> Signed-off-by: Michal Orzel
> ---
Reviewed-by: Hari Limaye
Tested-by: Hari Limaye
Cheers,
Hari
Hi Michal,
> On Fri, Jul 04, 2025 at 09:54:28AM +, Michal Orzel wrote:
> When CONFIG_PDX_COMPRESSION=n, pdx_init_mask(), pdx_region_mask() and
> pfn_pdx_hole_setup() are just stubs doing nothing. It does not make
> sense to keep the two loops iterating over all the memory banks.
>
> Signed-of
max_pdx
> in init_pdx() for both arm32 and arm64. max_pdx will be used in the
> future to set up frametable mappings respecting the PDX grouping.
>
> Signed-off-by: Michal Orzel
Reviewed-by: Hari Limaye
Tested-by: Hari Limaye
LGTM! Tested (compilation) via both Arm AArch32 and AArch64 builds.
Many thanks,
Hari
of membanks
> is split from the loop for no reason. Tidy up this function for better
> readability.
>
> No functional change.
>
> Signed-off-by: Michal Orzel
Reviewed-by: Hari Limaye
Tested-by: Hari Limaye
LGTM! Tested (compilation) via Arm AArch32 build.
Many thanks,
Hari
Hi Mykola,
> On Fri, Jun 27, 2025 at 01:51:31PM +, Mykola Kvach wrote:
> From: Mykola Kvach
>
> The "xl resume" command was previously excluded from ARM builds because
> system suspend/resume (e.g., `SYSTEM_SUSPEND`) via vPSCI was not
> implemented. On x86, the command is used for ACPI S3 su
.
This commit only implements populating a new entry in Xen MPU memory mapping
table(xen_mpumap).
Signed-off-by: Penny Zheng
Signed-off-by: Wei Chen
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
Changes from v1:
- Simplify if condition
- Use normal printk
- Use %# over 0x%
- Add
Hi all,
This series is the second set of patches in the ongoing work to
introduce support for MPU systems and Cortex R82 in Xen.
The patches in this series implement the necessary logic to map and
unmap the Device Tree Blob in the early stages of the boot process.
Changes from v1:
- Changes ment
From: Luca Fancellu
Implement remove_early_mappings for MPU systems.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
Reviewed-by: Ayan Kumar Halder
---
Changes from v1:
- Add Ayan's R-b
---
xen/arch/arm/mpu/setup.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
ff-by: Luca Fancellu
Signed-off-by: Hari Limaye
Reviewed-by: Ayan Kumar Halder
Reviewed-by: Michal Orzel
---
Changes from v1:
- Add Ayan and Michal's R-b
- Fix typos
- Don't use extern for function prototype
---
xen/arch/arm/include/asm/mm.h | 2 ++
xen/arch/arm/mm.c
: Wei Chen
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
Changes from v1:
- Move check for part-region removal outside if condition
- Use normal printk
---
xen/arch/arm/include/asm/mpu.h| 2 +
xen/arch/arm/include/asm/mpu/cpregs.h | 4 ++
xen/arch/arm/mpu/mm.c
From: Luca Fancellu
Implement a function to find the index of a MPU region in the xen_mpumap
MPU region array. This function will be used in future commits to
implement creating and destroying MPU regions.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
Changes from v1:
- Update
the case that the
initial mapping of the fdt_header is insufficient to cover the entire
DTB, as we must destroy and then remap the region due to the APIs no
providing support for extending the size of an existing region.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
Reviewed-by: Ayan
Hi Ayan,
Thank you for the review. I have just a couple of clarifications before I
re-spin the series to address all the comments:
> > -if ( flags & _PAGE_PRESENT )
> > +if ( (flags & _PAGE_PRESENT) && (MPUMAP_REGION_NOTFOUND == rc) )
>
> Same question in this patch , why do we need to ch
Hi Michal,
Thank you very much for the review.
I just had a small clarification regarding the following comment:
>> +
> +/* Allow index to be NULL */
> +index = index ? index : &_index;
>If index argument is NULL, why bother setting this internal variable _index?
This assignment is inten
the case that the
initial mapping of the fdt_header is insufficient to cover the entire
DTB, as we must destroy and then remap the region due to the APIs no
providing support for extending the size of an existing region.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
xen/arch/arm/mpu
Hi all,
This series is the second set of patches in the ongoing work to
introduce support for MPU systems and Cortex R82 in Xen.
The patches in this series implement the necessary logic to map and
unmap the Device Tree Blob in the early stages of the boot process.
Cheers,
Hari
Luca Fancellu (4)
From: Luca Fancellu
Implement remove_early_mappings for MPU systems.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
xen/arch/arm/mpu/setup.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/xen/arch/arm/mpu/setup.c b/xen/arch/arm/mpu/setup.c
index
: Wei Chen
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
xen/arch/arm/include/asm/mpu.h| 2 +
xen/arch/arm/include/asm/mpu/cpregs.h | 4 ++
xen/arch/arm/mpu/mm.c | 71 ++-
3 files changed, 75 insertions(+), 2 deletions(-)
diff --git
From: Luca Fancellu
Introduce flags_has_rwx() function that will check if a
mapping is both writable and executable when modifying
or update the mapping.
This check was already present in pt.c but since it will
be used also for MPU system, it's wrapped into a function
now.
Signed-off-by: Luca F
.
This commit only implements populating a new entry in Xen MPU memory mapping
table(xen_mpumap).
Signed-off-by: Penny Zheng
Signed-off-by: Wei Chen
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
xen/arch/arm/include/asm/mpu/mm.h | 12
xen/arch/arm/mpu/mm.c | 96
From: Luca Fancellu
Implement a function to find the index of a MPU region
in the xen_mpumap MPU region array.
Signed-off-by: Luca Fancellu
Signed-off-by: Hari Limaye
---
xen/arch/arm/include/asm/mpu/mm.h | 29 ++
xen/arch/arm/mpu/mm.c | 66
rm32.
> Enable pr_of_addr() for arm32.
>
> The maximum number of regions supported is 255 (which corresponds to the
> maximum value in HMPUIR).
>
> Signed-off-by: Ayan Kumar Halder
> Reviewed-by: Luca Fancellu
> ---
Apart from the above, all LGTM! I've tested com
+, Ayan Kumar Halder wrote:
> Fix the definition for HPRLAR.
> Define the base/limit address registers to access the first 32 protection
> regions.
>
> Signed-off-by: Ayan Kumar Halder
> ---
Reviewed-by: Hari Limaye
Many thanks,
Hari
53 matches
Mail list logo