aboutsummaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorGravatar David Matlack <dmatlack@google.com> 2024-03-15 16:05:41 -0700
committerGravatar Sean Christopherson <seanjc@google.com> 2024-04-11 12:58:52 -0700
commit40e0ee6338f0c042c0dabe1f17eb76eac37b5425 (patch)
tree3132398df788b7dc17fbed26b937ec43ddf45dd4 /virt
parentKVM: x86/mmu: Fix and clarify comments about clearing D-bit vs. write-protecting (diff)
downloadlinux-40e0ee6338f0c042c0dabe1f17eb76eac37b5425.tar.gz
linux-40e0ee6338f0c042c0dabe1f17eb76eac37b5425.tar.bz2
linux-40e0ee6338f0c042c0dabe1f17eb76eac37b5425.zip
KVM: selftests: Add coverage of EPT-disabled to vmx_dirty_log_test
Extend vmx_dirty_log_test to include accesses made by L2 when EPT is disabled. This commit adds explicit coverage of a bug caught by syzkaller, where the TDP MMU would clear D-bits instead of write-protecting SPTEs being used to map an L2, which only happens when L1 does not enable EPT, causing writes made by L2 to not be reflected in the dirty log when PML is enabled: $ ./vmx_dirty_log_test Nested EPT: disabled ==== Test Assertion Failure ==== x86_64/vmx_dirty_log_test.c:151: test_bit(0, bmap) pid=72052 tid=72052 errno=4 - Interrupted system call (stack trace empty) Page 0 incorrectly reported clean Opportunistically replace the volatile casts with {READ,WRITE}_ONCE(). Link: https://lore.kernel.org/kvm/000000000000c6526f06137f18cc@google.com/ Signed-off-by: David Matlack <dmatlack@google.com> Link: https://lore.kernel.org/r/20240315230541.1635322-5-dmatlack@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions