mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
This commit implements the `XEN_DOMCTL_shadow_op` support in Xen for Arm. The p2m pages pool size for xl guests is supposed to be determined by `XEN_DOMCTL_shadow_op`. Hence, this commit: - Introduces a function `p2m_domctl` and implements the subops `XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION` and `XEN_DOMCTL_SHADOW_OP_GET_ALLOCATION` of `XEN_DOMCTL_shadow_op`. - Adds the `XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION` support in libxl. Therefore enabling the setting of shadow memory pool size when creating a guest from xl and getting shadow memory pool size from Xen. Note that the `XEN_DOMCTL_shadow_op` added in this commit is only a dummy op, and the functionality of setting/getting p2m memory pool size for xl guests will be added in following commits. This is part of CVE-2022-33747 / XSA-409. Signed-off-by: Henry Wang <Henry.Wang@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>