linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/16] KVM: x86/mmu: Page fault and MMIO cleanups
@ 2024-02-28  2:41 Sean Christopherson
  2024-02-28  2:41 ` [PATCH 01/16] KVM: x86/mmu: Exit to userspace with -EFAULT if private fault hits emulation Sean Christopherson
                   ` (16 more replies)
  0 siblings, 17 replies; 83+ messages in thread
From: Sean Christopherson @ 2024-02-28  2:41 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini
  Cc: kvm, linux-kernel, Yan Zhao, Isaku Yamahata, Michael Roth,
	Yu Zhang, Chao Peng, Fuad Tabba, David Matlack

This is a combination of prep work for TDX and SNP, and a clean up of the
page fault path to (hopefully) make it easier to follow the rules for
private memory, noslot faults, writes to read-only slots, etc.

Paolo, this is the series I mentioned in your TDX/SNP prep work series.
Stating the obvious, these

  KVM: x86/mmu: Pass full 64-bit error code when handling page faults
  KVM: x86: Move synthetic PFERR_* sanity checks to SVM's #NPF handler

are the drop-in replacements.

Isaku Yamahata (1):
  KVM: x86/mmu: Pass full 64-bit error code when handling page faults

Sean Christopherson (15):
  KVM: x86/mmu: Exit to userspace with -EFAULT if private fault hits
    emulation
  KVM: x86: Remove separate "bit" defines for page fault error code
    masks
  KVM: x86: Define more SEV+ page fault error bits/flags for #NPF
  KVM: x86/mmu: Use synthetic page fault error code to indicate private
    faults
  KVM: x86/mmu: WARN if upper 32 bits of legacy #PF error code are
    non-zero
  KVM: x86: Move synthetic PFERR_* sanity checks to SVM's #NPF handler
  KVM: x86/mmu: WARN and skip MMIO cache on private, reserved page
    faults
  KVM: x86/mmu: Move private vs. shared check above slot validity checks
  KVM: x86/mmu: Don't force emulation of L2 accesses to non-APIC
    internal slots
  KVM: x86/mmu: Explicitly disallow private accesses to emulated MMIO
  KVM: x86/mmu: Move slot checks from __kvm_faultin_pfn() to
    kvm_faultin_pfn()
  KVM: x86/mmu: Handle no-slot faults at the beginning of
    kvm_faultin_pfn()
  KVM: x86/mmu: Set kvm_page_fault.hva to KVM_HVA_ERR_BAD for "no slot"
    faults
  KVM: x86/mmu: Initialize kvm_page_fault's pfn and hva to error values
  KVM: x86/mmu: Sanity check that __kvm_faultin_pfn() doesn't create
    noslot pfns

 arch/x86/include/asm/kvm_host.h |  45 ++++-----
 arch/x86/kvm/mmu.h              |   4 +-
 arch/x86/kvm/mmu/mmu.c          | 159 +++++++++++++++++++-------------
 arch/x86/kvm/mmu/mmu_internal.h |  24 ++++-
 arch/x86/kvm/mmu/mmutrace.h     |   2 +-
 arch/x86/kvm/svm/svm.c          |   9 ++
 6 files changed, 151 insertions(+), 92 deletions(-)


base-commit: ec1e3d33557babed2c2c2c7da6e84293c2f56f58
-- 
2.44.0.278.ge034bb2e1d-goog


^ permalink raw reply	[flat|nested] 83+ messages in thread

end of thread, other threads:[~2024-04-19  6:47 UTC | newest]

Thread overview: 83+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28  2:41 [PATCH 00/16] KVM: x86/mmu: Page fault and MMIO cleanups Sean Christopherson
2024-02-28  2:41 ` [PATCH 01/16] KVM: x86/mmu: Exit to userspace with -EFAULT if private fault hits emulation Sean Christopherson
2024-03-01  8:48   ` Xiaoyao Li
2024-03-07 12:52   ` Gupta, Pankaj
2024-03-12  2:59     ` Binbin Wu
2024-04-04 16:38       ` Sean Christopherson
2024-03-08  4:22   ` Yan Zhao
2024-04-04 16:45     ` Sean Christopherson
2024-02-28  2:41 ` [PATCH 02/16] KVM: x86: Remove separate "bit" defines for page fault error code masks Sean Christopherson
2024-02-29 12:44   ` Paolo Bonzini
2024-02-29 18:40     ` Sean Christopherson
2024-02-29 20:56       ` Paolo Bonzini
2024-02-29 13:43   ` Dongli Zhang
2024-02-29 15:25     ` Sean Christopherson
2024-02-28  2:41 ` [PATCH 03/16] KVM: x86: Define more SEV+ page fault error bits/flags for #NPF Sean Christopherson
2024-02-28  4:43   ` Dongli Zhang
2024-02-28 16:16     ` Sean Christopherson
2024-02-28  2:41 ` [PATCH 04/16] KVM: x86/mmu: Pass full 64-bit error code when handling page faults Sean Christopherson
2024-02-28  7:30   ` Dongli Zhang
2024-02-28 16:22     ` Sean Christopherson
2024-02-29 13:32       ` Dongli Zhang
2024-03-05  3:55   ` Xiaoyao Li
2024-02-28  2:41 ` [PATCH 05/16] KVM: x86/mmu: Use synthetic page fault error code to indicate private faults Sean Christopherson
2024-02-29 11:16   ` Huang, Kai
2024-02-29 15:17     ` Sean Christopherson
2024-03-06  9:43   ` Xu Yilun
2024-03-06 14:45     ` Sean Christopherson
2024-03-07  9:05       ` Xu Yilun
2024-03-07 14:36         ` Sean Christopherson
2024-03-12  5:34   ` Binbin Wu
2024-02-28  2:41 ` [PATCH 06/16] KVM: x86/mmu: WARN if upper 32 bits of legacy #PF error code are non-zero Sean Christopherson
2024-02-29 22:11   ` Huang, Kai
2024-02-29 23:07     ` Sean Christopherson
2024-03-12  5:44       ` Binbin Wu
2024-02-28  2:41 ` [PATCH 07/16] KVM: x86: Move synthetic PFERR_* sanity checks to SVM's #NPF handler Sean Christopherson
2024-02-29 22:19   ` Huang, Kai
2024-02-29 22:52     ` Sean Christopherson
2024-02-29 23:14       ` Huang, Kai
2024-03-12  9:44   ` Binbin Wu
2024-02-28  2:41 ` [PATCH 08/16] KVM: x86/mmu: WARN and skip MMIO cache on private, reserved page faults Sean Christopherson
2024-02-29 22:26   ` Huang, Kai
2024-02-29 23:06     ` Sean Christopherson
2024-02-29 23:21       ` Huang, Kai
2024-03-04 15:51         ` Sean Christopherson
2024-03-05 21:32           ` Huang, Kai
2024-03-06  0:25             ` Sean Christopherson
2024-02-28  2:41 ` [PATCH 09/16] KVM: x86/mmu: Move private vs. shared check above slot validity checks Sean Christopherson
2024-03-05 23:06   ` Huang, Kai
2024-03-06  0:38     ` Sean Christopherson
2024-03-06  1:22       ` Huang, Kai
2024-03-06  2:02         ` Sean Christopherson
2024-03-06 22:06           ` Huang, Kai
2024-03-06 23:49             ` Sean Christopherson
2024-03-07  0:28               ` Huang, Kai
2024-03-08  4:54   ` Xu Yilun
2024-03-08 23:28     ` Sean Christopherson
2024-03-11  4:43       ` Xu Yilun
2024-03-12  0:08         ` Sean Christopherson
2024-02-28  2:41 ` [PATCH 10/16] KVM: x86/mmu: Don't force emulation of L2 accesses to non-APIC internal slots Sean Christopherson
2024-03-07  0:03   ` Huang, Kai
2024-02-28  2:41 ` [PATCH 11/16] KVM: x86/mmu: Explicitly disallow private accesses to emulated MMIO Sean Christopherson
2024-03-06 22:35   ` Huang, Kai
2024-03-06 22:43     ` Sean Christopherson
2024-03-06 22:49       ` Huang, Kai
2024-03-06 23:01         ` Sean Christopherson
2024-03-06 23:20           ` Huang, Kai
2024-03-07 17:10         ` Kirill A. Shutemov
2024-03-08  0:09           ` Huang, Kai
2024-02-28  2:41 ` [PATCH 12/16] KVM: x86/mmu: Move slot checks from __kvm_faultin_pfn() to kvm_faultin_pfn() Sean Christopherson
2024-03-07  0:11   ` Huang, Kai
2024-02-28  2:41 ` [PATCH 13/16] KVM: x86/mmu: Handle no-slot faults at the beginning of kvm_faultin_pfn() Sean Christopherson
2024-03-07  0:48   ` Huang, Kai
2024-03-07  0:53     ` Sean Christopherson
2024-02-28  2:41 ` [PATCH 14/16] KVM: x86/mmu: Set kvm_page_fault.hva to KVM_HVA_ERR_BAD for "no slot" faults Sean Christopherson
2024-03-07  0:50   ` Huang, Kai
2024-03-07  1:01     ` Sean Christopherson
2024-02-28  2:41 ` [PATCH 15/16] KVM: x86/mmu: Initialize kvm_page_fault's pfn and hva to error values Sean Christopherson
2024-03-07  0:46   ` Huang, Kai
2024-02-28  2:41 ` [PATCH 16/16] KVM: x86/mmu: Sanity check that __kvm_faultin_pfn() doesn't create noslot pfns Sean Christopherson
2024-03-07  0:46   ` Huang, Kai
2024-04-17 12:48 ` [PATCH 00/16] KVM: x86/mmu: Page fault and MMIO cleanups Paolo Bonzini
2024-04-18 15:40   ` Sean Christopherson
2024-04-19  6:47   ` Xiaoyao Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).