On 02.09.2024 19:01, Oleksii Kurochko wrote:
> Set up fixmap mappings and the L0 page table for fixmap support.
>
> Modify the Page Table Entries (PTEs) directly in arch_pmap_map()
> instead of using set_fixmap() ( which relies on map_pages_to_xen() ).
What do you derive this from? There's no set_fixmap() here, and hence
it's unknown how it is going to be implemented. The most you can claim
is that it is expected that it will use map_pages_to_xen(), which in
turn ...
> This change is necessary because PMAP is used when the domain map
> page infrastructure is not yet initialized so map_pages_to_xen()
> called by set_fixmap() needs to map pages on demand, which then
> calls pmap() again, resulting in a loop.
... is only expected to use arch_pmap_map().
> @@ -81,6 +82,18 @@ static inline void flush_page_to_ram(unsigned long mfn,
> bool sync_icache)
> BUG_ON("unimplemented");
> }
>
> +/* Write a pagetable entry. */
> +static inline void write_pte(pte_t *p, pte_t pte)
> +{
> + write_atomic(p, pte);
> +}
> +
> +/* Read a pagetable entry. */
> +static inline pte_t read_pte(pte_t *p)
const pte_t *?
Jan