Skip to content

KVM: x86/mmu: Fix TDP MMU dirty logging bug L2 running with EPT disabled

David Matlack kvm stable 1 version Applied

Status from this message: Applied to kvm-x86 fixes, with the various tweaks mentioned in reply, and the

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: x86/mmu: Check kvm_mmu_page_ad_need_write_protect() when clearing TDP MMU dirty bitsarch/x86/kvm/mmu/tdp_mmu.c+16 -51 reply
2/4KVM: x86/mmu: Remove function comments above clear_dirty_{gfn_range,pt_masked}()arch/x86/kvm/mmu/tdp_mmu.c+0 -140 replies
3/4KVM: x86/mmu: Fix and clarify comments about clearing D-bit vs. write-protectingarch/x86/kvm/mmu/tdp_mmu.c+6 -101 reply
4/4KVM: selftests: Add coverage of EPT-disabled to vmx_dirty_log_testtools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c+46 -141 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] KVM: x86/mmu: Fix TDP MMU dirty logging bug L2 running with EPT disabled

Fix a bug in the TDP MMU caught by syzkaller and CONFIG_KVM_PROVE_MMU that causes writes made by L2 to no be reflected in the dirty log when L1 has disabled EPT.

Patch 1 contains the fix. Patch 2 and 3 fix comments related to clearing dirty bits in the TDP MMU. Patch 4 adds selftests coverage of dirty logging of L2 when L1 has disabled EPT. i.e. a regression test for this bug.

David Matlack (4):
KVM: x86/mmu: Check kvm_mmu_page_ad_need_write_protect() when clearing
TDP MMU dirty bits
KVM: x86/mmu: Remove function comments above

    clear_dirty_{gfn_range,pt_masked}()

KVM: x86/mmu: Fix and clarify comments about clearing D-bit vs.
write-protecting
KVM: selftests: Add coverage of EPT-disabled to vmx_dirty_log_test

 arch/x86/kvm/mmu/tdp_mmu.c                    | 51 +++++++---------
 .../selftests/kvm/x86_64/vmx_dirty_log_test.c | 60 ++++++++++++++-----
 2 files changed, 68 insertions(+), 43 deletions(-)

base-commit: 687d8f4c3dea0758afd748968d91288220bbe7e3

Signature · 1 line
2.44.0.291.gc1ea87d7ee-goog