Hi Julien, > On Oct 18, 2023, at 02:13, Julien Grall <[email protected]> wrote: > > Hi Henry, > > On 17/10/2023 06:55, Henry Wang wrote: >>> On Oct 14, 2023, at 02:22, Julien Grall <[email protected]> wrote: >>> >>> Hi Henry, >>> >>> On 09/10/2023 02:03, Henry Wang wrote: >>>> >>>> diff --git a/xen/arch/arm/include/asm/p2m.h >>>> b/xen/arch/arm/include/asm/p2m.h >>>> index 940495d42b..a9622dac9a 100644 >>>> --- a/xen/arch/arm/include/asm/p2m.h >>>> +++ b/xen/arch/arm/include/asm/p2m.h >>>> @@ -19,6 +19,22 @@ extern unsigned int p2m_root_level; >>>> #define P2M_ROOT_ORDER p2m_root_order >>> >>> You seem to use P2M_ROOT_ORDER to allocate p2m->root in arm/p2m.c. However, >>> as I mentioned before, I don't think the defintion of p2m->root is suitable >>> for the MPU. I think the two functions using p2m->root should be moved in >>> mmu/p2m.c and P2M_ROOT_ORDER should be moved in mmu/p2m.h. >> While working on this, I noticed that if we move p2m_final_teardown() (one >> of the two >> functions you mentioned that consuming p2m->root), we also need to move the >> static >> function p2m_free_vmid(). This seems reasonable as on MPU we only have >> dom0less >> domUs so we don’t really need to free vmid. > > Regardless on whether you need to free VMID on MPU, the allocation and free > functions should live in the same unit. So if you plan to move > p2m_final_teardown() in mmu/p2m.c, then p2m_free_vmid should be exported.
Sounds good, I will follow this way. Thanks. Kind regards, Henry > > Cheers, > > -- > Julien Grall
