diff options
| author | Yosry Ahmed <yosry.ahmed@linux.dev> | 2025-12-30 15:01:46 -0800 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-01-08 12:02:15 -0800 |
| commit | 251e4849a79b258fd3e889ff095ba083ce301c13 (patch) | |
| tree | 623f74a79b1f4f560ed8ebda6784006218892c75 /tools/testing/selftests/kvm/include/x86/kvm_util_arch.h | |
| parent | 753c0d5a507b939d6efc60c7b437d5330880cce3 (diff) | |
| download | linux-next-251e4849a79b258fd3e889ff095ba083ce301c13.tar.gz linux-next-251e4849a79b258fd3e889ff095ba083ce301c13.zip | |
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>
Diffstat (limited to 'tools/testing/selftests/kvm/include/x86/kvm_util_arch.h')
| -rw-r--r-- | tools/testing/selftests/kvm/include/x86/kvm_util_arch.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/include/x86/kvm_util_arch.h b/tools/testing/selftests/kvm/include/x86/kvm_util_arch.h index 1cf84b8212c6..be35d26bb320 100644 --- a/tools/testing/selftests/kvm/include/x86/kvm_util_arch.h +++ b/tools/testing/selftests/kvm/include/x86/kvm_util_arch.h @@ -22,6 +22,8 @@ struct pte_masks { uint64_t nx; uint64_t c; uint64_t s; + + uint64_t always_set; }; struct kvm_mmu_arch { |
