linux/arch/x86/kvm/mmu
Sean Christopherson 127037591c KVM: x86/mmu: Bail early from final #PF handling on spurious faults
Detect spurious page faults, e.g. page faults that occur when multiple
vCPUs simultaneously access a not-present page, and skip the SPTE write,
prefetch, and stats update for spurious faults.

Note, the performance benefits of skipping the write and prefetch are
likely negligible, and the false positive stats adjustment is probably
lost in the noise.  The primary motivation is to play nice with TDX's
SEPT in the long term.  SEAMCALLs (to program SEPT entries) are quite
costly, e.g. thousands of cycles, and a spurious SEPT update will result
in a SEAMCALL error (which KVM will ideally treat as fatal).

Reported-by: Kai Huang <kai.huang@intel.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200923220425.18402-5-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-28 07:57:37 -04:00
..
mmu_audit.c KVM: x86/mmu: Rename page_header() to to_shadow_page() 2020-07-08 16:21:55 -04:00
mmu_internal.h KVM: x86/mmu: Rename page_header() to to_shadow_page() 2020-07-08 16:21:55 -04:00
mmu.c KVM: x86/mmu: Bail early from final #PF handling on spurious faults 2020-09-28 07:57:37 -04:00
mmutrace.h KVM: x86/mmu: Return unique RET_PF_* values if the fault was fixed 2020-09-28 07:57:36 -04:00
page_track.c KVM: x86/mmu: Add MMU-internal header 2020-07-08 16:21:54 -04:00
paging_tmpl.h KVM: x86/mmu: Bail early from final #PF handling on spurious faults 2020-09-28 07:57:37 -04:00