[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v8 6/9] xen/arm: introduce CDF_staticmem
On 15/07/2022 19:51, Julien Grall wrote: Hi Penny, On 07/07/2022 10:22, Penny Zheng wrote:In order to have an easy and quick way to find out whether this domain memory is statically configured, this commit introduces a new flag CDF_staticmem and anew helper is_domain_using_staticmem() to tell. Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx> --- v8 changes: - #ifdef-ary around is_domain_using_staticmem() is not needed anymore --- v7 changes: - IS_ENABLED(CONFIG_STATIC_MEMORY) would not be needed anymore --- v6 changes: - move non-zero is_domain_using_staticmem() from ARM header to common header --- v5 changes: - guard "is_domain_using_staticmem" under CONFIG_STATIC_MEMORY - #define is_domain_using_staticmem zero if undefined --- v4 changes: - no changes --- v3 changes: - change name from "is_domain_static()" to "is_domain_using_staticmem" --- v2 changes:- change name from "is_domain_on_static_allocation" to "is_domain_static()"--- xen/arch/arm/domain_build.c | 5 ++++- xen/include/xen/domain.h | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 3fd1186b53..b76a84e8f5 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -3287,9 +3287,12 @@ void __init create_domUs(void) if ( !dt_device_is_compatible(node, "xen,domain") ) continue; + if ( dt_find_property(node, "xen,static-mem", NULL) ) + flags |= CDF_staticmem; + if ( dt_property_read_bool(node, "direct-map") ) {- if ( !IS_ENABLED(CONFIG_STATIC_MEMORY) || !dt_find_property(node, "xen,static-mem", NULL) )It is not clear to me why dropping IS_ENABLED(...) here is fine. What would happen if a user specify "xen,static-mem" in the device-tree but forgot CONFIG_STATIC_MEMORY in Xen? Nvm... flags & CDF_staticmem would be 0 so it would cover that case. Sorry for the noise. Acked-by: Julien Grall <jgrall@xxxxxxxxxx> Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |