[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen: add field "flags" to cover all internal CDF_XXX
commit 8ac5bb92f3175a5442e962dd0e4be637119838dd Author: Penny Zheng <Penny.Zheng@xxxxxxx> AuthorDate: Tue Aug 16 10:36:53 2022 +0800 Commit: Julien Grall <jgrall@xxxxxxxxxx> CommitDate: Wed Aug 24 10:36:20 2022 +0100 xen: add field "flags" to cover all internal CDF_XXX With more and more CDF_xxx internal flags in and to save the space, this commit introduces a new field "flags" in struct domain to store CDF_* internal flags directly. Another new CDF_xxx will be introduced in the next patch. Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx> Acked-by: Julien Grall <jgrall@xxxxxxxxxx> --- xen/arch/arm/domain.c | 2 -- xen/arch/arm/include/asm/domain.h | 3 +-- xen/common/domain.c | 3 +++ xen/include/xen/sched.h | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 13df91c401..2d6253181a 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -712,8 +712,6 @@ int arch_domain_create(struct domain *d, ioreq_domain_init(d); #endif - d->arch.directmap = flags & CDF_directmap; - /* p2m_init relies on some value initialized by the IOMMU subsystem */ if ( (rc = iommu_domain_init(d, config->iommu_opts)) != 0 ) goto fail; diff --git a/xen/arch/arm/include/asm/domain.h b/xen/arch/arm/include/asm/domain.h index cd9ce19b4b..26a8348eed 100644 --- a/xen/arch/arm/include/asm/domain.h +++ b/xen/arch/arm/include/asm/domain.h @@ -29,7 +29,7 @@ enum domain_type { #define is_64bit_domain(d) (0) #endif -#define is_domain_direct_mapped(d) (d)->arch.directmap +#define is_domain_direct_mapped(d) ((d)->cdf & CDF_directmap) /* * Is the domain using the host memory layout? @@ -104,7 +104,6 @@ struct arch_domain void *tee; #endif - bool directmap; } __cacheline_aligned; struct arch_vcpu diff --git a/xen/common/domain.c b/xen/common/domain.c index 618410e3b2..7062393e37 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -567,6 +567,9 @@ struct domain *domain_create(domid_t domid, /* Sort out our idea of is_system_domain(). */ d->domain_id = domid; + /* Holding CDF_* internal flags. */ + d->cdf = flags; + /* Debug sanity. */ ASSERT(is_system_domain(d) ? config == NULL : config != NULL); diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index e2b3b6daa3..1cf629e7ec 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -596,6 +596,9 @@ struct domain struct ioreq_server *server[MAX_NR_IOREQ_SERVERS]; } ioreq_server; #endif + + /* Holding CDF_* constant. Internal flags for domain creation. */ + unsigned int cdf; }; static inline struct page_list_head *page_to_list( -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |