]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Remove spurious clearing of dirty bit from TDP MMU SPTE
authorSean Christopherson <seanjc@google.com>
Wed, 31 Mar 2021 00:49:41 +0000 (17:49 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 17 Apr 2021 12:30:56 +0000 (08:30 -0400)
commitf4aaa52df94f04210dd59eaf65ba5754e3d7b6ef
tree333e8559f30fbb126350ee85a76cfe864dd0b379
parent07129007130074b5acbfaa9a09c6bf181dcfbb99
KVM: x86/mmu: Remove spurious clearing of dirty bit from TDP MMU SPTE

Don't clear the dirty bit when aging a TDP MMU SPTE (in response to a MMU
notifier event).  Prematurely clearing the dirty bit could cause spurious
PML updates if aging a page happened to coincide with dirty logging.

Note, tdp_mmu_set_spte_no_acc_track() flows into __handle_changed_spte(),
so the host PFN will be marked dirty, i.e. there is no potential for data
corruption.

Fixes: c63f26e3339f ("kvm: x86/mmu: Support dirty logging for the TDP MMU")
Cc: Ben Gardon <bgardon@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210331004942.2444916-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/tdp_mmu.c