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

Re: [PATCH 04/10] arm/mpu: Implement virt/maddr conversion in MPU system



Hi Luca,

On 12/03/2025 13:52, Luca Fancellu wrote:
From: Penny Zheng <Penny.Zheng@xxxxxxx>

virt_to_maddr and maddr_to_virt are used widely in Xen code. So
even there is no VMSA in MPU system, we keep the interface in MPU to
don't change the existing common code.

Typo: I think you mean "to avoid changing".


In order to do that, move the virt_to_maddr() definition to mmu/mm.h,
instead for maddr_to_virt() it's more difficult to isolate it under mmu/
so it will be protected by #ifdef CONFIG_MMU.

I think defining maddr_to_virt() in asm/mm.h for the MMU but not the MPU is a bit odd. Can you provide more details on the exact issue?

And if it really can't be solved, then I would rather prefer if both virt_to_maddr() and maddr_to_virt() are defined in asm/mm.h for both the MPU and MMU because they are related to each other.

Cheers,

--
Julien Grall




 


Rackspace

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