diff options
| author | Oliver Upton <oupton@kernel.org> | 2026-07-01 16:16:20 -0700 |
|---|---|---|
| committer | Marc Zyngier <maz@kernel.org> | 2026-07-06 17:17:38 +0100 |
| commit | f35c08c092505f3a83ce097d94fe51eb8bc9c1b5 (patch) | |
| tree | aa46e67bd00de4f8168a4c6511f1aee88dc33886 /drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git | |
| parent | 100baf0184896f859290a684f864b8200d8ac872 (diff) | |
KVM: arm64: Only update XN attr when requested during S2 relaxation
On systems without DIC, KVM lazily grants execute permission to stage-2
translations after taking an instruction abort due to a permission
fault, allowing it to defer I-cache invalidations to the point they're
absolutely required.
If a data abort happens later down the line to such a translation, KVM
will not request execute permissions as part of the S2 relaxation on the
assumption that kvm_pgtable_stage2_relax_perms() does exactly what the
name implies and adds the requested permissions to the pre-existing
ones.
Avoid taking unintended execute permission faults by only preparing the
XN attribute if KVM_PGTABLE_PROT_X is set.
Fixes: 2608563b466b ("KVM: arm64: Add support for FEAT_XNX stage-2 permissions")
Signed-off-by: Oliver Upton <oupton@kernel.org>
Reviewed-by: Wei-Lin Chang <weilin.chang@arm.com>
Link: https://patch.msgid.link/20260701231620.3300204-3-oupton@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
