From: Marc Zyngier <maz@kernel.org>
To: Leo Yan <leo.yan@linaro.org>
Cc: Ard Biesheuvel <ardb@kernel.org>, Jan Beulich <jbeulich@suse.com>,
Bertrand Marquis <Bertrand.Marquis@arm.com>,
Rahul Singh <Rahul.Singh@arm.com>,
Peter Griffin <peter.griffin@linaro.org>,
xen-devel <xen-devel@lists.xenproject.org>,
Julien Grall <jgrall@amazon.com>
Subject: Re: [PATCH] xen/arm: acpi: Support memory reserve configuration table
Date: Thu, 18 Aug 2022 10:40:03 +0100 [thread overview]
Message-ID: <87o7whx53g.wl-maz@kernel.org> (raw)
In-Reply-To: <Yv4DMuQHbGNhqAP4@leoy-yangtze.lan>
On Thu, 18 Aug 2022 10:15:30 +0100,
Leo Yan <leo.yan@linaro.org> 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 single CU only, so I see no reason to define it there.
> > >
> > > Furthermore - what if Linux decided to change their structure? Or
> > > is there a guarantee that they won't?
> >
> > No, there is not. The memreserve table is an internal interface
> > between the EFI stub loader and the Linux kernel proper.
> >
> > As I have argued many times before, booting the arm64 kernel in
> > EFI/ACPI mode without going through the EFI stub violates the ACPI
> > spec, and relies on interfaces that were not intended for public
> > consumption.
>
> Let me ask a question but sorry it might be off topic.
>
> In the Linux kernel function:
>
> static int gic_reserve_range(phys_addr_t addr, unsigned long size)
> {
> if (efi_enabled(EFI_CONFIG_TABLES))
> return efi_mem_reserve_persistent(addr, size);
>
> return 0;
> }
>
> We can see it will reserve persistent memory region for GIC pending
> pages, so my question is if a platform is booting with DT binding
> rather than ACPI table, how the primary kernel can reserve the pages
> and pass the info to the secondary kernel?
This is a false dichotomy. DT and UEFI are not exclusive, far from
it. That's actually how most non-ACPI systems boot these days, and
they are able to use kexec out of the box, using the EFI MEMRESERVE
internal API.
The real difference is between UEFI and non-UEFI. If you're allergic
to it, you have two options:
- you delegate the redistributor configuration to your bootloader,
mark the corresponding memory as reserved in the DT from the
bootloader, and you're done. A bunch of embedded systems do that,
and are able to kexec.
- you keep configuring the RDs from Linux, but you must then mark the
regions as reserved in the DT that is passed to the secondary
kernel. It requires some cooperation from the kexec userspace to
parse /proc/iomem and insert the correct annotations in that DT.
> Seems it's broken for kdump/kexec if kernel boots with using DT?
You equate kexec to kdump, which is wrong. kdump does *not* reuse the
memory from the previous kernel, and thus is immune to the RD table
reallocation problem. You don't need anything for kdump, as you will
use the RD tables as configured by the initial kernel.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2022-08-18 9:40 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 10:57 [PATCH] xen/arm: acpi: Support memory reserve configuration table Leo Yan
2022-08-17 13:17 ` Jan Beulich
2022-08-17 13:49 ` Ard Biesheuvel
2022-08-18 9:15 ` Leo Yan
2022-08-18 9:33 ` Ard Biesheuvel
2022-08-18 10:04 ` Julien Grall
2022-08-18 15:49 ` Leo Yan
2022-08-18 16:24 ` Ard Biesheuvel
2022-08-19 12:10 ` Marc Zyngier
2022-08-25 7:59 ` Leo Yan
2022-08-25 9:07 ` Julien Grall
2022-08-25 11:24 ` Leo Yan
2022-08-25 12:51 ` Julien Grall
2022-08-25 11:50 ` Leo Yan
2022-08-25 12:59 ` Julien Grall
2022-08-25 14:40 ` Leo Yan
2022-09-06 2:52 ` Leo Yan
2022-09-06 6:27 ` Marc Zyngier
2022-09-06 7:17 ` Leo Yan
2022-09-06 7:22 ` Ard Biesheuvel
2022-09-06 7:27 ` Leo Yan
2022-09-06 7:43 ` Leo Yan
2022-09-06 8:28 ` Marc Zyngier
2022-09-06 7:53 ` Marc Zyngier
2022-09-06 15:13 ` Leo Yan
2022-09-06 15:18 ` Marc Zyngier
2022-08-18 9:40 ` Marc Zyngier [this message]
2022-08-18 7:34 ` Leo Yan
2022-08-18 7:47 ` Jan Beulich
2022-08-18 8:46 ` Leo Yan
2022-08-18 8:52 ` Jan Beulich
2022-08-18 7:57 ` Julien Grall
2022-08-18 8:28 ` Leo Yan
2022-08-18 13:24 ` Bertrand Marquis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o7whx53g.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=Bertrand.Marquis@arm.com \
--cc=Rahul.Singh@arm.com \
--cc=ardb@kernel.org \
--cc=jbeulich@suse.com \
--cc=jgrall@amazon.com \
--cc=leo.yan@linaro.org \
--cc=peter.griffin@linaro.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.