]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Comment FNAME(sync_page) to document TLB flushing logic
authorSean Christopherson <seanjc@google.com>
Fri, 13 May 2022 19:50:00 +0000 (19:50 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jun 2022 08:47:10 +0000 (04:47 -0400)
commitaebf566b5bccb0e9d4915e17432b915d2d507507
treedeeda5b7f1d98faa0dbce6c2203335077d908c46
parent154bc6fbec4a8c4bac92b5632bd62ae74a77cbe5
KVM: x86/mmu: Comment FNAME(sync_page) to document TLB flushing logic

Add a comment to FNAME(sync_page) to explain why the TLB flushing logic
conspiculously doesn't handle the scenario of guest protections being
reduced.  Specifically, if synchronizing a SPTE drops execute protections,
KVM will not emit a TLB flush, whereas dropping writable or clearing A/D
bits does trigger a flush via mmu_spte_update().  Architecturally, until
the GPTE is implicitly or explicitly flushed from the guest's perspective,
KVM is not required to flush any old, stale translations.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Message-Id: <20220513195000.99371-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/paging_tmpl.h