diff options
| author | Fuad Tabba <fuad.tabba@linux.dev> | 2026-09-29 10:00:29 +0100 |
|---|---|---|
| committer | Oliver Upton <oupton@kernel.org> | 2026-09-29 09:08:56 -0700 |
| commit | 80ae56184b57176b908cd6a7ececf274a7e4b3c7 (patch) | |
| tree | 865def77b427e37afa3f3097ff1c47983f020957 /tools/lib/python | |
| parent | 4bdd2b3a708c1feb701cb8b62feb8ad2fd77bb07 (diff) | |
| download | linux-next-80ae56184b57176b908cd6a7ececf274a7e4b3c7.tar.gz linux-next-80ae56184b57176b908cd6a7ececf274a7e4b3c7.zip | |
KVM: arm64: Clear HCR_EL2.RW for 32-bit non-protected vCPUs
pKVM keeps its own copy of each vCPU's HCR_EL2 at EL2, initialised with
RW set unconditionally. Nothing stops userspace from creating a
non-protected AArch32 VM, and with RW set, entering one of its vCPUs is
an illegal exception return: KVM_RUN fails with KVM_EXIT_FAIL_ENTRY.
Clear RW for a vCPU that is AArch32 at EL1, when the CPU has AArch32
EL1. On a CPU without it, RW stays set and the entry still fails, rather
than EL2 switching *32_EL2 registers that are UNDEFINED there. The host
already rejects such a vCPU, but EL2 takes the vCPU's features from the
host and doesn't rely on that.
Fixes: b56680de9c648 ("KVM: arm64: Initialize trap register values in hyp in pKVM")
Cc: stable@vger.kernel.org
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
Link: https://patch.msgid.link/20260929090031.3829185-3-fuad.tabba@linux.dev
Signed-off-by: Oliver Upton <oupton@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
