[XEN RFC PATCH 06/40] xen: decouple NUMA from ACPI in Kconfig

Wei Chen posted 40 patches 4 years, 6 months ago
[XEN RFC PATCH 06/40] xen: decouple NUMA from ACPI in Kconfig
Posted by Wei Chen 4 years, 6 months ago
In current Xen code only implments x86 ACPI-based NUMA support.
So in Xen Kconfig system, NUMA equals to ACPI_NUMA. x86 selects
NUMA by default, and CONFIG_ACPI_NUMA is hardcode in config.h.

In this patch series, we introduced device tree based NUMA for
Arm. That means we will have two NUMA implemetations, so in this
patch we decouple NUMA from ACPI based NUMA in Kconfig. Make NUMA
as a common feature, that device tree based NUMA also can select it.

Signed-off-by: Wei Chen <wei.chen@arm.com>
---
 xen/arch/x86/Kconfig         | 2 +-
 xen/common/Kconfig           | 3 +++
 xen/drivers/acpi/Kconfig     | 3 ++-
 xen/drivers/acpi/Makefile    | 2 +-
 xen/include/asm-x86/config.h | 1 -
 5 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 9b164db641..7414aef113 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -24,7 +24,7 @@ config X86
 	select HAS_UBSAN
 	select HAS_VPCI if HVM
 	select NEEDS_LIBELF
-	select NUMA
+	select ACPI_NUMA
 
 config ARCH_DEFCONFIG
 	string
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 0ddd18e11a..b1f1145613 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -67,6 +67,9 @@ config MEM_ACCESS
 config NEEDS_LIBELF
 	bool
 
+config NUMA
+	bool
+
 menu "Speculative hardening"
 
 config SPECULATIVE_HARDEN_ARRAY
diff --git a/xen/drivers/acpi/Kconfig b/xen/drivers/acpi/Kconfig
index b64d3731fb..e3f3d8f4b1 100644
--- a/xen/drivers/acpi/Kconfig
+++ b/xen/drivers/acpi/Kconfig
@@ -5,5 +5,6 @@ config ACPI
 config ACPI_LEGACY_TABLES_LOOKUP
 	bool
 
-config NUMA
+config ACPI_NUMA
 	bool
+	select NUMA
diff --git a/xen/drivers/acpi/Makefile b/xen/drivers/acpi/Makefile
index 4f8e97228e..2fc5230253 100644
--- a/xen/drivers/acpi/Makefile
+++ b/xen/drivers/acpi/Makefile
@@ -3,7 +3,7 @@ obj-y += utilities/
 obj-$(CONFIG_X86) += apei/
 
 obj-bin-y += tables.init.o
-obj-$(CONFIG_NUMA) += numa.o
+obj-$(CONFIG_ACPI_NUMA) += numa.o
 obj-y += osl.o
 obj-$(CONFIG_HAS_CPUFREQ) += pmstat.o
 
diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index 883c2ef0df..9a6f0a6edf 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -31,7 +31,6 @@
 /* Intel P4 currently has largest cache line (L2 line size is 128 bytes). */
 #define CONFIG_X86_L1_CACHE_SHIFT 7
 
-#define CONFIG_ACPI_NUMA 1
 #define CONFIG_ACPI_SRAT 1
 #define CONFIG_ACPI_CSTATE 1
 
-- 
2.25.1


Re: [XEN RFC PATCH 06/40] xen: decouple NUMA from ACPI in Kconfig
Posted by Jan Beulich 4 years, 6 months ago
On 11.08.2021 12:23, Wei Chen wrote:
> --- a/xen/arch/x86/Kconfig
> +++ b/xen/arch/x86/Kconfig
> @@ -24,7 +24,7 @@ config X86
>  	select HAS_UBSAN
>  	select HAS_VPCI if HVM
>  	select NEEDS_LIBELF
> -	select NUMA
> +	select ACPI_NUMA

We try to keep this alphabetically sorted, so please move up the
replacement line. Then
Reviewed-by: Jan Beulich <jbeulich@suse.com>

Jan


RE: [XEN RFC PATCH 06/40] xen: decouple NUMA from ACPI in Kconfig
Posted by Wei Chen 4 years, 5 months ago
Hi Jan,

> -----Original Message-----
> From: Jan Beulich <jbeulich@suse.com>
> Sent: 2021年8月12日 23:37
> To: Wei Chen <Wei.Chen@arm.com>
> Cc: Bertrand Marquis <Bertrand.Marquis@arm.com>; xen-
> devel@lists.xenproject.org; sstabellini@kernel.org; julien@xen.org
> Subject: Re: [XEN RFC PATCH 06/40] xen: decouple NUMA from ACPI in Kconfig
> 
> On 11.08.2021 12:23, Wei Chen wrote:
> > --- a/xen/arch/x86/Kconfig
> > +++ b/xen/arch/x86/Kconfig
> > @@ -24,7 +24,7 @@ config X86
> >  	select HAS_UBSAN
> >  	select HAS_VPCI if HVM
> >  	select NEEDS_LIBELF
> > -	select NUMA
> > +	select ACPI_NUMA
> 
> We try to keep this alphabetically sorted, so please move up the
> replacement line. Then
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> 

Thanks, I will do it in next version.

> Jan

Re: [XEN RFC PATCH 06/40] xen: decouple NUMA from ACPI in Kconfig
Posted by Julien Grall 4 years, 6 months ago
Hi Wei,

On 11/08/2021 11:23, Wei Chen wrote:
> In current Xen code only implments x86 ACPI-based NUMA support.

s/implments/implements/

> So in Xen Kconfig system, NUMA equals to ACPI_NUMA. x86 selects
> NUMA by default, and CONFIG_ACPI_NUMA is hardcode in config.h.
> 
> In this patch series, we introduced device tree based NUMA for
> Arm.

The concept of patch series only applies to the ML. Once checked-in this 
is only a series of commit. So I would write:

"In a follow-up patch, we will introduce support for NUMA using the 
Device-Tree".

>  That means we will have two NUMA implemetations, so in this

s/implemetations/implementations/

> patch we decouple NUMA from ACPI based NUMA in Kconfig. Make NUMA
> as a common feature, that device tree based NUMA also can select it.

Cheers,

-- 
Julien Grall

RE: [XEN RFC PATCH 06/40] xen: decouple NUMA from ACPI in Kconfig
Posted by Wei Chen 4 years, 5 months ago
Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien@xen.org>
> Sent: 2021年8月13日 0:55
> To: Wei Chen <Wei.Chen@arm.com>; xen-devel@lists.xenproject.org;
> sstabellini@kernel.org; jbeulich@suse.com
> Cc: Bertrand Marquis <Bertrand.Marquis@arm.com>
> Subject: Re: [XEN RFC PATCH 06/40] xen: decouple NUMA from ACPI in Kconfig
> 
> Hi Wei,
> 
> On 11/08/2021 11:23, Wei Chen wrote:
> > In current Xen code only implments x86 ACPI-based NUMA support.
> 
> s/implments/implements/

Got it.

> 
> > So in Xen Kconfig system, NUMA equals to ACPI_NUMA. x86 selects
> > NUMA by default, and CONFIG_ACPI_NUMA is hardcode in config.h.
> >
> > In this patch series, we introduced device tree based NUMA for
> > Arm.
> 
> The concept of patch series only applies to the ML. Once checked-in this
> is only a series of commit. So I would write:
> 
> "In a follow-up patch, we will introduce support for NUMA using the
> Device-Tree".
> 
> >  That means we will have two NUMA implemetations, so in this
> 
> s/implemetations/implementations/
> 

Thanks, I will update the commit log in next version.

> > patch we decouple NUMA from ACPI based NUMA in Kconfig. Make NUMA
> > as a common feature, that device tree based NUMA also can select it.
> 
> Cheers,
> 
> --
> Julien Grall