Message ID | 1500378106-2620-18-git-send-email-vijay.kilari@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, 18 Jul 2017, vijay.kilari@gmail.com wrote: > From: Vijaya Kumar K <Vijaya.Kumar@cavium.com> > > Delete numa-node-id and distance map from DOM0 DT > so that NUMA information is not exposed to DOM0. > This helps particularly to boot Node 1 devices > as if booting on Node0. > > However this approach has limitation where memory allocation > for the devices should be local. > > Also, do not expose numa distance node to DOM0. > > Signed-off-by: Vijaya Kumar <Vijaya.Kumar@cavium.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> > --- > xen/arch/arm/domain_build.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index 1bec4fa..a7d6d3a 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -425,6 +425,10 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, > } > } > > + /* Don't expose the property numa to the guest */ > + if ( dt_property_name_is_equal(prop, "numa-node-id") ) > + continue; > + > /* Don't expose the property "xen,passthrough" to the guest */ > if ( dt_property_name_is_equal(prop, "xen,passthrough") ) > continue; > @@ -1177,6 +1181,11 @@ static int handle_node(struct domain *d, struct kernel_info *kinfo, > DT_MATCH_TYPE("memory"), > /* The memory mapped timer is not supported by Xen. */ > DT_MATCH_COMPATIBLE("arm,armv7-timer-mem"), > + /* > + * NUMA info is not exposed to Dom0. > + * So, skip distance-map infomation > + */ > + DT_MATCH_COMPATIBLE("numa-distance-map-v1"), > { /* sentinel */ }, > }; > static const struct dt_device_match timer_matches[] __initconst = > -- > 2.7.4 >
Hi, On 18/07/17 12:41, vijay.kilari@gmail.com wrote: > From: Vijaya Kumar K <Vijaya.Kumar@cavium.com> > > Delete numa-node-id and distance map from DOM0 DT > so that NUMA information is not exposed to DOM0. > This helps particularly to boot Node 1 devices > as if booting on Node0. > > However this approach has limitation where memory allocation > for the devices should be local. > > Also, do not expose numa distance node to DOM0. > > Signed-off-by: Vijaya Kumar <Vijaya.Kumar@cavium.com> > --- > xen/arch/arm/domain_build.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index 1bec4fa..a7d6d3a 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -425,6 +425,10 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, > } > } > > + /* Don't expose the property numa to the guest */ s/numa/NUMA/ and missing full stop. > + if ( dt_property_name_is_equal(prop, "numa-node-id") ) > + continue; > + > /* Don't expose the property "xen,passthrough" to the guest */ > if ( dt_property_name_is_equal(prop, "xen,passthrough") ) > continue; > @@ -1177,6 +1181,11 @@ static int handle_node(struct domain *d, struct kernel_info *kinfo, > DT_MATCH_TYPE("memory"), > /* The memory mapped timer is not supported by Xen. */ > DT_MATCH_COMPATIBLE("arm,armv7-timer-mem"), > + /* > + * NUMA info is not exposed to Dom0. Please use the term "hardware domain" and not Dom0 in new code. > + * So, skip distance-map infomation s/infomation/information/ and missing full stop. > + */ > + DT_MATCH_COMPATIBLE("numa-distance-map-v1"), > { /* sentinel */ }, > }; > static const struct dt_device_match timer_matches[] __initconst = > Cheers,
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 1bec4fa..a7d6d3a 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -425,6 +425,10 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, } } + /* Don't expose the property numa to the guest */ + if ( dt_property_name_is_equal(prop, "numa-node-id") ) + continue; + /* Don't expose the property "xen,passthrough" to the guest */ if ( dt_property_name_is_equal(prop, "xen,passthrough") ) continue; @@ -1177,6 +1181,11 @@ static int handle_node(struct domain *d, struct kernel_info *kinfo, DT_MATCH_TYPE("memory"), /* The memory mapped timer is not supported by Xen. */ DT_MATCH_COMPATIBLE("arm,armv7-timer-mem"), + /* + * NUMA info is not exposed to Dom0. + * So, skip distance-map infomation + */ + DT_MATCH_COMPATIBLE("numa-distance-map-v1"), { /* sentinel */ }, }; static const struct dt_device_match timer_matches[] __initconst =