From: David Woodhouse <dwmw2@infradead.org>
To: Marc Zyngier <maz@kernel.org>,
Oliver Upton <oliver.upton@linux.dev>,
Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Sebastian Ott <sebott@redhat.com>,
Andre Przywara <andre.przywara@arm.com>,
Thorsten Blum <thorsten.blum@linux.dev>,
Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: "Saidi, Ali" <alisaidi@amazon.com>
Subject: Re: [RFC PATCH 2/2] KVM: arm64: vgic-its: Unmap all vPEs on shutdown
Date: Tue, 22 Jul 2025 12:35:40 +0200 [thread overview]
Message-ID: <b0047fa676bf887ef534fa8dff064d32149533a9.camel@infradead.org> (raw)
In-Reply-To: <c142f447c59861f3c94b0fea7f055f4ff201fa98.camel@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 1555 bytes --]
On Mon, 2025-06-23 at 18:38 +0200, David Woodhouse wrote:
> On Mon, 2025-06-23 at 14:27 +0100, David Woodhouse wrote:
> > From: David Woodhouse <dwmw@amazon.co.uk>
> >
> > We observed systems going dark on kexec, due to corruption of the new
> > kernel's text (and sometimes the initrd). This was eventually determined
> > to be caused by the vLPI pending tables used by the GIC in the previous
> > kernel, which were not being quiesced properly.
>
> FWIW this is a previous hack we attempted which *didn't* work. (For
> illustration only; ignore the syscore .kexec hook. We addressed that
> differently in the end with
> https://lore.kernel.org/kexec/20231213064004.2419447-1-jgowans@amazon.com/ )
>
> At the point where the its_kexec() hook in this patch has completed, we
> poisoned the (ex-) vLPI pending tables and then scanned for corruption
> in them. We saw the same characteristic pattern of corruption which had
> been breaking the next kernel after kexec: 32 bytes copied from offset
> 0 to offset 32 in a page, followed by bytes 0, 1, 32, 33, 34, 35 being
> zeroed.
>
> Adding a few milliseconds of sleep before the poisoning was enough to
> make the problem go away. As is the patch which calls unmap_all_vpes()
> ∀ kvm.
>
> Of course, if the GIC were behind an IOMMU as all DMA-capable devices
> should be, this might never have happened...
Any thoughts on this? I'd really appreciate some guidance from Arm on
precisely what is *expected* of the operating system here, to quiesce
the GIC correctly.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5069 bytes --]
next prev parent reply other threads:[~2025-07-22 10:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 13:27 [RFC PATCH 1/2] KVM: Add arch hooks for KVM syscore ops David Woodhouse
2025-06-23 13:27 ` [RFC PATCH 2/2] KVM: arm64: vgic-its: Unmap all vPEs on shutdown David Woodhouse
2025-06-23 16:38 ` David Woodhouse
2025-07-22 10:35 ` David Woodhouse [this message]
2025-07-22 22:46 ` Oliver Upton
2025-07-23 9:42 ` David Woodhouse
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=b0047fa676bf887ef534fa8dff064d32149533a9.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=alisaidi@amazon.com \
--cc=andre.przywara@arm.com \
--cc=catalin.marinas@arm.com \
--cc=joey.gouly@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=sebott@redhat.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=suzuki.poulose@arm.com \
--cc=thorsten.blum@linux.dev \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).