From: Marc Zyngier <maz@kernel.org>
To: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: James Morse <james.morse@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Alexandru Elisei <alexandru.elisei@arm.com>,
Eric Auger <eric.auger@redhat.com>,
Joey Gouly <joey.gouly@arm.com>,
kernel-team@android.com
Subject: [PATCH v2 0/5] KVM: arm64: Assorted vgic-v3 fixes
Date: Sun, 10 Oct 2021 16:09:05 +0100 [thread overview]
Message-ID: <20211010150910.2911495-1-maz@kernel.org> (raw)
Here's a bunch of vgic-v3 fixes I have been sitting on for some
time. None of them are critical, though some are rather entertaining.
The first one is a leftover from the initial Apple-M1 enablement,
which doesn't advertise the GIC support via ID_AA64PFR0_EL1 (which is
expected, as it only has half a GIC...). We address it by forcefully
advertising the feature if the guest has a GICv3.
The second patch is really fun, and shows how things can go wrong when
they are badly specified. The gist of it is that on systems that
advertise ICH_VTR_EL2.SEIS, we need to fallback to the full GICv3
cpuif emulation. The third patch is an good optimisation on the
previous one, and the fourth a direct consequence of the whole thing.
The last patch are more of a harmless oddity: virtual LPIs happen to
have an active state buried into the pseudocode (and only there). Fun!
Nothing goes wrong with that, but we need to align the emulation to
match the pseudocode.
All of this is only targeting 5.16, and I don't plan to backport any
of it.
* From v1 [1]:
- Dropped the patch that tried to optimise what to do with an active
LPI. There is unfortunately a bad corner case in the pseudocode
that prevents it. Oh well.
- Added an extra patch to help in the case where ICH_HCR_EL2.TDS is
supported, and that we can use that instead of ICH_HCR_EL2.TC to
trap only ICC_DIR_EL1. Given the performance improvement, it was
too hard to ignore it.
[1] https://lore.kernel.org/r/20210924082542.2766170-1-maz@kernel.org
Marc Zyngier (5):
KVM: arm64: Force ID_AA64PFR0_EL1.GIC=1 when exposing a virtual GICv3
KVM: arm64: vgic-v3: Work around GICv3 locally generated SErrors
KVM: arm64: vgic-v3: Reduce common group trapping to ICV_DIR_EL1 when
possible
KVM: arm64: vgic-v3: Don't advertise ICC_CTLR_EL1.SEIS
KVM: arm64: vgic-v3: Align emulated cpuif LPI state machine with the
pseudocode
arch/arm64/include/asm/sysreg.h | 3 +++
arch/arm64/kvm/hyp/vgic-v3-sr.c | 22 ++++++++--------------
arch/arm64/kvm/sys_regs.c | 5 +++++
arch/arm64/kvm/vgic/vgic-v3.c | 21 ++++++++++++++++++---
4 files changed, 34 insertions(+), 17 deletions(-)
--
2.30.2
next reply other threads:[~2021-10-10 15:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-10 15:09 Marc Zyngier [this message]
2021-10-10 15:09 ` [PATCH v2 1/5] KVM: arm64: Force ID_AA64PFR0_EL1.GIC=1 when exposing a virtual GICv3 Marc Zyngier
2021-10-10 15:09 ` [PATCH v2 2/5] KVM: arm64: vgic-v3: Work around GICv3 locally generated SErrors Marc Zyngier
2021-10-10 15:09 ` [PATCH v2 3/5] KVM: arm64: vgic-v3: Reduce common group trapping to ICV_DIR_EL1 when possible Marc Zyngier
2021-10-12 16:05 ` Alexandru Elisei
2021-10-10 15:09 ` [PATCH v2 4/5] KVM: arm64: vgic-v3: Don't advertise ICC_CTLR_EL1.SEIS Marc Zyngier
2021-10-10 15:09 ` [PATCH v2 5/5] KVM: arm64: vgic-v3: Align emulated cpuif LPI state machine with the pseudocode Marc Zyngier
2021-10-17 10:11 ` [PATCH v2 0/5] KVM: arm64: Assorted vgic-v3 fixes Marc Zyngier
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=20211010150910.2911495-1-maz@kernel.org \
--to=maz@kernel.org \
--cc=alexandru.elisei@arm.com \
--cc=eric.auger@redhat.com \
--cc=james.morse@arm.com \
--cc=joey.gouly@arm.com \
--cc=kernel-team@android.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=suzuki.poulose@arm.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