]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: selftests: Set the user bit on nested NPT PTEs
authorYosry Ahmed <yosry.ahmed@linux.dev>
Tue, 30 Dec 2025 23:01:46 +0000 (15:01 -0800)
committerSean Christopherson <seanjc@google.com>
Thu, 8 Jan 2026 20:02:15 +0000 (12:02 -0800)
commit251e4849a79b258fd3e889ff095ba083ce301c13
tree623f74a79b1f4f560ed8ebda6784006218892c75
parent753c0d5a507b939d6efc60c7b437d5330880cce3
KVM: selftests: Set the user bit on nested NPT PTEs

According to the APM, NPT walks are treated as user accesses. In
preparation for supporting NPT mappings, set the 'user' bit on NPTs by
adding a mask of bits to always be set on PTEs in kvm_mmu.

Signed-off-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Link: https://patch.msgid.link/20251230230150.4150236-18-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/x86/kvm_util_arch.h
tools/testing/selftests/kvm/include/x86/processor.h
tools/testing/selftests/kvm/lib/x86/processor.c
tools/testing/selftests/kvm/lib/x86/svm.c