diff options
| author | Kevin Cheng <chengkev@google.com> | 2026-05-23 02:27:01 +0300 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-05-27 00:54:21 +0300 |
| commit | 0de1020f7bbb3e1c9cd5b6f3eb4bdd661b1ff735 (patch) | |
| tree | 7afc5d61c155dcbbfe12ea4c4c9fe98af00029bf /scripts | |
| parent | 96b067b59ad9ccede585fcadab27543188353bff (diff) | |
| download | linux-0de1020f7bbb3e1c9cd5b6f3eb4bdd661b1ff735.tar.xz | |
KVM: selftests: Add nested page fault injection test
Add a test that exercises nested page fault injection during L2
execution. L2 executes I/O string instructions (OUTSB/INSB) that access
memory restricted in L1's nested page tables (NPT/EPT), triggering a
nested page fault that L0 must inject to L1.
The test supports both AMD SVM (NPF) and Intel VMX (EPT violation) and
verifies that:
- The exit reason is an NPF/EPT violation
- The access type and permission bits are correct
- The faulting GPA is correct
Three test cases are implemented:
- Unmap the final data page (final translation fault, OUTSB read)
- Unmap a PT page (page walk fault, OUTSB read)
- Write-protect the final data page (protection violation, INSB write)
- Write-protect a PT page (protection violation on A/D update, OUTSB
read)
Signed-off-by: Kevin Cheng <chengkev@google.com>
[sean: name it nested_tdp_fault_test, consolidate asserts]
Link: https://patch.msgid.link/20260522232701.3671446-6-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
