From: Marc Zyngier <maz@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
kernel-team@android.com,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Jay Chen <jkchen@linux.alibaba.com>
Subject: Re: [PATCH v2] irqchip/gic-v3-its: Reset each ITS's BASERn register before probe
Date: Sat, 22 Jan 2022 17:31:02 +0000 [thread overview]
Message-ID: <a19d7f44abfd38eb429e33d4886518e3@kernel.org> (raw)
In-Reply-To: <20220122163712.1141635-1-maz@kernel.org>
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@arm.com>
> Cc: Jay Chen <jkchen@linux.alibaba.com>
> Signed-off-by: Marc Zyngier <maz@kernel.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...
prev parent reply other threads:[~2022-01-22 17:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-22 16:37 [PATCH v2] irqchip/gic-v3-its: Reset each ITS's BASERn register before probe Marc Zyngier
2022-01-22 17:31 ` Marc Zyngier [this message]
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=a19d7f44abfd38eb429e33d4886518e3@kernel.org \
--to=maz@kernel.org \
--cc=jkchen@linux.alibaba.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox