Re: [PATCH v2 3/5] automation: Add the expect script with test case for FVP

2023-12-08 Thread Wei Chen
_real_time flag in CI for most test cases, but disable it for some time sensitive test cases? Normally, enable use_real_time will give several times improvement of FVP performance. Cheers, Wei Chen ~Michal

Re: [PATCH] MAINTAINERS: Hand over the release manager role to Oleksii Kurochko

2023-12-08 Thread Wei Chen
g +M: Oleksii Kurochko R:Community Manager S:Maintained F:CHANGELOG.md I'm proud of your work on the last two Xen releases. Thanks for your works! Cheers, Wei Chen

Re: [XEN PATCH 3/4] arm/new vgic: Add GICv3 support for NEW VGIC

2023-10-26 Thread Wei Chen
ink introduce CONFIG_NEW_VGIC to generic Arm code might be not a good idea (here and elsewhere in the patch below). We may need a helper-like abstraction to hide these differences in vgic itself. Cheers, Wei Chen res = domain_fdt_begin_node(fdt, "in

Re: [XEN PATCH 2/4] arm/vgic: Move get/put irq to a wider scope

2023-10-26 Thread Wei Chen
CONFIG_NEW_VGIC macro? Cheers, Wei Chen #endif /* __ASM_ARM_VGIC_H__ */ /* diff --git a/xen/arch/arm/vgic/vgic.h b/xen/arch/arm/vgic/vgic.h index 534b24bcd3..c6bc3509a5 100644 --- a/xen/arch/arm/vgic/vgic.h +++ b/xen/arch/arm/vgic/vgic.h @@ -45,9 +45,6 @@ static inline bool

RE: [PATCH v2 07/40] xen/arm64: add .text.idmap for Xen identity map sections

2023-01-18 Thread Wei Chen
a commit (229ebd517b9d) that > now define _end_boot in the linker script. > > The .text.idmap section can be added before the definition of _end_boot. > Oh, my branch was a little old, I have seen this new definition in xen.ld.S after I update the branch. I understand now. > > &

RE: [PATCH v2 04/40] xen/arm: add an option to define Xen start address for Armv8-R

2023-01-18 Thread Wei Chen
Hi Julien, > -Original Message- > From: Xen-devel On Behalf Of > Julien Grall > Sent: 2023年1月18日 19:00 > To: Wei Chen ; Penny Zheng ; xen- > de...@lists.xenproject.org > Cc: Stefano Stabellini ; Bertrand Marquis > ; Volodymyr Babchuk ; > Jiamei Xie > Sub

RE: [PATCH v2 05/40] xen/arm64: prepare for moving MMU related code from head.S

2023-01-18 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2023年1月18日 17:50 > To: Wei Chen ; Penny Zheng ; xen- > de...@lists.xenproject.org > Cc: Stefano Stabellini ; Bertrand Marquis > ; Volodymyr Babchuk > Subject: Re: [PATCH v2 05/40] xen/arm64: prepar

RE: [PATCH v2 04/40] xen/arm: add an option to define Xen start address for Armv8-R

2023-01-18 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2023年1月18日 17:44 > To: Wei Chen ; Penny Zheng ; xen- > de...@lists.xenproject.org > Cc: Stefano Stabellini ; Bertrand Marquis > ; Volodymyr Babchuk ; > Jiamei Xie > Subject: Re: [PATCH v2 04/40

RE: [PATCH v2 05/40] xen/arm64: prepare for moving MMU related code from head.S

2023-01-17 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2023年1月18日 7:37 > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 05/40] xen/arm64: prepare for m

RE: [PATCH v2 04/40] xen/arm: add an option to define Xen start address for Armv8-R

2023-01-17 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2023年1月18日 7:24 > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk ; Jiamei Xie > > Subject: Re: [PATCH v2 04/40] xen/a

RE: [PATCH v2 03/40] xen/arm: adjust Xen TLB helpers for Armv8-R64 PMSA

2023-01-17 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2023年1月18日 7:17 > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 03/40] xen/arm: adjust Xen TLB

RE: [PATCH v2 02/40] xen/arm: make ARM_EFI selectable for Arm64

2023-01-17 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2023年1月18日 7:09 > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 02/40] xen/arm: make ARM_

RE: [PATCH v2 07/40] xen/arm64: add .text.idmap for Xen identity map sections

2023-01-17 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2023年1月18日 7:46 > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 07/40] xen/arm64: add .tex

RE: [PATCH v2 08/40] xen/arm: use PA == VA for EARLY_UART_VIRTUAL_ADDRESS on Armv-8R

2023-01-17 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2023年1月18日 7:49 > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Stefano Stabellini > ; Bertrand Marquis ; > Volodymyr Babchuk > Subject: Re: [PATCH v2 08/40] x

RE: [PATCH v2 02/17] xen/arm: implement helpers to get and update NUMA status

2023-01-16 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2023年1月16日 19:15 > To: Wei Chen > Cc: nd ; Stefano Stabellini ; Julien > Grall ; Bertrand Marquis ; > Volodymyr Babchuk ; Andrew Cooper > ; George Dunlap ; Wei > Liu ; Roger Pau Monné ; xen- > de...@

Re: [PATCH v2 03/17] xen/arm: implement node distance helpers for Arm

2023-01-16 Thread Wei Chen
Hi Julien, On 2023/1/12 17:47, Julien Grall wrote: Hi, On 12/01/2023 08:11, Jan Beulich wrote: On 12.01.2023 07:31, Wei Chen wrote: -Original Message- From: Jan Beulich Sent: 2023年1月11日 0:47 On 10.01.2023 09:49, Wei Chen wrote: --- a/xen/arch/arm/include/asm/numa.h +++ b/xen/arch

Re: [PATCH v2 02/17] xen/arm: implement helpers to get and update NUMA status

2023-01-16 Thread Wei Chen
Hi Jan, On 2023/1/12 16:08, Jan Beulich wrote: On 12.01.2023 07:22, Wei Chen wrote: -Original Message- From: Jan Beulich Sent: 2023年1月11日 0:38 On 10.01.2023 09:49, Wei Chen wrote: --- a/xen/arch/arm/include/asm/numa.h +++ b/xen/arch/arm/include/asm/numa.h @@ -22,6 +22,12 @@ typedef

RE: [PATCH v2 03/17] xen/arm: implement node distance helpers for Arm

2023-01-12 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2023年1月12日 16:11 > To: Wei Chen > Cc: nd ; Stefano Stabellini ; Julien > Grall ; Bertrand Marquis ; > Volodymyr Babchuk ; Andrew Cooper > ; George Dunlap ; Wei > Liu ; Roger Pau Monné ; xen- > de...@

RE: [PATCH v2 03/17] xen/arm: implement node distance helpers for Arm

2023-01-11 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2023年1月11日 0:47 > To: Wei Chen > Cc: nd ; Stefano Stabellini ; Julien > Grall ; Bertrand Marquis ; > Volodymyr Babchuk ; Andrew Cooper > ; George Dunlap ; Wei > Liu ; Roger Pau Monné ; xen- > de...@

RE: [PATCH v2 02/17] xen/arm: implement helpers to get and update NUMA status

2023-01-11 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2023年1月11日 0:38 > To: Wei Chen > Cc: nd ; Stefano Stabellini ; Julien > Grall ; Bertrand Marquis ; > Volodymyr Babchuk ; Andrew Cooper > ; George Dunlap ; Wei > Liu ; Roger Pau Monné ; xen- > de...@

RE: [PATCH v2 01/17] xen/arm: use NR_MEM_BANKS to override default NR_NODE_MEMBLKS

2023-01-11 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2023年1月10日 18:00 > To: Wei Chen > Cc: nd ; Stefano Stabellini ; Julien > Grall ; Bertrand Marquis ; > Volodymyr Babchuk ; Andrew Cooper > ; George Dunlap ; Wei > Liu ; xen-devel@lists.xenproject.org >

[PATCH v2 11/17] xen/arm: keep guest still be NUMA unware

2023-01-10 Thread Wei Chen
for these two types of nodes. However, some devices like PCIe may have "numa-node-id" property too. We have to skip them as well. Signed-off-by: Wei Chen Reviewed-by: Stefano Stabellini --- v1 -> v2: 1. Add Rb --- xen/arch/arm/domain_build.c | 6 ++ 1 file changed, 6 insertio

[PATCH v2 09/17] xen/arm: introduce a helper to parse device tree NUMA distance map

2023-01-10 Thread Wei Chen
A NUMA aware device tree will provide a "distance-map" node to describe distance between any two nodes. This patch introduce a new helper to parse this distance map. Signed-off-by: Wei Chen --- v1 -> v2: 1. Get rid of useless braces. 2. Use new NUMA status helper. 3. Use PRIu32 to

[PATCH v2 14/17] xen/arm: use CONFIG_NUMA to gate node_online_map in smpboot

2023-01-10 Thread Wei Chen
node_online_map in smpboot still need for Arm when NUMA is turn off by Kconfig. Signed-off-by: Wei Chen --- v1 -> v2: 1. No change. --- xen/arch/arm/smpboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c index 5ee6ab11e9..3ae359b

[PATCH v2 07/17] xen/arm: introduce a helper to parse device tree processor node

2023-01-10 Thread Wei Chen
processor node, the device tree will be marked as NUMA information invalid. Signed-off-by: Wei Chen --- v1 -> v2: 1. Move numa_disabled from fdt_numa_processor_affinity_init to fdt_parse_numa_cpu_node. 2. Move invalid NUMA id check to fdt_parse_numa_cpu_node. 3. Return ENODATA for normal dtb wi

[PATCH v2 16/17] xen/arm: Provide Kconfig options for Arm to enable NUMA

2023-01-10 Thread Wei Chen
ption for ARM_NUMA to select when HAS_DEVICE_TREE option is enabled. Once when ACPI NUMA for Arm is supported, ACPI_NUMA can be selected here too. Signed-off-by: Wei Chen --- v1 -> v2: 1. Remove the condition of selecting DEVICE_TREE_NUMA. --- xen/arch/arm/Kconfig | 11 +++ 1 file cha

[PATCH v2 13/17] xen/arm: implement numa_node_to_arch_nid for device tree NUMA

2023-01-10 Thread Wei Chen
Device tree based NUMA doesn't have the proximity domain like ACPI. So we can return node id directly as arch nid. Signed-off-by: Wei Chen --- v1 -> v2: 1. Use numa_node_to_arch_nid instead of dummy node_to_pxm. --- xen/arch/arm/include/asm/numa.h | 9 + 1 file changed, 9 in

[PATCH v2 15/17] xen/arm: Set correct per-cpu cpu_core_mask

2023-01-10 Thread Wei Chen
From: Henry Wang In the common sysctl command XEN_SYSCTL_physinfo, the cores_per_socket is calculated based on the cpu_core_mask of CPU0. Currently on Arm this is a fixed value 1 (can be checked via xl info), which is not correct. This is because during the Arm cpu online process, set_cpu_sibling

[PATCH v2 17/17] docs: update numa command line to support Arm

2023-01-10 Thread Wei Chen
Current numa command in documentation is x86 only. Remove x86 from numa command's arch limitation in this patch. Signed-off-by: Wei Chen --- v1 -> v2: 1. Update Arm NUMA status in SUPPORT.md to "Tech Preview". --- SUPPORT.md| 1 + docs/misc/xen-comma

[PATCH v2 12/17] xen/arm: enable device tree based NUMA in system init

2023-01-10 Thread Wei Chen
In this patch, we can start to create NUMA system that is based on device tree. Signed-off-by: Wei Chen --- v1->v2: 1. replace ~0 by INVALID_PADDR. 2. only print error messages for invalid dtb data. 3. remove unnecessary return. 4. remove the parameter of numa_init. --- xen/arch/arm/include/

[PATCH v2 03/17] xen/arm: implement node distance helpers for Arm

2023-01-10 Thread Wei Chen
been changed to unsigned char. Signed-off-by: Wei Chen --- v1 -> v2: 1. Use unsigned int/char instead of uint32_t/u8. 2. Re-org the commit message. --- xen/arch/arm/Makefile | 1 + xen/arch/arm/include/asm/numa.h | 14 + xen/arch/arm/numa.c |

[PATCH v2 10/17] xen/arm: unified entry to parse all NUMA data from device tree

2023-01-10 Thread Wei Chen
scan whole device tree to find CPU NUMA id and distance-map. In this case, we include memory NUMA id parse in this function too. Another benefit is that we have a unique entry for device tree NUMA data parse. Signed-off-by: Wei Chen --- v1->v2: 1. Fix typos in commit message. 2. Fix code style

[PATCH v2 06/17] xen/arm: Add boot and secondary CPU to NUMA system

2023-01-10 Thread Wei Chen
in dt_smp_init_cpus, so we don't need to setup cpu_to_node in numa_detect_cpu_node. Signed-off-by: Wei Chen --- v2 -> v3: 1. Use unsigned int instead of int for cpu id. 2. Use static inline for stub to do type check. v1 -> v2: 1. Use numa_detect_cpu_node to online node. 2. Use macros

[PATCH v2 08/17] xen/arm: introduce a helper to parse device tree memory node

2023-01-10 Thread Wei Chen
Memory blocks' NUMA ID information is stored in device tree's memory nodes as "numa-node-id". We need a new helper to parse and verify this ID from memory nodes. Signed-off-by: Wei Chen --- v1->v2: 1. Move numa_disabled check to fdt_parse_numa_memory_node. 2. Use numa_bad

[PATCH v2 05/17] xen/arm: build NUMA cpu_to_node map in dt_smp_init_cpus

2023-01-10 Thread Wei Chen
CPU NUMA id at the same time for cpu_to_node. Signed-off-by: Wei Chen --- v1 -> v2: 1. Use static inline to replace macros to perform function paramerters type check. 2. Add numa_disabled to gate the numa-node-id check for CONFIG_NUMA on but numa disabled user case. 3. Use macro instead

[PATCH v2 01/17] xen/arm: use NR_MEM_BANKS to override default NR_NODE_MEMBLKS

2023-01-10 Thread Wei Chen
://lists.xenproject.org/archives/html/xen-devel/2021-09/msg02322.html Signed-off-by: Wei Chen --- v1 -> v2: 1. Add code comments to explain using NR_MEM_BANKS for Arm 2. Refine commit messages. --- xen/arch/arm/include/asm/numa.h | 19 ++- xen/include/xen/numa.h |

[PATCH v2 02/17] xen/arm: implement helpers to get and update NUMA status

2023-01-10 Thread Wei Chen
for arch_numa_setup we have not provided boot arguments to setup device_tree_numa. So we just return -EINVAL in this patch. Signed-off-by: Wei Chen --- v1 -> v2: 1. Use arch_numa_disabled to replace numa_enable_with_firmware. 2. Introduce enumerations for device tree numa status. 3. Use com

[PATCH v2 04/17] xen/arm: use arch_get_ram_range to memory ranges from bootinfo

2023-01-10 Thread Wei Chen
Implement the same helper "arch_get_ram_range" as x86 for NUMA code to get memory bank from Arm bootinfo. Signed-off-by: Wei Chen --- v2 -> v3: 1. Use arch_get_ram_range instead of arch_get_memory_map. v1 -> v2: 1. Use arch_get_memory_map to replace arch_get_memory_b

[PATCH v2 00/17] Device tree based NUMA support for Arm - Part#3

2023-01-10 Thread Wei Chen
Henry Wang (1): xen/arm: Set correct per-cpu cpu_core_mask Wei Chen (16): xen/arm: use NR_MEM_BANKS to override default NR_NODE_MEMBLKS xen/arm: implement helpers to get and update NUMA status xen/arm: implement node distance helpers for Arm xen/arm: use arch_get_ram_range to memory ranges

Re: [PATCH 1/2] x86/mm: avoid phys_to_nid() calls for invalid addresses

2022-12-13 Thread Wei Chen
s commit solved. Because just looking at the changes, as your said in RFC, it doesn't completely solve the problem. Cheers, Wei Chen --- a/xen/arch/x86/x86_64/mm.c +++ b/xen/arch/x86/x86_64/mm.c @@ -498,7 +498,7 @@ error: void __init paging_init(void) { unsigned long i, mpt_size

RE: [PATCH v9 3/6] xen/x86: Use ASSERT instead of VIRTUAL_BUG_ON for phys_to_nid

2022-12-13 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年12月13日 17:47 > To: Wei Chen > Cc: nd ; Andrew Cooper ; George > Dunlap ; Julien Grall ; Stefano > Stabellini ; Wei Liu ; Jiamei Xie > ; xen-devel@lists.xenproject.org; Roger Pau Monné > > Subje

Re: [PATCH v6 05/11] xen/arm: define Xen start address for FVP BaseR platform

2022-12-05 Thread Wei Chen
ate. On 2022/11/10 2:24, Julien Grall wrote: On 09/11/2022 04:55, Wei Chen wrote: Hi Julien, Hi Wei, We had considered to use Kconfig to define the start addresses of v8R64 platforms (prompt users to input the address). But we also want to provide a default start address for eac

[PATCH v9 2/6] xen/x86: move generically usable NUMA code from x86 to common

2022-11-18 Thread Wei Chen
. Because some architectures allow to use all 64 physical address bits, but some architectures are not (like Arm64 allows 52, 48 bits). In this case, we use min(PADDR_BITS, BITS_PER_LONG - 1) to calculate the shift when only one node is in the system in this patch too. Signed-off-by: Wei Chen Reviewed-

[PATCH v9 6/6] xen: introduce a Kconfig option to configure NUMA nodes number

2022-11-18 Thread Wei Chen
visible on NUMA enabled architectures. Architectures not supporting NUMA still use 1 for MAX_NUMNODES. As NODES_SHIFT is currently unused, we're taking this opportunity to remove it. Signed-off-by: Wei Chen Acked-by: Jan Beulich --- v8 -> v9: 1. No change. v7 -> v8: 1. No change.

[PATCH v9 5/6] xen/x86: move NUMA process nodes nodes code from x86 to common

2022-11-18 Thread Wei Chen
could support it in the future. As asm/acpi.h has been removed from common/numa.c, we have to move NR_NODE_MEMBLKS from asm/acpi.h to xen/numa.h in this patch as well. Signed-off-by: Wei Chen --- v8 -> v9: 1. Remove incrrect description from commit log. 2. Add code comments for the places

[PATCH v9 4/6] xen/x86: use arch_get_ram_range to get information from E820 map

2022-11-18 Thread Wei Chen
massage seems more common. As arch_get_ram_range use unsigned int for index, we also adjust the index in nodes_cover_memory from int to unsigned int. Signed-off-by: Wei Chen Reviewed-by: Jan Beulich --- v8 -> v9: 1. No change. v7 -> v8: 1. No change. v6 -> v7: 1. No change. v5 -> v6:

[PATCH v9 1/6] xen/x86: Provide helpers for common code to access acpi_numa

2022-11-18 Thread Wei Chen
NUMA implementations. Signed-off-by: Wei Chen Reviewed-by: Jan Beulich --- v8 -> v9: 1. No change. v7 -> v8: 1. No change. v6 -> v7: 1. Add Rb. v5 -> v6: 1. Revert arch_numa_broken to arch_numa_disabled, as acpi_numa can be set to -1 by users. So acpi_numa < 0 does not mean a broken f

[PATCH v9 3/6] xen/x86: Use ASSERT instead of VIRTUAL_BUG_ON for phys_to_nid

2022-11-18 Thread Wei Chen
ind any valid address from a node with 0 bytes memory. Signed-off-by: Wei Chen Tested-by: Jiamei Xie Acked-by: Jan Beulich --- v8 -> v9: 1. No change. v7 -> v8: 1. No change. v6 -> v7: 1. No change. v5 -> v6: 1. No change. v4 -> v5: 1. No change. v3 -> v4: 1. No change. v2 -> v3

[PATCH v9 0/6] Device tree based NUMA support for Arm - Part#2

2022-11-18 Thread Wei Chen
code to common. 16. Export node_to_pxm to keep pxm information in NUMA scan nodes error messages. 17. Change the code style to target file's Xen code-style. 18. Adjust some __init and __initdata for some functions and variables. 19. Replace CONFIG_ACPI_NUMA by CONFIG_NUMA. Replace "

RE: [PATCH v8 5/6] xen/x86: move NUMA process nodes nodes code from x86 to common

2022-11-17 Thread Wei Chen
egions(paddr_t addr) > > acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) > > return; > > > > + numa_fw_nid_name = "PXM"; > > ... this as well. Otherwise someone may spot the redundancy and either > propose to drop one, or it'll take them quite a bit of time to figure > why both are there. I thought this would go without saying, so I'm > sorry for not making this explicit earlier on. ... /* Set "PXM" as earlier as we can for those functions will use it. */ > > + numa_fw_nid_name = "PXM"; Cheers, Wei Chen > > Jan

Re: [PATCH v6 03/11] xen/arm: disable EFI boot services for MPU systems

2022-11-15 Thread Wei Chen
Hi Julien, On 2022/11/7 3:12, Julien Grall wrote: Hi Wei, On 04/11/2022 10:07, Wei Chen wrote: Current EFI boot services support of Arm64 could not work well for Armv8-R64 system that only has MPU in EL2. That is because EFI boot services may need some relocation support or partial PIE/PIC

RE: [PATCH v6 05/11] xen/arm: define Xen start address for FVP BaseR platform

2022-11-14 Thread Wei Chen
" is not an official Arm architecture name. The Arm official name is Armv8-R AArch32/AArch64. And currently, MPU will only be selected by Arm64, so current MPU code can only work in AArch64 state. When you're trying to enable Armv8-R AArch32 like R52, you can remove this limit

RE: [PATCH v8 0/6] Device tree based NUMA support for Arm - Part#2

2022-11-14 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年11月14日 17:29 > To: Wei Chen > Cc: nd ; Andrew Cooper ; Roger Pau > Monné ; Wei Liu ; George Dunlap > ; Julien Grall ; Stefano > Stabellini ; xen-devel@lists.xenproject.org > Subject: Re: [PATCH v8

RE: [PATCH v8 0/6] Device tree based NUMA support for Arm - Part#2

2022-11-14 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年11月14日 16:23 > To: Wei Chen > Cc: nd ; Andrew Cooper ; Roger Pau > Monné ; Wei Liu ; George Dunlap > ; Julien Grall ; Stefano > Stabellini ; xen-devel@lists.xenproject.org > Subject: Re: [PATCH v8

RE: [PATCH v8 0/6] Device tree based NUMA support for Arm - Part#2

2022-11-14 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年11月14日 16:05 > To: Wei Chen > Cc: nd ; Andrew Cooper ; Roger Pau > Monné ; Wei Liu ; George Dunlap > ; Julien Grall ; Stefano > Stabellini ; xen-devel@lists.xenproject.org > Subject: Re: [PATCH v8

[PATCH v8 4/6] xen/x86: use arch_get_ram_range to get information from E820 map

2022-11-13 Thread Wei Chen
massage seems more common. As arch_get_ram_range use unsigned int for index, we also adjust the index in nodes_cover_memory from int to unsigned int. Signed-off-by: Wei Chen Reviewed-by: Jan Beulich --- v7 -> v8: 1. No change. v6 -> v7: 1. No change. v5 -> v6: 1. No change. v4 -> v5:

[PATCH v8 5/6] xen/x86: move NUMA process nodes nodes code from x86 to common

2022-11-13 Thread Wei Chen
n/numa.h in this patch as well. Signed-off-by: Wei Chen --- v7 -> v8: 1. Add numa_fw_nid_name setting in srat_parse_regions after acpi_table_parse succeeded. v6 -> v7: 1. Add __init for arch_numa_unavailable. 2. Use __ro_after_init for mem_hotplug. 3. Use "???" instead o

[PATCH v8 6/6] xen: introduce a Kconfig option to configure NUMA nodes number

2022-11-13 Thread Wei Chen
visible on NUMA enabled architectures. Architectures not supporting NUMA still use 1 for MAX_NUMNODES. As NODES_SHIFT is currently unused, we're taking this opportunity to remove it. Signed-off-by: Wei Chen Acked-by: Jan Beulich --- v7 -> v8: 1. No change. v6 -> v7: 1. No change.

[PATCH v8 2/6] xen/x86: move generically usable NUMA code from x86 to common

2022-11-13 Thread Wei Chen
. Because some architectures allow to use all 64 physical address bits, but some architectures are not (like Arm64 allows 52, 48 bits). In this case, we use min(PADDR_BITS, BITS_PER_LONG - 1) to calculate the shift when only one node is in the system in this patch too. Signed-off-by: Wei Chen Reviewed-

[PATCH v8 3/6] xen/x86: Use ASSERT instead of VIRTUAL_BUG_ON for phys_to_nid

2022-11-13 Thread Wei Chen
ind any valid address from a node with 0 bytes memory. Signed-off-by: Wei Chen Tested-by: Jiamei Xie Acked-by: Jan Beulich --- v7 -> v8: 1. No change. v6 -> v7: 1. No change. v5 -> v6: 1. No change. v4 -> v5: 1. No change. v3 -> v4: 1. No change. v2 -> v3: 1. Remove unnecessary

[PATCH v8 1/6] xen/x86: Provide helpers for common code to access acpi_numa

2022-11-13 Thread Wei Chen
NUMA implementations. Signed-off-by: Wei Chen Reviewed-by: Jan Beulich --- v7 -> v8: 1. No change. v6 -> v7: 1. Add Rb. v5 -> v6: 1. Revert arch_numa_broken to arch_numa_disabled, as acpi_numa can be set to -1 by users. So acpi_numa < 0 does not mean a broken firmware. v4 -> v5: 1.

[PATCH v8 0/6] Device tree based NUMA support for Arm - Part#2

2022-11-13 Thread Wei Chen
or messages. 17. Change the code style to target file's Xen code-style. 18. Adjust some __init and __initdata for some functions and variables. 19. Replace CONFIG_ACPI_NUMA by CONFIG_NUMA. Replace "SRAT" texts. 20. Turn numa_scan_nodes to static. 21. Change NR_NUMA_NODES upper boun

[PATCH v8 0/6] Device tree based NUMA support for Arm - Part#2

2022-11-13 Thread Wei Chen
or messages. 17. Change the code style to target file's Xen code-style. 18. Adjust some __init and __initdata for some functions and variables. 19. Replace CONFIG_ACPI_NUMA by CONFIG_NUMA. Replace "SRAT" texts. 20. Turn numa_scan_nodes to static. 21. Change NR_NUMA_NODES upper boun

RE: [PATCH v6 08/11] xen/arm64: move MMU related code from head.S to head_mmu.S

2022-11-13 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2022年11月14日 5:43 > To: Wei Chen ; xen-devel@lists.xenproject.org > Cc: nd ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk > ; Henry Wang > Subject: Re: [PATCH v6 08/11] xen/arm64: mo

RE: [PATCH v6 00/11] xen/arm: Add Armv8-R64 MPU support to Xen - Part#1

2022-11-11 Thread Wei Chen
Hi Stefano, Julien, > -Original Message- > From: Stefano Stabellini > Sent: 2022年11月11日 6:26 > To: Wei Chen > Cc: Julien Grall ; xen-devel@lists.xenproject.org; nd > ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk > > Subject: RE: [PATCH v6 00

RE: [PATCH v6 05/11] xen/arm: define Xen start address for FVP BaseR platform

2022-11-11 Thread Wei Chen
Hi Stefano, Julien, > -Original Message- > From: Xen-devel On Behalf Of > Stefano Stabellini > Sent: 2022年11月11日 6:13 > To: Julien Grall > Cc: Wei Chen ; xen-devel@lists.xenproject.org; nd > ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk >

RE: [PATCH v6 07/11] xen/arm: implement FIXMAP_ADDR for MPU systems

2022-11-10 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2022年11月10日 2:30 > To: Wei Chen ; xen-devel@lists.xenproject.org > Cc: nd ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk > > Subject: Re: [PATCH v6 07/11] xen/arm: implement FIXMA

RE: [PATCH v7 5/6] xen/x86: move NUMA process nodes nodes code from x86 to common

2022-11-09 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年11月9日 17:30 > To: Wei Chen > Cc: nd ; Andrew Cooper ; Roger Pau > Monné ; Wei Liu ; George Dunlap > ; Julien Grall ; Stefano > Stabellini ; xen-devel@lists.xenproject.org > Subject: Re: [PATCH

RE: [PATCH v7 5/6] xen/x86: move NUMA process nodes nodes code from x86 to common

2022-11-09 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年11月9日 0:55 > To: Wei Chen > Cc: nd ; Andrew Cooper ; Roger Pau > Monné ; Wei Liu ; George Dunlap > ; Julien Grall ; Stefano > Stabellini ; xen-devel@lists.xenproject.org > Subject: Re: [PATCH

RE: [PATCH v6 08/11] xen/arm64: move MMU related code from head.S to head_mmu.S

2022-11-08 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2022年11月7日 4:06 > To: Wei Chen ; xen-devel@lists.xenproject.org > Cc: nd ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk > ; Henry Wang > Subject: Re: [PATCH v6 08/11] xen/arm64: move MMU

RE: [PATCH v6 07/11] xen/arm: implement FIXMAP_ADDR for MPU systems

2022-11-08 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2022年11月7日 3:45 > To: Wei Chen ; xen-devel@lists.xenproject.org > Cc: nd ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk > > Subject: Re: [PATCH v6 07/11] xen/arm: implement FIXMAP_ADDR f

RE: [PATCH v6 05/11] xen/arm: define Xen start address for FVP BaseR platform

2022-11-08 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2022年11月7日 3:20 > To: Wei Chen ; xen-devel@lists.xenproject.org > Cc: nd ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk > ; Jiamei Xie > Subject: Re: [PATCH v6 05/11] xen/arm: define X

RE: [PATCH v6 03/11] xen/arm: disable EFI boot services for MPU systems

2022-11-07 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2022年11月7日 3:12 > To: Wei Chen ; xen-devel@lists.xenproject.org > Cc: nd ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk > > Subject: Re: [PATCH v6 03/11] xen/arm: disable EFI boot se

RE: [PATCH v6 02/11] xen/arm: add iounmap after initrd has been loaded in domain_build

2022-11-07 Thread Wei Chen
> > So I would consider to use ioremap_cache(). That said, this would be a > > separate patch. > > > > Ok, we will try to use ioremap_cache and test it. If everything works > well we will introduce a separate patch in next version. > Or is it better to send a separate pat

RE: [PATCH v6 02/11] xen/arm: add iounmap after initrd has been loaded in domain_build

2022-11-07 Thread Wei Chen
Hi Julien, > -Original Message- > From: Xen-devel On Behalf Of > Julien Grall > Sent: 2022年11月7日 2:55 > To: Wei Chen ; xen-devel@lists.xenproject.org > Cc: nd ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk > ; Henry Wang > Subject: Re: [P

RE: [PATCH v6 00/11] xen/arm: Add Armv8-R64 MPU support to Xen - Part#1

2022-11-07 Thread Wei Chen
Hi Julien, > -Original Message- > From: Julien Grall > Sent: 2022年11月7日 18:16 > To: Wei Chen ; xen-devel@lists.xenproject.org > Cc: nd ; Stefano Stabellini ; Bertrand > Marquis ; Volodymyr Babchuk > > Subject: Re: [PATCH v6 00/11] xen/arm: Add Armv8-R64 MPU s

RE: [PATCH v7 2/6] xen/x86: move generically usable NUMA code from x86 to common

2022-11-07 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年11月3日 22:26 > To: Wei Chen > Cc: nd ; Andrew Cooper ; Roger Pau > Monné ; Wei Liu ; George Dunlap > ; Julien Grall ; Stefano > Stabellini ; xen-devel@lists.xenproject.org > Subject: Re: [

RE: [PATCH v6 00/11] xen/arm: Add Armv8-R64 MPU support to Xen - Part#1

2022-11-07 Thread Wei Chen
eviewed efficiently. Can we send the patches by stages, even the stage#1 will have about 30 patches? Cheers, Wei Chen > Cheers, > > -- > Julien Grall

RE: [PATCH v6 00/11] xen/arm: Add Armv8-R64 MPU support to Xen - Part#1

2022-11-04 Thread Wei Chen
Sorry for the wrong patch version. This is the first version of this series. Cheers, Wei Chen > -Original Message- > From: Wei Chen > Sent: 2022年11月4日 18:08 > To: xen-devel@lists.xenproject.org > Cc: nd ; Wei Chen ; Stefano Stabellini > ; Julien Grall ; Bertrand Mar

[PATCH v6 09/11] xen/arm64: create boot-time MPU protection regions

2022-11-04 Thread Wei Chen
ace create_page_tables for MMU and MPU. Signed-off-by: Wei Chen Signed-off-by: Penny Zheng --- xen/arch/arm/arm64/Makefile | 2 + xen/arch/arm/arm64/head.S| 13 ++-- xen/arch/arm/arm64/head_mmu.S| 4 +- xen/arch/arm/arm64/head_mpu.S|

[PATCH v6 10/11] xen/arm64: introduce helpers for MPU enable/disable

2022-11-04 Thread Wei Chen
.S Signed-off-by: Wei Chen Signed-off-by: Penny Zheng --- xen/arch/arm/arm64/head.S | 5 +++-- xen/arch/arm/arm64/head_mmu.S | 4 ++-- xen/arch/arm/arm64/head_mpu.S | 35 +++ 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/arm64/he

[PATCH v6 11/11] xen/arm64: add setup_fixmap and remove_identity_mapping for MPU

2022-11-04 Thread Wei Chen
ame as MMU system. For remove_identity_mapping, we just need an empty function to make head.S code flow happy. Signed-off-by: Wei Chen Signed-off-by: Penny Zheng --- xen/arch/arm/arm64/head_mpu.S | 49 +++ .../arm/include/asm/platforms/fvp_baser.h | 4 ++ 2 fil

[PATCH v6 08/11] xen/arm64: move MMU related code from head.S to head_mmu.S

2022-11-04 Thread Wei Chen
and "puts" functions out of assembly file, so we have to export them in this patch. And the assembly macros: adr_l and load_paddr will be used by MMU and MPU later, so we move them to macros.h. Signed-off-by: Henry Wang Signed-off-by: Wei Chen --- xen/arch/arm/arm64/Makefile |

[PATCH v6 06/11] xen/arm: split MMU and MPU config files from config.h

2022-11-04 Thread Wei Chen
same definition names for MPU systems, like XEN_VIRT_START and HYPERVISOR_VIRT_START, but the definition contents are MPU specific. Signed-off-by: Wei Chen --- xen/arch/arm/include/asm/config.h | 97 + xen/arch/arm/include/asm/config_mmu.h | 119

[PATCH v6 07/11] xen/arm: implement FIXMAP_ADDR for MPU systems

2022-11-04 Thread Wei Chen
ectly. As pmap depends on FIXAMP, so we disable pmap for Arm with MPU enabled systems. Signed-off-by: Wei Chen --- xen/arch/arm/Kconfig | 2 +- xen/arch/arm/include/asm/config_mpu.h | 2 ++ xen/arch/arm/include/asm/fixmap.h | 25 + 3 files changed, 28

[PATCH v6 04/11] xen/arm: adjust Xen TLB helpers for Armv8-R64 PMSA

2022-11-04 Thread Wei Chen
ac Signed-off-by: Wei Chen --- xen/arch/arm/include/asm/arm64/flushtlb.h | 25 +++ xen/arch/arm/include/asm/flushtlb.h | 22 2 files changed, 47 insertions(+) diff --git a/xen/arch/arm/include/asm/arm64/flushtlb.h b/xen/arch/arm/include/asm/arm64

[PATCH v6 05/11] xen/arm: define Xen start address for FVP BaseR platform

2022-11-04 Thread Wei Chen
Arm64 platforms should not be listed in Armv8-R platform list, so we add !ARM_V8R dependency for these platforms. Signed-off-by: Wei Chen Signed-off-by: Jiamei.Xie --- xen/arch/arm/Kconfig | 11 +++ xen/arch/arm/include/asm/platforms/fvp_baser.h | 14

[PATCH v6 01/11] xen/arm: remove xen_phys_start and xenheap_phys_end from config.h

2022-11-04 Thread Wei Chen
These two variables are stale variables, they only have declarations in config.h, they don't have any definition and no any code is using these two variables. So in this patch, we remove them from config.h. Signed-off-by: Wei Chen --- xen/arch/arm/include/asm/config.h | 2 -- 1 file chang

[PATCH v6 03/11] xen/arm: disable EFI boot services for MPU systems

2022-11-04 Thread Wei Chen
this patch, we disable EFI boot services support for Arm MPU systems. Signed-off-by: Wei Chen --- xen/arch/arm/Kconfig | 2 +- xen/arch/arm/arm64/head.S | 8 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig index 1fe5faf847

[PATCH v6 00/11] xen/arm: Add Armv8-R64 MPU support to Xen - Part#1

2022-11-04 Thread Wei Chen
Penny Zheng (3): xen/arm64: create boot-time MPU protection regions xen/arm64: introduce helpers for MPU enable/disable xen/arm64: add setup_fixmap and remove_identity_mapping for MPU Wei Chen (8): xen/arm: remove xen_phys_start and xenheap_phys_end from config.h xen/arm: add iounmap af

[PATCH v6 02/11] xen/arm: add iounmap after initrd has been loaded in domain_build

2022-11-04 Thread Wei Chen
. Signed-off-by: Wei Chen --- xen/arch/arm/domain_build.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 4fb5c20b13..bd30d3798c 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -3418,6 +3418,8

[PATCH v7 6/6] xen: introduce a Kconfig option to configure NUMA nodes number

2022-10-19 Thread Wei Chen
visible on NUMA enabled architectures. Architectures not supporting NUMA still use 1 for MAX_NUMNODES. As NODES_SHIFT is currently unused, we're taking this opportunity to remove it. Signed-off-by: Wei Chen Acked-by: Jan Beulich --- v6 -> v7: 1. No change. v5 -> v6: 1. No change.

[PATCH v7 2/6] xen/x86: move generically usable NUMA code from x86 to common

2022-10-19 Thread Wei Chen
. Because some architectures allow to use all 64 physical address bits, but some architectures are not (like Arm64 allows 52, 48 bits). In this case, we use min(PADDR_BITS, BITS_PER_LONG - 1) to calculate the shift when only one node is in the system in this patch too. Signed-off-by: Wei Chen --- v6 -&g

[PATCH v7 5/6] xen/x86: move NUMA process nodes nodes code from x86 to common

2022-10-19 Thread Wei Chen
n/numa.h in this patch as well. Signed-off-by: Wei Chen --- v6 -> v7: 1. Add __init for arch_numa_unavailable. 2. Use __ro_after_init for mem_hotplug. 3. Use "???" instead of "NONAME" for unset numa_fw_nid_name. 4. Fix code-style. v5 -> v6: 1. Fix code-style. 2. Use

[PATCH v7 1/6] xen/x86: Provide helpers for common code to access acpi_numa

2022-10-19 Thread Wei Chen
NUMA implementations. Signed-off-by: Wei Chen Reviewed-by: Jan Beulich --- v6 -> v7: 1. Add Rb. v5 -> v6: 1. Revert arch_numa_broken to arch_numa_disabled, as acpi_numa can be set to -1 by users. So acpi_numa < 0 does not mean a broken firmware. v4 -> v5: 1. Use arch_numa_

[PATCH v7 4/6] xen/x86: use arch_get_ram_range to get information from E820 map

2022-10-19 Thread Wei Chen
massage seems more common. As arch_get_ram_range use unsigned int for index, we also adjust the index in nodes_cover_memory from int to unsigned int. Signed-off-by: Wei Chen Reviewed-by: Jan Beulich --- v6 -> v7: 1. No change. v5 -> v6: 1. No change. v4 -> v5: 1. Add Rb. 2. Adjust the code

[PATCH v7 3/6] xen/x86: Use ASSERT instead of VIRTUAL_BUG_ON for phys_to_nid

2022-10-19 Thread Wei Chen
ind any valid address from a node with 0 bytes memory. Signed-off-by: Wei Chen Tested-by: Jiamei Xie Acked-by: Jan Beulich --- v6 -> v7: 1. No change. v5 -> v6: 1. No change. v4 -> v5: 1. No change. v3 -> v4: 1. No change. v2 -> v3: 1. Remove unnecessary change items in histo

[PATCH v7 0/6] Device tree based NUMA support for Arm - Part#2

2022-10-19 Thread Wei Chen
Export node_to_pxm to keep pxm information in NUMA scan nodes error messages. 17. Change the code style to target file's Xen code-style. 18. Adjust some __init and __initdata for some functions and variables. 19. Replace CONFIG_ACPI_NUMA by CONFIG_NUMA. Replace "SRAT" texts. 20.

RE: [PATCH v6 2/6] xen/x86: move generically usable NUMA code from x86 to common

2022-10-18 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年10月19日 14:46 > To: Wei Chen > Cc: nd ; Andrew Cooper ; Roger Pau > Monné ; Wei Liu ; George Dunlap > ; Julien Grall ; Stefano > Stabellini ; xen-devel@lists.xenproject.org > Subject: Re: [

RE: [PATCH v6 5/6] xen/x86: move NUMA process nodes nodes code from x86 to common

2022-10-18 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年10月18日 22:08 > To: Wei Chen > Cc: nd ; Andrew Cooper ; Roger Pau > Monné ; Wei Liu ; George Dunlap > ; Julien Grall ; Stefano > Stabellini ; xen-devel@lists.xenproject.org > Subject: Re: [PATCH

  1   2   3   4   5   6   >