|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 13/22] xen/x86: Add support for the PMAP
Hi Jan, On 05/01/2023 16:46, Jan Beulich wrote: On 16.12.2022 12:48, Julien Grall wrote:--- a/xen/arch/x86/include/asm/fixmap.h +++ b/xen/arch/x86/include/asm/fixmap.h @@ -21,6 +21,8 @@#include <xen/acpi.h> I will answer this below.
So the problem is less about the allocation be more the fact that we can't use map_pages_to_xen() because it would call pmap_map(). So we need to break the loop. Hence why set_fixmap()/clear_fixmap() are open-coded. And indeed, we would need to rely on the build-time L1 table in this case. So I will move the entries earlier. But independent of that you want to either use the existing macros / functions, or explain why you can't.
This is explained in the caller of arch_pmap*():
/*
* We cannot use set_fixmap() here. We use PMAP 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. Modify the PTEs directly instead.
The same
* is true for pmap_unmap().
*/
The comment is valid for Arm, x86 and (I would expect in the future)
RISC-V because the page-tables may be allocated in domheap (so not
always mapped).
So I don't feel this comment should be duplicated in the header. But I can certainly explain it in the commit message. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |