xen: introduce internal CDF_xxx flags for domain creation
authorStefano Stabellini <sstabellini@kernel.org>
Mon, 14 Feb 2022 03:19:46 +0000 (03:19 +0000)
committerJulien Grall <jgrall@amazon.com>
Thu, 17 Feb 2022 19:40:53 +0000 (19:40 +0000)
commit6f815e86eff46b0e1ef7815e9933c2bdf590e68f
tree5b11a497697628df7c887fe1e2a5b2bae412731c
parente7c2017cf4a91ab6a0fea6adca2d9dd2ab1603b0
xen: introduce internal CDF_xxx flags for domain creation

We are passing an internal-only boolean flag at domain creation to
specify whether we want the domain to be privileged (i.e. dom0) or
not. Another flag will be introduced later in this series.

This commit extends original "boolean" to an "unsigned int" covering both
the existing "is_priv" and our new "directmap", which will be introduced later.

To make visible the relationship, we name the respective constants CDF_xxx
(with no XEN_DOMCTL_ prefix) to represent the difference with the public
constants XEN_DOMCTL_CDF_xxx.

Allocate bit 0 as CDF_privileged: whether a domain is privileged or not.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/domain_build.c
xen/arch/x86/setup.c
xen/common/domain.c
xen/common/sched/core.c
xen/include/xen/domain.h
xen/include/xen/sched.h