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: Support memory reserve configuration table

2022-09-06 Thread Marc Zyngier
On Tue, 06 Sep 2022 08:27:47 +0100, 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 comply the general flow for EFI > > >

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

2022-09-06 Thread Marc Zyngier
On Tue, 06 Sep 2022 16:13:25 +0100, Leo Yan wrote: > > 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

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

2022-09-06 Thread Marc Zyngier
On Tue, 06 Sep 2022 08:17:14 +0100, Leo Yan wrote: > > 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: > > > > > > [...] > > > > > > > >

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 comply the general flow for EFI > > >

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 Ard Biesheuvel
On Tue, 6 Sept 2022 at 09:17, Leo Yan wrote: > > 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

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 cannot create the concept that how GIC RD tables play > >

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

2022-09-06 Thread Marc Zyngier
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 cannot create the concept that how GIC RD tables play > > > > roles to support the para virtualization or passthrough mode. > > > > > > I am not

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 asking. The pending tables are just > >

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 Julien Grall
Hi Leo, On 25/08/2022 12:50, Leo Yan wrote: 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

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

2022-08-25 Thread Julien Grall
Hi Leo, On 25/08/2022 12:24, Leo Yan wrote: 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

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 Julien Grall
Hi, On 25/08/2022 08:59, Leo Yan wrote: 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

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-19 Thread Marc Zyngier
On Thu, 18 Aug 2022 17:24:31 +0100, Ard Biesheuvel wrote: > > On Thu, 18 Aug 2022 at 17:49, Leo Yan wrote: > > > > 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? > > > > > > > > > > > > >

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

2022-08-18 Thread Ard Biesheuvel
On Thu, 18 Aug 2022 at 17:49, Leo Yan wrote: > > 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

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 Bertrand Marquis
Hi Julien, > On 18 Aug 2022, at 08:57, 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 >>> is there a guarantee that they won't?

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

2022-08-18 Thread Julien Grall
Hi Ard, On 18/08/2022 10:33, Ard Biesheuvel wrote: On Thu, 18 Aug 2022 at 11:15, Leo Yan wrote: 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

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

2022-08-18 Thread Marc Zyngier
On Thu, 18 Aug 2022 10:15:30 +0100, Leo Yan wrote: > > 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 > >

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

2022-08-18 Thread Ard Biesheuvel
On Thu, 18 Aug 2022 at 11:15, Leo Yan wrote: > > 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

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 Jan Beulich
On 18.08.2022 10:46, Leo Yan wrote: > 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

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 that they won't? Generally

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 > > > is there a guarantee that they

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

2022-08-18 Thread Julien Grall
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 is there a guarantee that they won't? Generally such structures belong in the public interface, guaranteeing forward

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

2022-08-18 Thread Jan Beulich
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 that they won't? Generally such structures >> belong in the public interface, guaranteeing forward

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.

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

2022-08-17 Thread Ard Biesheuvel
On Wed, 17 Aug 2022 at 15:18, Jan Beulich wrote: > > On 17.08.2022 12:57, Leo Yan wrote: > > On Arm64, when boot Dom0 with the Linux kernel, it reports the warning: > > > > [0.403737] [ cut here ] > > [0.403738] WARNING: CPU: 30 PID: 0 at > >

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

2022-08-17 Thread Jan Beulich
On 17.08.2022 12:57, Leo Yan wrote: > On Arm64, when boot Dom0 with the Linux kernel, it reports the warning: > > [0.403737] [ cut here ] > [0.403738] WARNING: CPU: 30 PID: 0 at > drivers/irqchip/irq-gic-v3-its.c:3074 its_cpu_init+0x814/0xae0 > [0.403745]