* Re: [PATCH] irqchip/gic-v3-its: Claim LPI tables inherited across kexec on DT
[not found] <87v76r8h0o.wl-maz@kernel.org>
@ 2026-10-26 11:41 ` Qianhui Xu
2026-10-26 13:53 ` Marc Zyngier
0 siblings, 1 reply; 2+ messages in thread
From: Qianhui Xu @ 2026-10-26 11:41 UTC (permalink / raw)
To: Marc Zyngier
Cc: Thomas Gleixner, linux-arm-msm, linux-arm-kernel, linux-kernel
Hi Marc,
Understood on all three points, and the series is withdrawn -- I am not
going to resend it in any form.
Just so it is on record that I got the reasoning right this time:
- Inheriting LPI tables is not something the incoming kernel can decide to
fix up after the fact. By the time it runs, it can no longer tell which
of those pages are still the LPI tables and which are ordinary memory it
has already handed out, so any "claim" is a race with a statistical
chance of being correct. That is why it is either configured before the
handoff, or not at all.
- EFI and DT are not alternatives: the reservation has to exist in
whichever description the next kernel is given, EFI memory map or DT
reserved-memory, and EFI booting a DT machine is the normal case.
- Therefore the LPI tables have to be programmed and reserved by the
firmware/bootloader at boot and stay reserved across the whole kexec
chain.
In our case the "bootloader" for a kexec chain is the kexec loader itself,
so the work moves there: add the reservation to the FDT that is handed over
(e.g. grow the blob when there is no space for the memreserve) and have the
loader program the tables, instead of the kernel trying to reclaim them.
Anything that needs LPIs will simply use a full reboot until that exists.
No further review requested -- thanks for stopping this early rather than
after a round of review.
Best regards,
Qianhui
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] irqchip/gic-v3-its: Claim LPI tables inherited across kexec on DT
2026-10-26 11:41 ` [PATCH] irqchip/gic-v3-its: Claim LPI tables inherited across kexec on DT Qianhui Xu
@ 2026-10-26 13:53 ` Marc Zyngier
0 siblings, 0 replies; 2+ messages in thread
From: Marc Zyngier @ 2026-10-26 13:53 UTC (permalink / raw)
To: Qianhui Xu; +Cc: Thomas Gleixner, linux-arm-msm, linux-arm-kernel, linux-kernel
On Mon, 26 Oct 2026 11:41:29 +0000,
Qianhui Xu <xiaqinghuan@mail.ustc.edu.cn> wrote:
>
> Hi Marc,
>
> Understood on all three points, and the series is withdrawn -- I am not
> going to resend it in any form.
Thanks.
>
> Just so it is on record that I got the reasoning right this time:
>
> - Inheriting LPI tables is not something the incoming kernel can decide to
> fix up after the fact. By the time it runs, it can no longer tell which
> of those pages are still the LPI tables and which are ordinary memory it
> has already handed out, so any "claim" is a race with a statistical
> chance of being correct. That is why it is either configured before the
> handoff, or not at all.
Indeed. By the time it gets to the GIC driver, the memory used by the
LPI tables could be allocated to other things (page tables, for
example), and memory corruption is very likely.
> - EFI and DT are not alternatives: the reservation has to exist in
> whichever description the next kernel is given, EFI memory map or DT
> reserved-memory, and EFI booting a DT machine is the normal case.
Correct. The EFI reservation is done through Linux-specific EFI tables
that are available irrespective of the platform description method. DT
reserved memory is also usable, but obviously has to be set from the
initial boot point.
> - Therefore the LPI tables have to be programmed and reserved by the
> firmware/bootloader at boot and stay reserved across the whole kexec
> chain.
>
> In our case the "bootloader" for a kexec chain is the kexec loader itself,
> so the work moves there: add the reservation to the FDT that is handed over
> (e.g. grow the blob when there is no space for the memreserve) and have the
> loader program the tables, instead of the kernel trying to reclaim them.
> Anything that needs LPIs will simply use a full reboot until that exists.
If you're using Linux as your first stage bootloader (like petitboot),
then the DT you produce has to have the reservation. If you're using
u-boot without EFI as the bootloader, you can perform the reservation
there.
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-26 13:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <87v76r8h0o.wl-maz@kernel.org>
2026-10-26 11:41 ` [PATCH] irqchip/gic-v3-its: Claim LPI tables inherited across kexec on DT Qianhui Xu
2026-10-26 13:53 ` Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox