[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a19d7f44abfd38eb429e33d4886518e3@kernel.org>
Date: Sat, 22 Jan 2022 17:31:02 +0000
From: Marc Zyngier <maz@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>, kernel-team@...roid.com,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Jay Chen <jkchen@...ux.alibaba.com>
Subject: Re: [PATCH v2] irqchip/gic-v3-its: Reset each ITS's BASERn register
before probe
On 2022-01-22 16:37, Marc Zyngier wrote:
> A recent bug report outlined that the way GICv4.1 is handled across
> kexec is pretty bad. We can end-up in a situation where ITSs share
> memory (this is the case when SVPET==1) and reprogram the base
> registers, creating a situation where ITSs that are part of a given
> affinity group see different pointers. Which is illegal. Boo.
>
> In order to restore some sanity, reset the BASERn registers to 0
> *before* probing any ITS. Although this isn't optimised at all,
> this is only a once-per-boot cost, which shouldn't show up on
> anyone's radar.
>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
> Cc: Jay Chen <jkchen@...ux.alibaba.com>
> Signed-off-by: Marc Zyngier <maz@...nel.org>
> Link: https://lore.kernel.org/r/20211216190315.GA14220@lpieralisi
> ---
>
> Notes:
> * From v1: Fail probing if any ITS fails to reset.
>
> drivers/irqchip/irq-gic-v3-its.c | 111 +++++++++++++++++++++++++------
> 1 file changed, 92 insertions(+), 19 deletions(-)
>
[...]
> static void __init its_acpi_probe(void)
> {
> acpi_table_parse_srat_its();
> + if (acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_TRANSLATOR,
> + its_acpi_reset, 0))
> + return;
Nah. This is obviously broken.
I'll repost something once I have actually tested it on an ACPI box.
M.
--
Jazz is not dead. It just smells funny...
Powered by blists - more mailing lists