summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorFuad Tabba <fuad.tabba@linux.dev>2026-07-17 14:03:16 +0100
committerOliver Upton <oupton@kernel.org>2026-07-31 00:11:57 -0700
commitc6f308b4d341a239c1ef7423b82d62f50fd87745 (patch)
treee3022d696a4f16b7de695ed2d0d88e02a9458600 /include/linux
parentc243222701690da30c010d6b98545684f5d78b15 (diff)
KVM: arm64: Don't advertise eager page splitting under pKVM
Under pKVM the stage-2 walker resolves to pkvm_pgtable_stage2_split(), a WARN_ON_ONCE(1) stub, yet KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE is still enabled and reported for non-protected guests: the capability check keys on the per-VM protected state while the walker dispatch keys on the host-global mode. Enabling the cap and then dirty-logging the guest reaches the stub, splatting a userspace-reachable WARN. Reject the capability, and stop reporting a chunk size and the supported block sizes, for every VM once pKVM is enabled, keyed on the host-global mode like the split dispatch. Gating only protected VMs would leave the non-protected guests that reach the stub still able to enable it. Userspace decides whether eager splitting is available from the block-size bitmap (QEMU falls back to no eager splitting when it reads 0), so leaving it advertised steers an explicit request into the enable failure instead of the fallback. Fixes: e912efed485a ("KVM: arm64: Introduce the EL1 pKVM MMU") Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev> Reviewed-by: Bradley Morgan <include@grrlz.net> Tested-by: Bradley Morgan <include@grrlz.net> # On pixel 7, Android 17 CP2A.260705.006 Test: Bradley Morgan <include@grrlz.net> # On QEMU arm64 host Link: https://patch.msgid.link/20260717130317.1953574-7-fuad.tabba@linux.dev Signed-off-by: Oliver Upton <oupton@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions