Re: [Xen-devel] [RFC PATCH v3 15/24] ARM: NUMA: DT: Add CPU NUMA support

2017-07-25 Thread Vijay Kilari
Hi Julien, On Mon, Jul 24, 2017 at 4:54 PM, Julien Grall wrote: > Hi Vijay, > > > On 18/07/17 12:41, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> For each cpu, update cpu_to_node[] with node id from >> the numa-node-id DT

Re: [Xen-devel] [RFC PATCH v3 13/24] ARM: NUMA: DT: Parse memory NUMA information

2017-07-21 Thread Vijay Kilari
Hi Julien, On Thu, Jul 20, 2017 at 4:56 PM, Julien Grall wrote: > > > On 19/07/17 19:39, Julien Grall wrote: >>> >>> cell = (const __be32 *)prop->data; >>> banks = fdt32_to_cpu(prop->len) / (reg_cells * sizeof (u32)); >>> >>> -for ( i = 0; i < banks &&

Re: [Xen-devel] [RFC PATCH v3 02/24] x86: NUMA: Clean up: Fix coding styles and drop unused code

2017-07-20 Thread Vijay Kilari
On Thu, Jul 20, 2017 at 5:39 PM, Julien Grall <julien.gr...@arm.com> wrote: > > > On 20/07/17 13:05, Vijay Kilari wrote: >> >> On Thu, Jul 20, 2017 at 4:30 PM, Julien Grall <julien.gr...@arm.com> >> wrote: >>> >>> Hi Vijay, >>> &g

Re: [Xen-devel] [RFC PATCH v3 02/24] x86: NUMA: Clean up: Fix coding styles and drop unused code

2017-07-20 Thread Vijay Kilari
On Thu, Jul 20, 2017 at 4:30 PM, Julien Grall <julien.gr...@arm.com> wrote: > Hi Vijay, > > > On 20/07/17 08:00, Vijay Kilari wrote: >> >> On Wed, Jul 19, 2017 at 9:53 PM, Julien Grall <julien.gr...@arm.com> >> wrote: >>> >>> Hi Vi

Re: [Xen-devel] [RFC PATCH v3 09/24] NUMA: x86: Move common code from srat.c

2017-07-20 Thread Vijay Kilari
Hi Julien, On Thu, Jul 20, 2017 at 4:47 PM, Julien Grall wrote: > Hi Vijay, > > On 18/07/17 12:41, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Move code from xen/arch/x86/srat.c to xen/common/numa.c >> so that it can be used by

Re: [Xen-devel] [RFC PATCH v3 13/24] ARM: NUMA: DT: Parse memory NUMA information

2017-07-20 Thread Vijay Kilari
On Thu, Jul 20, 2017 at 12:09 AM, Julien Grall wrote: > Hi Vijay, > > On 18/07/17 12:41, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Parse memory node and fetch numa-node-id information. >> For each memory range, store in

Re: [Xen-devel] [RFC PATCH v3 10/24] NUMA: Allow numa initialization with DT

2017-07-20 Thread Vijay Kilari
On Wed, Jul 19, 2017 at 11:28 PM, Julien Grall wrote: > Hi Vijay, > > On 18/07/17 12:41, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> The common code allows numa initialization only when >> ACPI_NUMA config is enabled. Allow

Re: [Xen-devel] [RFC PATCH v3 07/24] ARM: NUMA: Add existing ARM numa code under CONFIG_NUMA

2017-07-20 Thread Vijay Kilari
On Tue, Jul 18, 2017 at 11:36 PM, Julien Grall wrote: > Hi Vijay, > > On 18/07/17 12:41, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Right now CONFIG_NUMA is not enabled for ARM and >> existing code in asm-arm/numa.h is for

Re: [Xen-devel] [RFC PATCH v3 12/24] ARM: NUMA: DT: Parse CPU NUMA information

2017-07-20 Thread Vijay Kilari
On Wed, Jul 19, 2017 at 11:56 PM, Julien Grall wrote: > Hi, > > > On 18/07/17 12:41, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Parse CPU node and fetch numa-node-id information. >> For each node-id found, update nodemask_t mask.

Re: [Xen-devel] [RFC PATCH v3 08/24] NUMA: x86: Move numa code and make it generic

2017-07-20 Thread Vijay Kilari
On Wed, Jul 19, 2017 at 11:11 PM, Julien Grall wrote: > Hi Vijay, > > On 18/07/17 12:41, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Move code from xen/arch/x86/numa.c to xen/common/numa.c >> so that it can be used by other archs.

Re: [Xen-devel] [RFC PATCH v3 05/24] x86: NUMA: Add accessors for nodes[] and node_memblk_range[] structs

2017-07-20 Thread Vijay Kilari
On Wed, Jul 19, 2017 at 10:48 PM, Julien Grall <julien.gr...@arm.com> wrote: > > > On 19/07/17 07:40, Vijay Kilari wrote: >> >> On Tue, Jul 18, 2017 at 8:59 PM, Wei Liu <wei.l...@citrix.com> wrote: >>> >>> On Tue, Jul 18, 2017 at 05:11:27PM

Re: [Xen-devel] [RFC PATCH v3 01/24] NUMA: Make number of NUMA nodes configurable

2017-07-20 Thread Vijay Kilari
On Wed, Jul 19, 2017 at 9:25 PM, Julien Grall <julien.gr...@arm.com> wrote: > Hi Vijay, > > > On 19/07/2017 08:00, Vijay Kilari wrote: >> >> On Tue, Jul 18, 2017 at 11:25 PM, Julien Grall <julien.gr...@arm.com> >> wrote: >>> >>> Hi,

Re: [Xen-devel] [RFC PATCH v3 02/24] x86: NUMA: Clean up: Fix coding styles and drop unused code

2017-07-20 Thread Vijay Kilari
On Wed, Jul 19, 2017 at 9:53 PM, Julien Grall wrote: > Hi Vijay, > > On 18/07/17 12:41, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Fix coding style, trailing spaces, tabs in NUMA code. >> Also drop unused macros and functions. >>

Re: [Xen-devel] [RFC PATCH v3 04/24] x86: NUMA: Rename and sanitize memnode shift code

2017-07-20 Thread Vijay Kilari
On Wed, Jul 19, 2017 at 10:42 PM, Julien Grall wrote: > Hi Vijay, > > On 18/07/17 12:41, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> memnode_shift variable is changed from int to unsigned int. >> With this change,

Re: [Xen-devel] [RFC PATCH v3 01/24] NUMA: Make number of NUMA nodes configurable

2017-07-19 Thread Vijay Kilari
On Tue, Jul 18, 2017 at 11:25 PM, Julien Grall wrote: > Hi, > > > On 18/07/17 12:41, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Introduce NR_NODES config option to specify number >> of NUMA nodes supported. By default value is

Re: [Xen-devel] [RFC PATCH v3 08/24] NUMA: x86: Move numa code and make it generic

2017-07-19 Thread Vijay Kilari
On Tue, Jul 18, 2017 at 11:46 PM, Julien Grall wrote: > Hi, > > > On 18/07/17 16:29, Wei Liu wrote: >> >> On Tue, Jul 18, 2017 at 05:11:30PM +0530, vijay.kil...@gmail.com wrote: >> [...] >>> >>> diff --git a/xen/common/numa.c b/xen/common/numa.c >>> new file mode 100644 >>>

Re: [Xen-devel] [RFC PATCH v3 05/24] x86: NUMA: Add accessors for nodes[] and node_memblk_range[] structs

2017-07-19 Thread Vijay Kilari
On Tue, Jul 18, 2017 at 8:59 PM, Wei Liu wrote: > On Tue, Jul 18, 2017 at 05:11:27PM +0530, vijay.kil...@gmail.com wrote: >> From: Vijaya Kumar K >> >> Add accessors for nodes[] and other static variables and >> use those accessors. These variables

Re: [Xen-devel] [RFC PATCH v3 18/24] ACPI: Refactor acpi SRAT and SLIT table handling code

2017-07-19 Thread Vijay Kilari
On Tue, Jul 18, 2017 at 9:06 PM, Wei Liu wrote: > On Tue, Jul 18, 2017 at 05:11:40PM +0530, vijay.kil...@gmail.com wrote: >> From: Vijaya Kumar K >> >> Move SRAT handling code which is common across >> architectures is moved to new file

Re: [Xen-devel] [RFC PATCH v3 00/24] ARM: Add Xen NUMA support

2017-07-19 Thread Vijay Kilari
On Tue, Jul 18, 2017 at 9:48 PM, Julien Grall wrote: > Hi, > > On 18/07/17 12:41, vijay.kil...@gmail.com wrote: >> >> This patch is tested on Thunderx platform. >> No changes are made to x86 implementation only code is sanitized >> and refactored. Hence only compilation

[Xen-devel] [RFC PATCH v3 23/24] NUMA: Move CONFIG_NUMA to common Kconfig

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K CONFIG_NUMA is defined in xen/drivers/acpi/Kconfig. Move to common/Kconfig and enabled by default. Also, NUMA feature uses PDX for physical address to memory node mapping. Hence make HAS_PDX dependent for NUMA. Signed-off-by: Vijaya Kumar K

[Xen-devel] [RFC PATCH v3 14/24] ARM: NUMA: DT: Parse NUMA distance information

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Parse distance-matrix and fetch node distance information. Store distance information in node_distance[]. Register dt_node_distance() function pointer with the ARM numa code. This approach can be later used for ACPI. Signed-off-by: Vijaya Kumar K

[Xen-devel] [RFC PATCH v3 24/24] NUMA: Enable ACPI_NUMA config

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Add CONFIG_ACPI_NUMA to xen/drivers/acpi/Kconfig and drop CONFIG_ACPI_NUMA set in asm-x86/config.h. Signed-off-by: Vijaya Kumar K --- xen/drivers/acpi/Kconfig | 4 xen/include/asm-x86/config.h | 1 - 2 files

[Xen-devel] [RFC PATCH v3 12/24] ARM: NUMA: DT: Parse CPU NUMA information

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Parse CPU node and fetch numa-node-id information. For each node-id found, update nodemask_t mask. Refer to Documentation/devicetree/bindings/numa.txt in linux kernel. Signed-off-by: Vijaya Kumar K --- v3: - Parse cpu nodes

[Xen-devel] [RFC PATCH v3 09/24] NUMA: x86: Move common code from srat.c

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Move code from xen/arch/x86/srat.c to xen/common/numa.c so that it can be used by other archs. Apart from moving the code the following changes are done - Coding style of code moved to numa.c is changed to xen style -

[Xen-devel] [RFC PATCH v3 16/24] ARM: NUMA: Add memory NUMA support

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Implement arch_sanitize_nodes_memory() which looks at all banks in bootinfo.mem, update nodes[] with corresponding nodeid. Call numa_scan_nodes() generic function with ram start and end address, which takes care of further computing memnodeshift and

[Xen-devel] [RFC PATCH v3 21/24] ARM: NUMA: ACPI: Extract proximity from SRAT table

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Register SRAT entry handler for type ACPI_SRAT_TYPE_GICC_AFFINITY to parse SRAT table and extract proximity for all CPU IDs. Signed-off-by: Vijaya Kumar --- xen/arch/arm/acpi/boot.c | 2 +

[Xen-devel] [RFC PATCH v3 20/24] ACPI: Move arch specific SRAT parsing

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K SRAT's X2APIC_CPU_AFFINITY and CPU_AFFINITY types are not used by ARM. Hence move handling of this SRAT types to arch specific file and handle them under arch_table_parse_srat(). Signed-off-by: Vijaya Kumar K ---

[Xen-devel] [RFC PATCH v3 22/24] ARM: NUMA: Initialize ACPI NUMA

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Call ACPI NUMA initialization under CONFIG_ACPI_NUMA. Signed-off-by: Vijaya Kumar --- xen/arch/arm/numa/acpi_numa.c | 27 ++- xen/arch/arm/numa/numa.c | 15 +-- xen/common/numa.c

[Xen-devel] [RFC PATCH v3 19/24] ARM: NUMA: Extract MPIDR from MADT table

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Parse MADT table and extract MPIDR for all CPU IDs in MADT ACPI_MADT_TYPE_GENERIC_INTERRUPT entries and store in cpuid_to_hwid_map[] This mapping is used by SRAT table parsing to extract MPIDR of the CPU ID. MADT table is also parsed in

[Xen-devel] [RFC PATCH v3 15/24] ARM: NUMA: DT: Add CPU NUMA support

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K For each cpu, update cpu_to_node[] with node id from the numa-node-id DT property. Also, initialize cpu_to_node[] with node 0. Add macros to access cpu_to_node[] information. Signed-off-by: Vijaya Kumar K --- v3: - Dropped

[Xen-devel] [RFC PATCH v3 17/24] ARM: NUMA: DT: Do not expose numa info to DOM0

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K 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

[Xen-devel] [RFC PATCH v3 11/24] ARM: fdt: Export and introduce new fdt functions

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Introduce new api device_tree_type_matches() to check for device type. Also export device_tree_get_u32() and device_tree_node_compatible() These functions are later used for parsing NUMA information. Signed-off-by: Vijaya Kumar K

[Xen-devel] [RFC PATCH v3 13/24] ARM: NUMA: DT: Parse memory NUMA information

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Parse memory node and fetch numa-node-id information. For each memory range, store in node_memblk_range[] along with node id. When booting in UEFI mode, UEFI passes memory information to Dom0 using EFI memory descriptor table and deletes the memory

[Xen-devel] [RFC PATCH v3 07/24] ARM: NUMA: Add existing ARM numa code under CONFIG_NUMA

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Right now CONFIG_NUMA is not enabled for ARM and existing code in asm-arm/numa.h is for !CONFIG_NUMA. Hence put this code under #ifndef CONFIG_NUMA. This help to make this changes work when CONFIG_NUMA is not enabled. Though CONFIG_NUMA is enabled

[Xen-devel] [RFC PATCH v3 18/24] ACPI: Refactor acpi SRAT and SLIT table handling code

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Move SRAT handling code which is common across architectures is moved to new file xen/drivers/acpi/srat.c from xen/arch/x86/srat.c file. New header file srat.h is introduced. Other major changes are: - Coding style of code moved is changed. - Moved

[Xen-devel] [RFC PATCH v3 01/24] NUMA: Make number of NUMA nodes configurable

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Introduce NR_NODES config option to specify number of NUMA nodes supported. By default value is set at 64 for x86 and 8 for arm. Dropped NODES_SHIFT macro. Also move NR_NODE_MEMBLKS from asm-x86/acpi.h to xen/numa.h Signed-off-by: Vijaya Kumar K

[Xen-devel] [RFC PATCH v3 00/24] ARM: Add Xen NUMA support

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K With this RFC patch series, NUMA support is added for ARM platform. Both DT and ACPI based NUMA support is added. Only Xen is made aware of NUMA platform. NUMA awareness to DOM0 is not added. As part of this series, the code under x86 architecture

[Xen-devel] [RFC PATCH v3 10/24] NUMA: Allow numa initialization with DT

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K The common code allows numa initialization only when ACPI_NUMA config is enabled. Allow initialization when NUMA config is enabled for DT. In this patch, along with acpi_numa, check for acpi_disabled is added. Signed-off-by: Vijaya Kumar K

[Xen-devel] [RFC PATCH v3 03/24] x86: NUMA: Fix datatypes and attributes

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Change u{8,32,64} to uint{8,32,64}_t, u64 to paddr_t wherever applicable. Fix attributes coding styles. Also changed - Some variables from int to unsigned int - Used pfn_to_paddr/paddr_to_pfn whereever required. - Alloc memnodemap[] of size

[Xen-devel] [RFC PATCH v3 04/24] x86: NUMA: Rename and sanitize memnode shift code

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K memnode_shift variable is changed from int to unsigned int. With this change, compute_memnode_shift() returns error value instead of returning shift value. The memnode_shift is updated inside compute_memnode_shift(). Also, following changes are made

[Xen-devel] [RFC PATCH v3 05/24] x86: NUMA: Add accessors for nodes[] and node_memblk_range[] structs

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Add accessors for nodes[] and other static variables and use those accessors. These variables are later accessed outside the file when the code made generic in later patches. However the coding style is not changed. Signed-off-by: Vijaya Kumar K

[Xen-devel] [RFC PATCH v3 08/24] NUMA: x86: Move numa code and make it generic

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Move code from xen/arch/x86/numa.c to xen/common/numa.c so that it can be used by other archs. The following changes are done: - Few generic static functions in x86/numa.c is made non-static common/numa.c - The generic contents of header file

[Xen-devel] [RFC PATCH v3 02/24] x86: NUMA: Clean up: Fix coding styles and drop unused code

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Fix coding style, trailing spaces, tabs in NUMA code. Also drop unused macros and functions. There is no functional change. Signed-off-by: Vijaya Kumar K Reviewed-by: Wei Liu --- v3: - Change commit

[Xen-devel] [RFC PATCH v3 06/24] x86: NUMA: Rename some generic functions

2017-07-18 Thread vijay . kilari
From: Vijaya Kumar K Rename some function in ACPI code as follow - Rename setup_node to acpi_setup_node - Rename bad_srat to numa_failed - Rename nodes_cover_memory to arch_sanitize_nodes_memory and changed return type to bool - Rename acpi_scan_nodes to

Re: [Xen-devel] [RFC PATCH v2 03/25] x86: NUMA: Rename and sanitize some common functions

2017-07-11 Thread Vijay Kilari
Hi Jan, Sorry for late reply. On Fri, Jun 30, 2017 at 7:35 PM, Jan Beulich wrote: 03/28/17 5:54 PM >>> >> --- a/xen/arch/x86/numa.c >> +++ b/xen/arch/x86/numa.c >> @@ -53,15 +53,15 @@ int srat_disabled(void) >> /* >> * Given a shift value,

Re: [Xen-devel] [RFC PATCH v2 24/25] NUMA: Move CONFIG_NUMA to common Kconfig

2017-06-15 Thread Vijay Kilari
On Wed, May 31, 2017 at 4:07 PM, Jan Beulich wrote: On 31.05.17 at 12:18, wrote: >> On 31/05/17 11:04, Jan Beulich wrote: >> On 28.03.17 at 17:53, wrote: --- a/xen/common/Kconfig +++ b/xen/common/Kconfig @@

Re: [Xen-devel] [RFC PATCH v2 11/25] x86: NUMA: Move common code from srat.c

2017-05-10 Thread Vijay Kilari
and On Mon, May 8, 2017 at 10:36 PM, Julien Grall wrote: > Hi Vijay, > > > On 28/03/17 16:53, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Move code from xen/arch/x86/srat.c to xen/common/numa.c >> so that it can be used by other

Re: [Xen-devel] [RFC PATCH v2 12/25] ARM: NUMA: Parse CPU NUMA information

2017-05-09 Thread Vijay Kilari
On Mon, May 8, 2017 at 11:01 PM, Julien Grall wrote: > Hi Vijay, > > The title likely needs to have the work device-tree/DT in it. > > On 28/03/17 16:53, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Parse CPU node and fetch

Re: [Xen-devel] [RFC PATCH v2 10/25] x86: NUMA: Move numa code and make it generic

2017-05-09 Thread Vijay Kilari
On Mon, May 8, 2017 at 10:21 PM, Julien Grall wrote: > On 28/03/17 16:53, vijay.kil...@gmail.com wrote: >> >> diff --git a/xen/common/numa.c b/xen/common/numa.c >> new file mode 100644 >> index 000..207ebd8 >> --- /dev/null >> +++ b/xen/common/numa.c >> @@ -0,0 +1,488 @@

Re: [Xen-devel] [RFC PATCH v2 10/25] x86: NUMA: Move numa code and make it generic

2017-05-09 Thread Vijay Kilari
On Mon, May 8, 2017 at 10:11 PM, Julien Grall wrote: > Hi Vijay, > > > On 28/03/17 16:53, vijay.kil...@gmail.com wrote: >> >> diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c >> index 3bdab9a..33c6806 100644 >> --- a/xen/arch/x86/numa.c >> +++ b/xen/arch/x86/numa.c >>

Re: [Xen-devel] [RFC PATCH v2 09/25] ARM: NUMA: Add existing ARM numa code under CONFIG_NUMA

2017-05-09 Thread Vijay Kilari
On Mon, May 8, 2017 at 9:28 PM, Julien Grall wrote: > Hi Vijay, > > On 28/03/17 16:53, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Right now CONFIG_NUMA is not enabled for ARM and >> existing code in asm-arm/numa.h is for

Re: [Xen-devel] [RFC PATCH v2 06/25] x86: NUMA: Add accessors for nodes[] and node_memblk_range[] structs

2017-05-09 Thread Vijay Kilari
On Mon, May 8, 2017 at 8:09 PM, Julien Grall wrote: > Hi Vijay, > > On 28/03/17 16:53, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Add accessor for nodes[] and other static variables and > > > s/accessor/accessors/ > >> used those

Re: [Xen-devel] [RFC PATCH v2 04/25] x86: NUMA: Add accessors for acpi_numa, numa_off and numa_fake variables

2017-05-02 Thread Vijay Kilari
On Tue, Apr 25, 2017 at 9:13 PM, Jan Beulich <jbeul...@suse.com> wrote: >>>> On 25.04.17 at 17:14, <julien.gr...@arm.com> wrote: >> On 25/04/17 15:54, Vijay Kilari wrote: >>> On Tue, Apr 25, 2017 at 5:58 PM, Julien Grall <julien.gr...@arm.com> wrote:

Re: [Xen-devel] [RFC PATCH v2 04/25] x86: NUMA: Add accessors for acpi_numa, numa_off and numa_fake variables

2017-04-25 Thread Vijay Kilari
On Tue, Apr 25, 2017 at 5:58 PM, Julien Grall <julien.gr...@arm.com> wrote: > > > On 25/04/17 13:20, Vijay Kilari wrote: >> >> On Tue, Apr 25, 2017 at 5:34 PM, Julien Grall <julien.gr...@arm.com> >> wrote: >>> >>> Hello Vijay, >>>

Re: [Xen-devel] [RFC PATCH v2 04/25] x86: NUMA: Add accessors for acpi_numa, numa_off and numa_fake variables

2017-04-25 Thread Vijay Kilari
On Tue, Apr 25, 2017 at 5:34 PM, Julien Grall <julien.gr...@arm.com> wrote: > Hello Vijay, > > On 25/04/17 07:54, Vijay Kilari wrote: >> >> On Thu, Apr 20, 2017 at 9:29 PM, Julien Grall <julien.gr...@arm.com> >> wrote: >>> >>> Hi Vijay

Re: [Xen-devel] [RFC PATCH v2 05/25] x86: NUMA: Move generic dummy_numa_init to separate function

2017-04-25 Thread Vijay Kilari
On Thu, Apr 20, 2017 at 9:42 PM, Julien Grall wrote: > Hi Vijay, > > > On 28/03/17 16:53, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Split numa_initmem_init() so that the numa fallback code is moved >> as separate function which

Re: [Xen-devel] [RFC PATCH v2 04/25] x86: NUMA: Add accessors for acpi_numa, numa_off and numa_fake variables

2017-04-25 Thread Vijay Kilari
On Thu, Apr 20, 2017 at 9:29 PM, Julien Grall wrote: > Hi Vijay, > > On 28/03/17 16:53, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> Add accessor functions for acpi_numa and numa_off static >> variables. Init value of acpi_numa is

Re: [Xen-devel] [PATCH v7 00/34] arm64: Dom0 ITS emulation

2017-04-11 Thread Vijay Kilari
Hi Andre, On Sat, Apr 8, 2017 at 3:37 AM, Andre Przywara wrote: > Hi, > > an only slightly modified repost of the last version. > I added the Reviewed-by: and Acked-by: tags from Stefano and Julien > and rebased on top of the latest staging tree: > commit

[Xen-devel] [PATCH v5] boot allocator: Use arch helper for virt_to_mfn on DIRECTMAP_VIRT region

2017-04-06 Thread vijay . kilari
From: Vijaya Kumar K On ARM platforms with NUMA, while initializing second memory node, panic is triggered from init_node_heap() when virt_to_mfn() is called for DIRECTMAP_VIRT region address because DIRECTMAP_VIRT region is not mapped to any virtual address. The check

Re: [Xen-devel] [PATCH v4] boot allocator: Use arch helper for virt_to_mfn on DIRECTMAP

2017-04-03 Thread Vijay Kilari
Hi Julien, On Mon, Apr 3, 2017 at 3:31 PM, Julien Grall wrote: > Hi Vijay, > > On 28/03/17 13:35, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> On ARM64, virt_to_mfn uses the hardware for address >> translation. So if the virtual

Re: [Xen-devel] [PATCH v3 19/26] ARM: vITS: handle MAPTI command

2017-04-01 Thread Vijay Kilari
On Fri, Mar 31, 2017 at 11:35 PM, Andre Przywara wrote: > The MAPTI commands associates a DeviceID/EventID pair with a LPI/CPU > pair and actually instantiates LPI interrupts. > We connect the already allocated host LPI to this virtual LPI, so that > any triggering IRQ on

Re: [Xen-devel] [PATCH v3 06/26] ARM: GICv3 ITS: introduce device mapping

2017-04-01 Thread Vijay Kilari
Hi Andre, On Fri, Mar 31, 2017 at 11:35 PM, Andre Przywara wrote: > The ITS uses device IDs to map LPIs to a device. Dom0 will later use > those IDs, which we directly pass on to the host. > For this we have to map each device that Dom0 may request to a host > ITS device

Re: [Xen-devel] [PATCH v2 06/27] ARM: GICv3 ITS: introduce device mapping

2017-03-30 Thread Vijay Kilari
Hi Andre, On Thu, Mar 16, 2017 at 4:50 PM, Andre Przywara wrote: > The ITS uses device IDs to map LPIs to a device. Dom0 will later use > those IDs, which we directly pass on to the host. > For this we have to map each device that Dom0 may request to a host > ITS device

[Xen-devel] [RFC PATCH v2 23/25] ARM: NUMA: Initialize ACPI NUMA

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Call ACPI NUMA initialization under CONFIG_ACPI_NUMA. Signed-off-by: Vijaya Kumar --- xen/arch/arm/numa/acpi_numa.c | 28 +++- xen/arch/arm/numa/numa.c | 6 ++ xen/common/numa.c

[Xen-devel] [RFC PATCH v2 14/25] ARM: NUMA: Parse NUMA distance information

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Parse distance-matrix and fetch node distance information. Store distance information in node_distance[]. Register dt_node_distance() function pointer with the ARM numa code. This approach can be later used for ACPI. Signed-off-by: Vijaya Kumar K

[Xen-devel] [RFC PATCH v2 21/25] ACPI: Move arch specific SRAT parsing

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K SRAT's X2APIC_CPU_AFFINITY and CPU_AFFINITY types are not used by ARM. Hence move handling of this SRAT types to arch specific file and handle them under arch_table_parse_srat(). Signed-off-by: Vijaya Kumar K ---

[Xen-devel] [RFC PATCH v2 22/25] ARM: NUMA: Extract proximity from SRAT table

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Register SRAT entry handler for type ACPI_SRAT_TYPE_GICC_AFFINITY to parse SRAT table and extract proximity for all CPU IDs. Signed-off-by: Vijaya Kumar --- xen/arch/arm/acpi/boot.c | 2 +

[Xen-devel] [RFC PATCH v2 20/25] ARM: NUMA: Extract MPIDR from MADT table

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Parse MADT table and extract MPIDR for all CPU IDs in MADT ACPI_MADT_TYPE_GENERIC_INTERRUPT entries and store in cpuid_to_hwid_map[] This mapping is used by SRAT table parsing to extract MPIDR of the CPU ID. Signed-off-by: Vijaya Kumar

[Xen-devel] [RFC PATCH v2 17/25] ARM: NUMA: Add fallback on NUMA failure

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K On NUMA initialization failure, reset all the NUMA structures to emulate as single node. Signed-off-by: Vijaya Kumar --- xen/arch/arm/numa/numa.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[Xen-devel] [RFC PATCH v2 25/25] NUMA: Enable ACPI_NUMA config

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Add CONFIG_ACPI_NUMA to xen/drivers/acpi/Kconfig and drop CONFIG_ACPI_NUMA set in asm-x86/config.h. Signed-off-by: Vijaya Kumar K --- xen/drivers/acpi/Kconfig | 4 xen/include/asm-x86/config.h | 1 - 2 files

[Xen-devel] [RFC PATCH v2 24/25] NUMA: Move CONFIG_NUMA to common Kconfig

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K CONFIG_NUMA is defined in xen/drivers/acpi/Kconfig. Move to common/Kconfig and enabled by default. Also, NUMA feature uses PDX for physical address to memory node mapping. Hence make HAS_PDX dependent for NUMA. Signed-off-by: Vijaya Kumar K

[Xen-devel] [RFC PATCH v2 19/25] ACPI: Refactor acpi SRAT and SLIT table handling code

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Move SRAT handling code which is common across architecture is moved to new file xen/drivers/acpi/srat.c from xen/arch/x86/srat.c file. New header file srat.h is introduced. Signed-off-by: Vijaya Kumar K ---

[Xen-devel] [RFC PATCH v2 12/25] ARM: NUMA: Parse CPU NUMA information

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Parse CPU node and fetch numa-node-id information. For each node-id found, update nodemask_t mask. Refer to /Documentation/devicetree/bindings/numa.txt. Signed-off-by: Vijaya Kumar K --- xen/arch/arm/Makefile | 1 +

[Xen-devel] [RFC PATCH v2 15/25] ARM: NUMA: Add CPU NUMA support

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K For each cpu, update cpu_to_node[] with node id from the numa-node-id DT property. Also, initialize cpu_to_node[] with node 0. Add macros to access cpu_to_node[] information. Signed-off-by: Vijaya Kumar K ---

[Xen-devel] [RFC PATCH v2 16/25] ARM: NUMA: Add memory NUMA support

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Implement arch_sanitize_nodes_memory() which looks at all banks in bootinfo.mem, update nodes[] with corresponding nodeid. Call numa_scan_nodes() generic function with ram start and end address, which takes care of further computing memnodeshift and

[Xen-devel] [RFC PATCH v2 18/25] ARM: NUMA: Do not expose numa info to DOM0

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K 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

[Xen-devel] [RFC PATCH v2 13/25] ARM: NUMA: Parse memory NUMA information

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Parse memory node and fetch numa-node-id information. For each memory range, store in node_memblk_range[] along with node id. When booting in UEFI mode, UEFI passes memory information to Dom0 using EFI memory descriptor table and deletes the memory

[Xen-devel] [RFC PATCH v2 10/25] x86: NUMA: Move numa code and make it generic

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Move code from xen/arch/x86/numa.c to xen/common/numa.c so that it can be used by other archs. Few generic static functions in x86/numa.c is made non-static common/numa.c The generic contents of header file asm-x86/numa.h are moved to xen/numa.h.

[Xen-devel] [RFC PATCH v2 11/25] x86: NUMA: Move common code from srat.c

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Move code from xen/arch/x86/srat.c to xen/common/numa.c so that it can be used by other archs. Few generic static functions in x86/srat.c are made non-static common/numa.c Signed-off-by: Vijaya Kumar K ---

[Xen-devel] [RFC PATCH v2 08/25] x86: NUMA: Sanitize node distance

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Introduce acpi_node_distance() and call from __node_distance(). This helps to implement arch specific __node_distance(). Also introduce LOCAL_DISTANCE & REMOTE DISTANCE macros. Signed-off-by: Vijaya Kumar K ---

[Xen-devel] [RFC PATCH v2 09/25] ARM: NUMA: Add existing ARM numa code under CONFIG_NUMA

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Right now CONFIG_NUMA is not enabled for ARM and existing code in asm-arm/numa.h is for !CONFIG_NUMA. Hence put this code under #ifndef CONFIG_NUMA. This help to make this changes work when CONFIG_NUMA is not enabled. Also define NODES_SHIFT macro

[Xen-devel] [RFC PATCH v2 07/25] x86: NUMA: Rename some generic functions

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Rename some function in ACPI code as follow - Rename setup_node to acpi_setup_node - Rename bad_srat to numa_failed - Rename nodes_cover_memory to arch_sanitize_nodes_memory - Rename acpi_scan_nodes to numa_scan_nodes Also introduce

[Xen-devel] [RFC PATCH v2 06/25] x86: NUMA: Add accessors for nodes[] and node_memblk_range[] structs

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Add accessor for nodes[] and other static variables and used those accessors. Signed-off-by: Vijaya Kumar K --- xen/arch/x86/srat.c | 108 +++- 1 file changed, 82

[Xen-devel] [RFC PATCH v2 02/25] x86: NUMA: Fix datatypes and attributes

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Change u{8,32,64} to uint{8,32,64}_t and bool_t to bool. Fix attributes coding styles. Also change memnodeshift to unsigned int. Signed-off-by: Vijaya Kumar K --- xen/arch/x86/numa.c| 40

[Xen-devel] [RFC PATCH v2 00/25] ARM: Add Xen NUMA support

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K With this RFC patch series, NUMA support is added for ARM platform. Both DT and ACPI based NUMA support is added. Only Xen is made aware of NUMA platform. NUMA awareness to DOM0 is not added. As part of this series, the code under x86 architecture

[Xen-devel] [RFC PATCH v2 03/25] x86: NUMA: Rename and sanitize some common functions

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Following changes are made - Rename compute_hash_shift to compute_memnode_shift and return error values instead of shift. - Changes prototypes of populate_memnodemap() and extract_lsb_from_nodes() Signed-off-by: Vijaya Kumar K

[Xen-devel] [RFC PATCH v2 04/25] x86: NUMA: Add accessors for acpi_numa, numa_off and numa_fake variables

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Add accessor functions for acpi_numa and numa_off static variables. Init value of acpi_numa is set 1 instead of 0. Also return value of srat_disabled is changed to bool. Signed-off-by: Vijaya Kumar K ---

[Xen-devel] [RFC PATCH v2 05/25] x86: NUMA: Move generic dummy_numa_init to separate function

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Split numa_initmem_init() so that the numa fallback code is moved as separate function which is generic. Signed-off-by: Vijaya Kumar K --- xen/arch/x86/numa.c | 29 + 1 file changed, 17

[Xen-devel] [RFC PATCH v2 01/25] x86: NUMA: Clean up: Drop trailing spaces

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K Fix coding style, trailing spaces, tabs in NUMA code. Also drop unused macros and functions. Signed-off-by: Vijaya Kumar K --- xen/arch/x86/numa.c| 47 +-

[Xen-devel] [PATCH v4] boot allocator: Use arch helper for virt_to_mfn on DIRECTMAP

2017-03-28 Thread vijay . kilari
From: Vijaya Kumar K On ARM64, virt_to_mfn uses the hardware for address translation. So if the virtual address is not mapped translation fault is raised. On ARM64, DIRECTMAP_VIRT region is direct mapped. On ARM platforms with NUMA, While initializing second memory

Re: [Xen-devel] ARM: SMMUv3 support

2017-03-27 Thread Vijay Kilari
sting ? :) Thanks Sameer. I don't have any specific requirement. I am also looking with ACPI support. Please share your RFC patches so that I can test on our platform. > Thanks, > Sameer > > On 3/20/2017 11:58 PM, Vijay Kilari wrote: >> Hi, >> >> Is there any e

Re: [Xen-devel] [PATCH v3] boot allocator: Use arch helper for virt_to_mfn on DIRECTMAP

2017-03-27 Thread Vijay Kilari
Hi Jan, Thanks for the review. On Mon, Mar 27, 2017 at 12:50 PM, Jan Beulich wrote: On 27.03.17 at 09:10, wrote: >> @@ -254,7 +262,6 @@ static inline int gvirt_to_maddr(vaddr_t va, paddr_t >> *pa, unsigned int flags) >> #define

[Xen-devel] [PATCH v3] boot allocator: Use arch helper for virt_to_mfn on DIRECTMAP

2017-03-27 Thread vijay . kilari
From: Vijaya Kumar K On ARM64, virt_to_mfn uses the hardware for address translation. So if the virtual address is not mapped translation fault is raised. On ARM64, DIRECTMAP_VIRT region is direct mapped. On ARM platforms with NUMA, While initializing second memory

[Xen-devel] ARM: SMMUv3 support

2017-03-20 Thread Vijay Kilari
Hi, Is there any effort put by anyone to get SMMUv3 support in Xen for ARM64?. Would be glad to know. Regards Vijay ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v2 14/27] ARM: vGICv3: introduce basic ITS emulation bits

2017-03-20 Thread Vijay Kilari
On Thu, Mar 16, 2017 at 9:55 PM, Shanker Donthineni wrote: > Hi Andre, > > > On 03/16/2017 06:20 AM, Andre Przywara wrote: >> Create a new file to hold the emulation code for the ITS widget. >> For now we emulate the memory mapped ITS registers and provide a stub >> to

Re: [Xen-devel] [PATCH v2] boot allocator: Use arch helper for virt_to_mfn on DIRECTMAP

2017-03-14 Thread Vijay Kilari
On Tue, Mar 14, 2017 at 9:02 PM, Julien Grall wrote: > Hello Vijay, > > On 13/03/17 11:43, vijay.kil...@gmail.com wrote: >> >> From: Vijaya Kumar K >> >> On ARM, virt_to_mfn uses the hardware for address >> translation. So if the virtual address is

Re: [Xen-devel] [PATCH v2] boot allocator: Use arch helper for virt_to_mfn on DIRECTMAP

2017-03-13 Thread Vijay Kilari
On Mon, Mar 13, 2017 at 7:12 PM, Jan Beulich wrote: On 13.03.17 at 12:43, wrote: >> --- a/xen/include/asm-arm/mm.h >> +++ b/xen/include/asm-arm/mm.h >> @@ -260,6 +260,13 @@ static inline int gvirt_to_maddr(vaddr_t va, paddr_t >> *pa, unsigned int

[Xen-devel] [PATCH v2] boot allocator: Use arch helper for virt_to_mfn on DIRECTMAP

2017-03-13 Thread vijay . kilari
From: Vijaya Kumar K On ARM, virt_to_mfn uses the hardware for address translation. So if the virtual address is not mapped translation fault is raised.On ARM, DIRECTMAP_VIRT region is direct mapped. On ARM with NUMA, While initializing second memory node, panic is

Re: [Xen-devel] [RFC PATCH v1 16/21] ARM: NUMA: Extract proximity from SRAT table

2017-03-10 Thread Vijay Kilari
On Fri, Mar 3, 2017 at 8:52 PM, Jan Beulich wrote: On 03.03.17 at 16:16, wrote: >> On Fri, Mar 3, 2017 at 8:22 PM, Julien Grall wrote: >>> int __init acpi_numa_init(void) >>> { >>> if (!acpi_parse_table()) { >>>

Re: [Xen-devel] [PATCH v1] boot allocator: Use arch helper for virt_to_mfn on DIRECTMAP

2017-03-10 Thread Vijay Kilari
On Fri, Mar 10, 2017 at 3:09 PM, Julien Grall wrote: > Hello, > > It is not the first time I am saying this. Please CC *all* the maintainers > of the code you modify. Give a look at scripts/get_maintainers.pl. I got below maintainers when I ran the script on complete patch

  1   2   3   4   5   6   >