Hi Stefano,
On 24/01/2023 00:12, Stefano Stabellini wrote:
On Mon, 23 Jan 2023, Julien Grall wrote:
Ah yes! I see it now that we are relying on the same area
(alloc_xenheap_pages calls page_to_virt() then map_pages_to_xen()).
map_pages_to_xen() is able to create pagetable entries at every level,
but we need to make sure they are shared across per-cpu pagetables. To
make that happen, we are pre-creating the L0/L1 entries here so that
they become common across all per-cpu pagetables and then we let
map_pages_to_xen() do its job.
Did I understand it right?
Your understanding is correct.
I can add summary in the commit message.
I would suggest to improve a bit the in-code comment on top of
setup_directmap_mappings. I might also be able to help with the text
once I am sure I understood what is going on :-)
--
Julien Grall