From: Marc Zyngier <maz@kernel.org>
To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev
Cc: Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Oliver Upton <oliver.upton@linux.dev>,
Zenghui Yu <yuzenghui@huawei.com>, Will Deacon <will@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Mark Brown <broonie@kernel.org>
Subject: [PATCH 0/2] KVM: arm64: Fix HCRX_EL2.GCSEn handling
Date: Wed, 30 Apr 2025 11:59:14 +0100 [thread overview]
Message-ID: <20250430105916.3815157-1-maz@kernel.org> (raw)
Will points out[1] that GCS is completely busted on the host if we
ever run a guest, as HCRX_EL2 gets set to a fixed value on vcpu exit,
value that doesn't include the GCSEn bit. This is likely to kaboom on
a nVHE/hVHE setup.
Obviously, nobody ever tested this.
This series moves the handling of HCRX_EL2 to being correctly
saved/restored, which should address the problem. I say "should", as
in keeping with the tradition, I haven't tested it either. Or at least
not with GCS, as I don't have the correct SW setup (I don't even know
what you need to enable GCS).
I'd very much appreciate some help in testing this.
Marc Zyngier (2):
KVM: arm64: Properly save/restore HCRX_EL2
KVM: arm64: Kill HCRX_HOST_FLAGS
arch/arm64/include/asm/el2_setup.h | 2 +-
arch/arm64/include/asm/kvm_arm.h | 1 -
arch/arm64/kvm/hyp/include/hyp/switch.h | 13 ++++++-------
3 files changed, 7 insertions(+), 9 deletions(-)
--
2.39.2
next reply other threads:[~2025-04-30 10:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 10:59 Marc Zyngier [this message]
2025-04-30 10:59 ` [PATCH 1/2] KVM: arm64: Properly save/restore HCRX_EL2 Marc Zyngier
2025-04-30 10:59 ` [PATCH 2/2] KVM: arm64: Kill HCRX_HOST_FLAGS Marc Zyngier
2025-05-07 7:56 ` [PATCH 0/2] KVM: arm64: Fix HCRX_EL2.GCSEn handling Oliver Upton
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=20250430105916.3815157-1-maz@kernel.org \
--to=maz@kernel.org \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=oliver.upton@linux.dev \
--cc=suzuki.poulose@arm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.