summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2026-03-03 21:34:46 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2026-06-25 11:32:00 +0200
commit216b1a47e80c586193f323290a6baf38b487594b (patch)
tree0fed136cfd3b23a18392102f23e8db66dac725d1 /tools/testing
parent6bb13c2eb7ef13a7eeb4641085348d9bb8fc92f5 (diff)
downloadlinux-next-216b1a47e80c586193f323290a6baf38b487594b.tar.gz
linux-next-216b1a47e80c586193f323290a6baf38b487594b.zip
KVM: x86/mmu: use kvm_page_format to test SPTEs
is_access_allowed(), and is_executable_pte() within it, are effectively a special version of permission_fault() that only supports a subset of roles. In particular it does not allow SMEP, SMAP and PKE; while SMAP and PKE are not a problem (they are not supported by EPT/NPT and is_access_allowed() is only used for either EPT/NPT or CR0.PG=0), lack of ring-0 execution checks support means that KVM can only use MBEC and GMET with shadow paging. Replace is_access_allowed() with a modified version of permission_fault(), looking at the same bitmasks but using the struct kvm_mmu's fmt member; the new version supports MBEC/GMET for free, just by virtue of filling in the ACC_* masks from the SPTE. This prepares for a possible future where TDP entries could have XS!=XU, for example as part of implementing Hyper-V VSM natively inside KVM. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions