]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86/mmu: Set Dirty bit for new SPTEs, even if _hardware_ A/D bits are disabled
authorSean Christopherson <seanjc@google.com>
Fri, 11 Oct 2024 02:10:48 +0000 (19:10 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 30 Oct 2024 22:25:39 +0000 (15:25 -0700)
commit85649117511ddf9971e4759fe8ac9fbb69ad5064
tree70dfebee21f6d268d66a0404678cf823d85b8f35
parentc9b625625ba37d4b493f5fc878d8fce3d38dab2d
KVM: x86/mmu: Set Dirty bit for new SPTEs, even if _hardware_ A/D bits are disabled

When making a SPTE, set the Dirty bit in the SPTE as appropriate, even if
hardware A/D bits are disabled.  Only EPT allows A/D bits to be disabled,
and for EPT, the bits are software-available (ignored by hardware) when
A/D bits are disabled, i.e. it is perfectly legal for KVM to use the Dirty
to track dirty pages in software.

Link: https://lore.kernel.org/r/20241011021051.1557902-17-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/mmu/spte.c
arch/x86/kvm/mmu/spte.h