Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-11-16 Thread Leo Yan
On Thu, Nov 16, 2023 at 02:21:18PM +, Julien Grall wrote: [...] > I have done the changes and directly committed the series. So no need to > respin. Thanks a lot, Julien! Leo

Re: [PATCH v4] xen/arm: Skip memory nodes if not enabled

2023-11-06 Thread Leo Yan
Hi Julien, On Mon, Nov 06, 2023 at 09:52:45AM +, Julien Grall wrote: [...] > > Gentle ping. > > > > I don't see this patch is landed in Xen master or staging branch, should > > anything I need to follow up? > > The tree has been frozen for the past few weeks for any patches that are not >

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-11-06 Thread Leo Yan
Hi Julien, On Mon, Nov 06, 2023 at 09:39:24AM +, Julien Grall wrote: [...] > > I would like to check if here is anything specific I should follow up > > on. Based on the discussion in this thread, I've come to the following > > conclusions: > > > > - Remove the fixes tags; > > - Add a

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-11-05 Thread Leo Yan
Hi all, On Wed, Oct 18, 2023 at 07:11:11PM +0100, Julien Grall wrote: [...] > > Anyway, both Bertrand and you seems to be against the Fixes tag here. So > > I can compromise with the "This commit fixes...". However, can Bertrand > > or you update process/send-patches.pandoc so it is clear for a

Re: [PATCH v4] xen/arm: Skip memory nodes if not enabled

2023-11-05 Thread Leo Yan
Hi maintainers, On Fri, Oct 13, 2023 at 08:04:42PM +0800, Leo Yan wrote: > Currently, Xen doesn't check the status property of memory/reserved > memory nodes, which may lead to the following issues: > > - If a memory node has a status "disabled" it implies that it shoul

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-19 Thread Leo Yan
Hi Julien, On Wed, Oct 18, 2023 at 07:11:11PM +0100, Julien Grall wrote: > On 18/10/2023 11:59, Julien Grall wrote: > > On 17/10/2023 20:58, Stefano Stabellini wrote: [...] > > I don't really see the problem for someone to mistakenly backport this > > patch. In fact, this could potentially save

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Leo Yan
could help to remove it when pick up this patch set. And thanks for review, Michal and Bertrand. Leo > > Reported-by: Alexey Klimov > > Signed-off-by: Leo Yan > > Reviewed-by: Bertrand Marquis > > Cheers > Bertrand

[PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-13 Thread Leo Yan
module loading within the range of [0x0 .. 0x09ff__]. Fixes: 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable") Reported-by: Alexey Klimov Signed-off-by: Leo Yan --- xen/arch/arm/arm64/mm.c | 6 -- xen/arch/arm/include/asm/mmu/la

[PATCH v4 0/2] xen/arm: Enlarge identity map space

2023-10-13 Thread Leo Yan
xey Klimov tested tag for patch 01 (Alexey). - Corrected the printing log with dynamically calculation ID map size. Leo Yan (2): xen/arm: Add macro XEN_VM_MAPPING xen/arm: Enlarge identity map space to 10TB xen/arch/arm/arm64/mm.c | 6 -- xen/arch/arm/include/asm/mmu/lay

[PATCH v4 1/2] xen/arm: Add macro XEN_VM_MAPPING

2023-10-13 Thread Leo Yan
Grall Signed-off-by: Leo Yan --- xen/arch/arm/include/asm/mmu/layout.h | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/include/asm/mmu/layout.h b/xen/arch/arm/include/asm/mmu/layout.h index da6be276ac..2cb2382fbf 100644 --- a/xen/arch/arm/include/asm

[PATCH v4] xen/arm: Skip memory nodes if not enabled

2023-10-13 Thread Leo Yan
checking device node's status in the device_tree_get_meminfo() function, except it checks for memory nodes and reserved memory nodes, it also supports status for static memory and static heap. Suggested-by: Michal Orzel Signed-off-by: Leo Yan Reviewed-by: Michal Orzel --- Changes from v3: - Refined the commit log

Re: [PATCH v3] xen/arm: Skip memory nodes if not enabled

2023-10-13 Thread Leo Yan
Hi Michal, On Fri, Oct 13, 2023 at 01:00:12PM +0200, Michal Orzel wrote: > Hi Leo, > > On 13/10/2023 12:29, Leo Yan wrote: > > > > > > Currently, the Xen hypervisor doesn't handle the status, the issue can > > be described from two perspectives: the memory

Re: [PATCH v2] xen/arm: Skip memory nodes if not enabled

2023-10-13 Thread Leo Yan
Hi Michal, On Fri, Sep 29, 2023 at 10:11:19AM +0200, Michal Orzel wrote: [...] > > +static bool __init device_tree_node_is_available(const void *fdt, int node) > > +{ > > +const char *status = fdt_getprop(fdt, node, "status", NULL); > Please see Julien's comment for v1. To save some

[PATCH v3] xen/arm: Skip memory nodes if not enabled

2023-10-13 Thread Leo Yan
his patch adds checking device node's status in the device_tree_get_meminfo() function, except it checks for memory nodes and reserved memory nodes, it also supports status for static memory and static heap. Suggested-by: Michal Orzel Signed-off-by: Leo Yan --- Changes from v2: - Added checking for

Re: [PATCH] xen/arm: Skip memory nodes if not enabled

2023-09-28 Thread Leo Yan
Hi Michal, Julien, On Wed, Sep 27, 2023 at 02:49:23PM +0200, Michal Orzel wrote: [...] > Either way is fine. The advantage of placing the check in boot_fdt_info() is > that we can have a single check instead of duplicated and we do the check > before > the "first" use which happens to be the

[PATCH v2] xen/arm: Skip memory nodes if not enabled

2023-09-28 Thread Leo Yan
his patch adds checking device node's status in the device_tree_get_meminfo() function, except it checks for memory nodes and reserved memory nodes, it also supports status for static memory and static heap. Suggested-by: Michal Orzel Signed-off-by: Leo Yan --- Changes from v1: - Renamed function to

Re: [PATCH] xen/arm: Skip memory nodes if not enabled

2023-09-26 Thread Leo Yan
Hi Luca, On Tue, Sep 26, 2023 at 10:10:57AM +, Luca Fancellu wrote: [...] > >> I might be wrong, but reading the specifications seems that “status” is > >> not a property > >> of the child nodes of /reserved-memory, so I’m not sure Xen should do > >> something about it. > > > > Please

Re: [PATCH] xen/arm: Skip memory nodes if not enabled

2023-09-26 Thread Leo Yan
anks a lot for good summary! In theory, a good practice should use two separate patches to fix two issues respectively. Given we can use simple change to fix these two issues in one patch, I will amend the patch's commit log with your summary for better recording these issues. > > Signed-off-by:

Re: RFC: arm64: Handling reserved memory nodes

2023-09-26 Thread Leo Yan
Hi Julien, On Wed, Sep 20, 2023 at 11:36:24AM +0100, Julien Grall wrote: [...] > > Host dt: > > memory@4000 { > > reg = <0x00 0x4000 0x01 0x00>; > > device_type = "memory"; > > }; > > > > reserved-memory { > > #size-cells = <0x02>; > > #address-cells = <0x02>; > >

[PATCH] xen/arm: Skip memory nodes if not enabled

2023-09-25 Thread Leo Yan
memory nodes from the memory lists sent to the kernel and the kernel cannot use the disabled memory nodes any longer. Signed-off-by: Leo Yan --- xen/arch/arm/bootfdt.c | 16 1 file changed, 16 insertions(+) diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c index 2673

Re: RFC: arm64: Handling reserved memory nodes

2023-09-20 Thread Leo Yan
On Wed, Sep 20, 2023 at 11:36:24AM +0100, Julien Grall wrote: [...] > Can you confirm the version of Xen you are using? For this question, I use a very new Xen repo with staging branch which I git pulled at last week. Thanks, Leo

Re: RFC: arm64: Handling reserved memory nodes

2023-09-20 Thread Leo Yan
On Wed, Sep 20, 2023 at 11:36:24AM +0100, Julien Grall wrote: [...] > > > Could you confirm the Xen does write reserved memory nodes? Or Xen > > > converts the reserved memory nodes to normal memory nodes as I > > > describe above :) > > > > Xen passes the /reserved-memory node unchanged from

Re: RFC: arm64: Handling reserved memory nodes

2023-09-20 Thread Leo Yan
Hi Julien, On Mon, Sep 18, 2023 at 08:26:21PM +0100, Julien Grall wrote: [...] > ... from my understanding reserved-memory are just normal memory that are > set aside for a specific purpose. So Xen has to create a 'memory' node *and* > a 'reserved-memory' region. To be clear, Xen passes the

Re: RFC: arm64: Handling reserved memory nodes

2023-09-16 Thread Leo Yan
Hi Julien, On Thu, Sep 14, 2023 at 10:37:05AM +0100, Julien Grall wrote: [...] > > This error is caused by kernel using an invalid memory frame number > > 0x1a02dc, we can convert it to the address: > > > >0x1a02dc << PAGE_SHIFT = 0x1_a02d_c000 > > This error is coming from

RFC: arm64: Handling reserved memory nodes

2023-09-14 Thread Leo Yan
Hi all, I'd like to discuss for how to handle the reserved memory nodes in DT binding on Xen / Arm64. Note, now I am using DTB when boot Xen but not UEFI/ACPI (ACPI is disabled in this case). ## Failure I ported Xen on a platform, after the kernel booting, the Xen hypervisor reports error:

[PATCH v3 2/2] xen/arm: Enlarge identity map space to 127TB

2023-09-13 Thread Leo Yan
(refer to pfn_pdx_hole_setup() for Xen removing the biggest gap from memory regions). Thus, 2TB of memory support remains sufficient for most use cases. Fixes: 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable") Reported-by: Alexey Klimov Signed-off-by: Leo Yan ---

[PATCH v3 1/2] xen/arm: Add macro XEN_VM_MAPPING

2023-09-13 Thread Leo Yan
Xen maps the virtual memory space starting from L0 slot 4, so it's open coded for macros with the offset '4'. For more readable, add a new macro XEN_VM_MAPPING which defines the start slot for Xen virtual memory mapping, and all virtual memory regions are defined based on it. Signed-off-by: Leo

[PATCH v3 0/2] xen/arm: Enlarge identity map space

2023-09-13 Thread Leo Yan
ding style (Julien Grall). - Added platform's detail in the patch 02 commit log (Julien Grall). Changes from v1: - Rebased on staging branch (Bertrand); - Added Alexey Klimov tested tag for patch 01 (Alexey). - Corrected the printing log with dynamically calculation ID map size. Leo Yan (2): xen/arm:

Re: [PATCH RESEND v2 2/2] xen/arm: Enlarge identity map space to 127TiB

2023-09-11 Thread Leo Yan
Hi Henry, On Tue, Sep 12, 2023 at 03:01:30AM +, Henry Wang wrote: [...] > At Arm we also test Xen on AVA in our CI, but our setup is based on Yocto > meta-adlink-ampere layer [1]. Thanks for sharing the info. Yes, we (Linaro) also work with Yocto based on EWAOL [1] or TRS [2]. > >> Also,

Re: [PATCH RESEND v2 2/2] xen/arm: Enlarge identity map space to 127TiB

2023-09-11 Thread Leo Yan
Hi Julien, On Mon, Sep 11, 2023 at 04:13:27PM +0100, Julien Grall wrote: > Hi Leo, > > I know you said you will respin the series. I'd like to leave some comments > to avoid having another round afterwards. Thanks! > On 09/09/2023 09:34, Leo Yan wrote: > > On some platform

Re: [PATCH RESEND v2 0/2] xen/arm: Enlarge identity map space

2023-09-09 Thread Leo Yan
On Sat, Sep 09, 2023 at 04:34:08PM +0800, Leo Yan wrote: > The latest Xen fails to boot on ADLink AVA platform. Alexey Klimov root > caused the issue is related with the commit 1c78d76b67 ("xen/arm64: mm: > Introduce helpers to prepare/enable/disable"). > > This is becau

[PATCH RESEND v2 2/2] xen/arm: Enlarge identity map space to 127TiB

2023-09-09 Thread Leo Yan
macros, it enlarges identity map space to 127TiB, which can support the memory space [0x0 .. 0x7eff__] so has flexibility for various platforms. Fixes: 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable") Reported-by: Alexey Klimov Signed-off-by: Leo Yan ---

[PATCH RESEND v2 1/2] xen/arm: Add macro XEN_VM_MAPPING

2023-09-09 Thread Leo Yan
Xen maps the virtual memory space starting from L0 slot 4, so it's open coded for macros with the offset '4'. For more readable, add a new macro XEN_VM_MAPPING which defines the start slot for Xen virtual memory mapping, and all virtual memory regions are defined based on it. Signed-off-by: Leo

[PATCH RESEND v2 0/2] xen/arm: Enlarge identity map space

2023-09-09 Thread Leo Yan
his series is to enlarge identity map space to 127 TiB and tested on Telechips Dolphin5 platform. Changes from v1: - Rebased on staging branch (Bertrand); - Added Alexey Klimov tested tag for patch 01 (Alexey). - Corrected the printing log with dynamically calculation ID map size. Leo Yan (2): xe

[PATCH v2 1/2] xen/arm: Add macro XEN_VM_MAPPING

2023-09-09 Thread Leo Yan
Xen maps the virtual memory space starting from L0 slot 4, so it's open coded for macros with the offset '4'. For more readable, add a new macro XEN_VM_MAPPING which defines the start slot for Xen virtual memory mapping, and all virtual memory regions are defined based on it. Signed-off-by: Leo

[PATCH v2 0/2] xen/arm: Enlarge identity map space

2023-09-09 Thread Leo Yan
his series is to enlarge identity map space to 127 TiB and tested on Telechips Dolphin5 platform. Changes from v1: - Rebased on staging branch (Bertrand); - Added Alexey Klimov tested tag for patch 01 (Alexey). - Corrected the printing log with dynamically calculation ID map size. Leo Yan (2): xe

[PATCH v2 2/2] xen/arm: Enlarge identity map space to 127TiB

2023-09-09 Thread Leo Yan
macros, it enlarges identity map space to 127TiB, which can support the memory space [0x0 .. 0x7eff__] so has flexibility for various platforms. Fixes: 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable") Reported-by: Alexey Klimov Signed-off-by: Leo Yan ---

Re: [PATCH v1 2/2] xen/arm: Enlarge identity map space to 127TiB

2023-09-04 Thread Leo Yan
Hi Bertrand, On Mon, Sep 04, 2023 at 01:55:12PM +, Bertrand Marquis wrote: > Hi Leo, > > > On 31 Aug 2023, at 13:01, Leo Yan wrote: > > > > On some platforms, the memory regions could be: > > > > (XEN) MODULE[0]: 0807f6df -

[PATCH v1 2/2] xen/arm: Enlarge identity map space to 127TiB

2023-08-31 Thread Leo Yan
: 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable") Reported-by: Alexey Klimov Signed-off-by: Leo Yan --- xen/arch/arm/include/asm/config.h | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/include/asm/config.h b/xen/arch/a

[PATCH v1 0/2] xen/arm: Enlarge identity map space

2023-08-31 Thread Leo Yan
o the high memory address and caused booting failure. Leo Yan (2): xen/arm: Add macro XEN_VM_MAPPING xen/arm: Enlarge identity map space to 127TiB xen/arch/arm/include/asm/config.h | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) -- 2.39.2

[PATCH v1 1/2] xen/arm: Add macro XEN_VM_MAPPING

2023-08-31 Thread Leo Yan
Xen maps the virtual memory space starting from L0 slot 4, so it's open coded for macros with the offset '4'. For more readable, add a new macro XEN_VM_MAPPING which defines the start slot for Xen virtual memory mapping, and all virtual memory regions are defined based on it. Signed-off-by: Leo

Re: [PATCH v1] tools/hotplug: systemd: Make dependency on Xen device nodes

2023-08-25 Thread Leo Yan
On Fri, Aug 25, 2023 at 09:37:58AM +0200, Erik Schilling wrote: [...] > > > > diff --git a/tools/hotplug/Linux/systemd/xenstored.service.in > > > > b/tools/hotplug/Linux/systemd/xenstored.service.in > > > > index 261077dc92..6e48cdb0e7 100644 > > > > ---

Re: [PATCH v1] tools/hotplug: systemd: Make dependency on Xen device nodes

2023-08-25 Thread Leo Yan
On Fri, Aug 25, 2023 at 07:02:33AM +0200, Erik Schilling wrote: > On Fri Aug 25, 2023 at 5:36 AM CEST, Leo Yan wrote: > > When system booting up, the kernel module xen_gntdev.ko is loaded and > > the device node '/dev/xen/gntdev' is created; later the xenstored > > servic

[PATCH v1] tools/hotplug: systemd: Make dependency on Xen device nodes

2023-08-24 Thread Leo Yan
and systemd for the device node. There have an extra change in the udev rules for tagging 'systemd' for Xen device nodes, which notifies device node creating to systemd; besides udev change, this patch adds dependency in systemd service for waiting the device node. Signed-off-by: Leo Yan

[PATCH] docs: Correct name for xen-command-line.pandoc

2023-07-24 Thread Leo Yan
en-command-line.pandoc. Fixes: d661611d08 ("docs/markdown: Switch to using pandoc, and fix underscore escaping") Signed-off-by: Leo Yan --- docs/features/sched_credit2.pandoc | 2 +- docs/misc/arm/big.LITTLE.txt | 2 +- xen/common/Kconfig | 2 +- 3 files changed, 3 insertio

Re: Issue: Networking performance in Xen VM on Arm64

2022-10-28 Thread Leo Yan
On Fri, Oct 28, 2022 at 05:54:05PM +0800, Leo Yan wrote: [...] > If map to the code, I think the function xennet_start_xmit() in Xen > frontend driver is critical for the sending interval in domU. I can > see several things cost time when sending a packet: > > - Xen fronte

Re: Issue: Networking performance in Xen VM on Arm64

2022-10-28 Thread Leo Yan
Hi Stefano, On Tue, Oct 25, 2022 at 04:58:16PM -0700, Stefano Stabellini wrote: > On Mon, 24 Oct 2022, Leo Yan wrote: > > > If you are really running with the NULL scheduler, then I would > > > investigate why the vCPU has is_running == 0 because it should not > >

Re: Issue: Networking performance in Xen VM on Arm64

2022-10-24 Thread Leo Yan
On Fri, Oct 21, 2022 at 02:14:04PM -0700, Stefano Stabellini wrote: [...] > > > # domU side > > > xen/arch/arm/vgic-v2.c:vgic_v2_to_sgi > > > xen/arch/arm/vgic.c:vgic_to_sgi > > > xen/arch/arm/vgic.c:vgic_inject_irq > > > xen/arch/arm/vgic.c:vcpu_kick > > > xen/arch/arm/gic-v2.c:gicv2_send_SGI >

Re: Issue: Networking performance in Xen VM on Arm64

2022-10-21 Thread Leo Yan
Hi Stefano and all, On Mon, Oct 17, 2022 at 04:50:05PM -0700, Stefano Stabellini wrote: [...] > > We can see DomU sends notification with timestamp (raw counter) is > > 4989078592 and Dom0 receives the interrupt with timestamp 4989092169. > > Since Dom0 and DomU use the same time counter and

Re: Issue: Networking performance in Xen VM on Arm64

2022-10-18 Thread Leo Yan
On Mon, Oct 17, 2022 at 04:50:05PM -0700, Stefano Stabellini wrote: [...] > > Which means it takes 543us to let Dom0 to receive the notification. > > You could see DomU runs in CPU3 and Dom0 runs on CPU13, there should > > not have contention for CPU resources. Seems to me, it's likely Xen > >

Re: Issue: Networking performance in Xen VM on Arm64

2022-10-17 Thread Leo Yan
Hi Stefano, Sorry for late response. Please see below comments. On Tue, Oct 11, 2022 at 02:47:00PM -0700, Stefano Stabellini wrote: > On Tue, 11 Oct 2022, Leo Yan wrote: > > > > The second question is how to mitigate the long latency when send data > > > > from

Re: Issue: Networking performance in Xen VM on Arm64

2022-10-11 Thread Leo Yan
Hi Stefano, On Mon, Oct 10, 2022 at 04:50:46PM -0700, Stefano Stabellini wrote: > +Xen/Linux maintainers Thanks for reviewing. [...] > > Throughput result: > > > > Profile netperf (Mbits/sec)ddsperf (Mbits/sec) > > Xen-Dom0939.41 > 620 > > Xen-DomU

Issue: Networking performance in Xen VM on Arm64

2022-10-10 Thread Leo Yan
Hi there, I tested the networking performance on my Arm64 platform in Xen virtual machine, below I will try to give out summary for testing result and share some analysis, at the end I want to check a bit from the community and get suggestion before I can proceed. First of all, if you want to

Re: [PATCH] xen: Add macro for version number string

2022-09-07 Thread Leo Yan
On Wed, Sep 07, 2022 at 02:34:25PM +0200, Jan Beulich wrote: > On 07.09.2022 14:20, Bertrand Marquis wrote: > > Hi Leo, > > > > Thanks a lot for the quick handling here. > > > >> On 7 Sep 2022, at 13:04, Leo Yan wrote: > >> > >> O

[PATCH v2] xen: Add macro for version number string

2022-09-07 Thread Leo Yan
9b3 ("xen/arm: split domain_build.c") Suggested-by: Bertrand Marquis Signed-off-by: Leo Yan Reviewed-by: Bertrand Marquis Reviewed-by: Jan Beulich --- Changes from v1: Added blanks around XEN_VERSION_STRING (Jan); Added Bertrand's and Jan's reviewed tags. xen/arch/arm/acpi/domain_build.c | 3 ++

Re: [PATCH] xen: Add macro for version number string

2022-09-07 Thread Leo Yan
On Wed, Sep 07, 2022 at 02:31:52PM +0200, Jan Beulich wrote: > On 07.09.2022 14:28, Leo Yan wrote: > > A question, since commit 5d797ee199b3 was merged in 4.11.0-rc6, for > > fixing it, should I explictly add backport tag as below? > > > > Backport: 4.11+ > >

Re: [PATCH] xen: Add macro for version number string

2022-09-07 Thread Leo Yan
Hi Jan, On Wed, Sep 07, 2022 at 02:12:25PM +0200, Jan Beulich wrote: > On 07.09.2022 14:04, Leo Yan wrote: > > On Arm64 Linux kernel prints log for Xen version number: > > > > Xen XEN_VERSION.XEN_SUBVERSION support found > > > > The header file "xen/co

[PATCH] xen: Add macro for version number string

2022-09-07 Thread Leo Yan
9b3 ("xen/arm: split domain_build.c") Suggested-by: Bertrand Marquis Signed-off-by: Leo Yan --- xen/arch/arm/acpi/domain_build.c | 3 ++- xen/arch/arm/domain_build.c | 2 +- xen/common/efi/boot.c| 4 ++-- xen/include/xen/compile.h.in | 1 + 4 files changed, 6 insertions(+), 4

Re: [PATCH] xen/arm: acpi: Include header file for version number

2022-09-07 Thread Leo Yan
On Wed, Sep 07, 2022 at 11:12:24AM +, Bertrand Marquis wrote: [...] > > Just remind, We need to define XEN_VERSION_STRING in compile.h.in rather > > than in compile.h, something like: > > > > #define XEN_VERSION_STRING @@version@@.@@subversion@@ > > Very true but you will need the quotes

Re: [PATCH] xen/arm: acpi: Include header file for version number

2022-09-07 Thread Leo Yan
On Wed, Sep 07, 2022 at 10:05:54AM +, Bertrand Marquis wrote: [...] > I think a define in compile.h using stringify is the easiest solution: > >>> > >>> Ah! I thought you were suggesting to tweak __stringify. This is ... > >> > >> Also possible but a bit more tricky > >> >

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-09-06 Thread Leo Yan
On Tue, Sep 06, 2022 at 08:53:02AM +0100, Marc Zyngier wrote: [...] > > Okay, I think have two questions for you: > > > > - The first question is if we really need to reserve persistent memory > > for RD pending table and configuration table when Linux kernel runs > > in Xen domain? > > I

Re: [PATCH] xen/arm: acpi: Include header file for version number

2022-09-06 Thread Leo Yan
On Tue, Sep 06, 2022 at 01:09:28PM +, Bertrand Marquis wrote: > Hi Leo, > > > On 6 Sep 2022, at 12:31, Leo Yan wrote: > > > > On Arm64 Linux kernel prints log for Xen version number: > > > > [0.00] Xen XEN_VERSION.XEN_SUBVERSION support found &

[PATCH] xen/arm: acpi: Include header file for version number

2022-09-06 Thread Leo Yan
and "XEN_SUBVERSION" in the compatible string. This patch includes the header "xen/compile.h" which defines macros for XEN_VERSION and XEN_SUBVERSION, thus Xen can pass the version number via hypervisor node. Signed-off-by: Leo Yan --- xen/arch/arm/acpi/domain_build.c | 1 + 1

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-09-06 Thread Leo Yan
On Tue, Sep 06, 2022 at 03:27:47PM +0800, Leo Yan wrote: > On Tue, Sep 06, 2022 at 09:22:00AM +0200, Ard Biesheuvel wrote: > > [...] > > > > IIUC, you consider the general flow from architecture view, so you prefer > > > to ask Xen to implement EFI stub to c

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-09-06 Thread Leo Yan
On Tue, Sep 06, 2022 at 09:22:00AM +0200, Ard Biesheuvel wrote: [...] > > IIUC, you consider the general flow from architecture view, so you prefer > > to ask Xen to implement EFI stub to comply the general flow for EFI > > booting sequence, right? > > > > If the conclusion is to change Xen for

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-09-06 Thread Leo Yan
Hi Marc, On Tue, Sep 06, 2022 at 07:27:17AM +0100, Marc Zyngier wrote: > On Tue, 06 Sep 2022 03:52:37 +0100, > Leo Yan wrote: > > > > On Thu, Aug 25, 2022 at 10:40:41PM +0800, Leo Yan wrote: > > > > [...] > > > > > > > But here I still ca

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-09-05 Thread Leo Yan
On Thu, Aug 25, 2022 at 10:40:41PM +0800, Leo Yan wrote: [...] > > > But here I still cannot create the concept that how GIC RD tables play > > > roles to support the para virtualization or passthrough mode. > > > > I am not sure what you are actually askin

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-08-25 Thread Leo Yan
Hi Julien, On Thu, Aug 25, 2022 at 01:59:06PM +0100, Julien Grall wrote: [...] > > Seems to me, to support para virtualization driver model (like virtio), > > Dom0 needs to provide the device driver backend, and DomUs enables > > the forend device drivers. In this case, the most hardware

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-08-25 Thread Leo Yan
On Thu, Aug 25, 2022 at 10:07:18AM +0100, Julien Grall wrote: [...] > > Xen directly passes ACPI MADT table from UEFI to Linux kernel to Dom0, > > (see functions acpi_create_madt() and gic_make_hwdom_madt()), which > > means the Linux kernel Dom0 uses the same ACPI table to initialize GICv3 > >

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-08-25 Thread Leo Yan
Hi Julien, On Thu, Aug 25, 2022 at 10:07:18AM +0100, Julien Grall wrote: [...] > > In other words, let's assume the Dom0 kernel panic and its secondary > > kernel is launched by kexec, is it necessarily for the secondary > > kernel to reuse the primary kernel's RD pending page? > > No. If the

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-08-25 Thread Leo Yan
On Fri, Aug 19, 2022 at 01:10:10PM +0100, Marc Zyngier wrote: [...] > > > > In the context of Xen, dom0 doesn't have direct access to the host ITS > > > > because we are emulating it. So I think it doesn't matter for us > > > > because we > > > > can fix our implementation if it is affected. >

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-08-18 Thread Leo Yan
On Thu, Aug 18, 2022 at 11:04:48AM +0100, Julien Grall wrote: [...] > > > Seems it's broken for kdump/kexec if kernel boots with using DT? > > > > > > > EFI supports both DT and ACPI boot, but only ACPI *requires* EFI. > > > > So DT boot on hardware with affected GICv3 implementations works

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-08-18 Thread Leo Yan
Hi Ard, On Wed, Aug 17, 2022 at 03:49:32PM +0200, Ard Biesheuvel wrote: [...] > > This header holds ACPI spec defined data structures. This one looks > > to be a Linux one, and hence shouldn't be defined here. You use it > > in a single CU only, so I see no reason to define it there. > > > >

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-08-18 Thread Leo Yan
Hi Jan, On Thu, Aug 18, 2022 at 09:47:46AM +0200, Jan Beulich wrote: > On 18.08.2022 09:34, Leo Yan wrote: > > On Wed, Aug 17, 2022 at 03:17:53PM +0200, Jan Beulich wrote: > >> Furthermore - what if Linux decided to change their structure? Or > >> is there a guarantee

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-08-18 Thread Leo Yan
Hi Julien, On Thu, Aug 18, 2022 at 08:57:20AM +0100, Julien Grall wrote: > Hi Leo, > > On 18/08/2022 08:34, Leo Yan wrote: > > On Wed, Aug 17, 2022 at 03:17:53PM +0200, Jan Beulich wrote: > > > Furthermore - what if Linux decided to change their structure? Or &g

Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-08-18 Thread Leo Yan
On Wed, Aug 17, 2022 at 03:17:53PM +0200, Jan Beulich wrote: [...] > Please make sure you Cc all maintainers of all files that you touch. > Albeit, see below, you could indeed have avoided Cc-ing me if you > hadn't misplaced stuff in two of the headers that you fiddle with. Sorry for this.

[PATCH] xen/arm: acpi: Support memory reserve configuration table

2022-08-17 Thread Leo Yan
: Marc Zyngier Cc: Bertrand Marquis Cc: Rahul Singh Cc: Peter Griffin Signed-off-by: Leo Yan --- xen/arch/arm/acpi/domain_build.c | 24 xen/arch/arm/efi/efi-dom0.c | 19 --- xen/arch/arm/include/asm/acpi.h | 1 + xen/include/acpi/actbl.h

Re: Question: Enable LINUX_EFI_MEMRESERVE_TABLE_GUID in EFI

2022-08-11 Thread Leo Yan
Hi Bertrand, Rahul, On Fri, Aug 05, 2022 at 12:05:23PM +, Bertrand Marquis wrote: > > On 5 Aug 2022, at 12:44, Rahul Singh wrote: [...] > >> Looked into the code, the GICv3 driver tries to create persistent > >> reservations for pending pages, and the persistent reservation table > >> can

Question: Enable LINUX_EFI_MEMRESERVE_TABLE_GUID in EFI

2022-08-04 Thread Leo Yan
Hi there, Now I am working on Ampere Altra SoC platform, with Xen (4.16) and Linux kernel (5.15.23). I observed a warning is reported by Linux kernel in the booting flow: [0.403737] [ cut here ] [0.403738] WARNING: CPU: 30 PID: 0 at

Re: [Xen-devel] Hikey: Enable Xen + Mainline Linux Kernel

2019-01-16 Thread Leo Yan
n the DMA API. The IOMMU > maintainer suggested a patch that should fix both of our issues. > I haven't yet tried the patch [2]. Would you mind to give it go? Thanks for the info. Tested with patch [2] at my side and it does fix my issue :) Thanks, Leo Yan > [1] https://lists.xen.org/arc

Re: [Xen-devel] Hikey: Enable Xen + Mainline Linux Kernel

2019-01-15 Thread Leo Yan
Hi all, On Tue, Jan 15, 2019 at 10:49:58AM +0800, Leo Yan wrote: [...] > [1.807591] Modules linked in: > [1.810717] CPU: 4 PID: 1 Comm: swapper/0 Not tainted > 5.0.0-rc2-1-g5b47dea3757c #3 > [1.818691] Hardware name: HiKey Development Board (DT) > [1

[Xen-devel] Hikey: Enable Xen + Mainline Linux Kernel

2019-01-14 Thread Leo Yan
=512M) for Xen and Linux kernel (mem=256M) but it doesn't work. Also enclosed the complete booting log. Very appreciate if you could give some suggestions for this. Thanks, Leo Yan [1.807591] Modules linked in: [1.810717] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 5.0.0-rc2-1