[PATCH v2 0/1] xen/arm: populate a default P2M pool for new domains

Julian Vetter posted 1 patch 1 month ago
There is a newer version of this series
xen/arch/arm/mmu/p2m.c                  | 24 ++++++++++++++++++++++++
xen/common/device-tree/dom0less-build.c |  7 +------
xen/include/xen/domain.h                | 13 +++++++++++++
3 files changed, 38 insertions(+), 6 deletions(-)
[PATCH v2 0/1] xen/arm: populate a default P2M pool for new domains
Posted by Julian Vetter 1 month ago
Hi Michal,
thanks a lot for your review. I agree that in my previous patch I did
neither explain the default pool, nor the 16 pages. I have refined the
commit message and explained that on x86 a domain is "usable" directly
after the XEN_DOMCTL_createdomain call, whereas on Arm there is an extra
(mandatory) step to do that the toolstack needs to know about. Andrew's
view was that this should be fixed in Xen, rather then in the tests (by
calling p2m_set_allocation() there).

And you're also right that 16 is kind of meaningless, since, as far as I
understand was just for the minimal GICv2 mapping. But, yeah,
unfortunately, I couldn't use the formula from domain_p2m_pages()
directly, because the RAM size of the domain isn't yet known in
p2m_init(). I still use that formula but the RAM of the domain assumed
to be 0. For small domains, I guess this is enough to hold all the
stage-2 tables, but for bigger domains this needs tuning later by the
toolstack. Not sure if this is acceptable?

Signed-off-by: Julian Vetter <julian.vetter@vates.tech>

Julian Vetter (1):
  xen/arm: populate a default P2M pool for new domains

 xen/arch/arm/mmu/p2m.c                  | 24 ++++++++++++++++++++++++
 xen/common/device-tree/dom0less-build.c |  7 +------
 xen/include/xen/domain.h                | 13 +++++++++++++
 3 files changed, 38 insertions(+), 6 deletions(-)

-- 
2.53.0



-- 
Julian Vetter | Vates Hypervisor & Kernel Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech