]> xenbits.xensource.com Git - xen.git/commit
xen/arm, libxl: Implement XEN_DOMCTL_shadow_op for Arm
authorHenry Wang <Henry.Wang@arm.com>
Mon, 6 Jun 2022 06:17:29 +0000 (06:17 +0000)
committerJan Beulich <jbeulich@suse.com>
Tue, 11 Oct 2022 12:28:42 +0000 (14:28 +0200)
commitcf2a68d2ffbc3ce95e01449d46180bddb10d24a0
tree62ee83bb66f15a92f1a75044cf81677bcfdeb243
parent55914f7fc91a468649b8a3ec3f53ae1c4aca6670
xen/arm, libxl: Implement XEN_DOMCTL_shadow_op for Arm

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>
tools/libs/light/libxl_arm.c
xen/arch/arm/domctl.c