mbox series

[0/6] KVM: x86: Apply NX mitigation more precisely

Message ID 20220409003847.819686-1-seanjc@google.com (mailing list archive)
Headers show
Series KVM: x86: Apply NX mitigation more precisely | expand

Message

Sean Christopherson April 9, 2022, 12:38 a.m. UTC
This is just the kernel (NX) side of Mingwei's series "Verify dirty
logging works properly with page stats".  Relatively to v3 of Mingwei's
series[*], this fixes accounting (and tracking in the nonpaging case)
of disallowed NX huge pages.

I left off the selftests because I disagree with the "Dump stats" change,
and this has snowballed enough.

https://lore.kernel.org/all/20220401063636.2414200-1-mizhang@google.com

Mingwei Zhang (1):
  KVM: x86/mmu: explicitly check nx_hugepage in
    disallowed_hugepage_adjust()

Sean Christopherson (5):
  KVM: x86/mmu: Tag disallowed NX huge pages even if they're not tracked
  KVM: x86/mmu: Properly account NX huge page workaround for nonpaging
    MMUs
  KVM: x86/mmu: Set disallowed_nx_huge_page in TDP MMU before setting
    SPTE
  KVM: x86/mmu: Track the number of TDP MMU pages, but not the actual
    pages
  KVM: x86/mmu: Add helper to convert SPTE value to its shadow page

 arch/x86/include/asm/kvm_host.h |  17 ++----
 arch/x86/kvm/mmu.h              |   9 +++
 arch/x86/kvm/mmu/mmu.c          | 104 ++++++++++++++++++++++----------
 arch/x86/kvm/mmu/mmu_internal.h |  33 +++++-----
 arch/x86/kvm/mmu/paging_tmpl.h  |   6 +-
 arch/x86/kvm/mmu/spte.c         |  11 ++++
 arch/x86/kvm/mmu/spte.h         |  17 ++++++
 arch/x86/kvm/mmu/tdp_mmu.c      |  49 +++++++++------
 arch/x86/kvm/mmu/tdp_mmu.h      |   2 +
 9 files changed, 167 insertions(+), 81 deletions(-)


base-commit: 6521e072010d10380eca3d8a2203990e61e16ae0

Comments

Mingwei Zhang July 18, 2022, 5:30 a.m. UTC | #1
On Sat, Apr 09, 2022, Sean Christopherson wrote:
> This is just the kernel (NX) side of Mingwei's series "Verify dirty
> logging works properly with page stats".  Relatively to v3 of Mingwei's
> series[*], this fixes accounting (and tracking in the nonpaging case)
> of disallowed NX huge pages.
> 
> I left off the selftests because I disagree with the "Dump stats" change,
> and this has snowballed enough.

Hi Sean,

Ping on this one? This series might need a rebase and I can quickly
provide the review, since several issues are blocked by this. Or if you
are busy, I can help driving it.

Thanks.
-Mingwei

> 
> https://lore.kernel.org/all/20220401063636.2414200-1-mizhang@google.com
> 
> Mingwei Zhang (1):
>   KVM: x86/mmu: explicitly check nx_hugepage in
>     disallowed_hugepage_adjust()
> 
> Sean Christopherson (5):
>   KVM: x86/mmu: Tag disallowed NX huge pages even if they're not tracked
>   KVM: x86/mmu: Properly account NX huge page workaround for nonpaging
>     MMUs
>   KVM: x86/mmu: Set disallowed_nx_huge_page in TDP MMU before setting
>     SPTE
>   KVM: x86/mmu: Track the number of TDP MMU pages, but not the actual
>     pages
>   KVM: x86/mmu: Add helper to convert SPTE value to its shadow page
> 
>  arch/x86/include/asm/kvm_host.h |  17 ++----
>  arch/x86/kvm/mmu.h              |   9 +++
>  arch/x86/kvm/mmu/mmu.c          | 104 ++++++++++++++++++++++----------
>  arch/x86/kvm/mmu/mmu_internal.h |  33 +++++-----
>  arch/x86/kvm/mmu/paging_tmpl.h  |   6 +-
>  arch/x86/kvm/mmu/spte.c         |  11 ++++
>  arch/x86/kvm/mmu/spte.h         |  17 ++++++
>  arch/x86/kvm/mmu/tdp_mmu.c      |  49 +++++++++------
>  arch/x86/kvm/mmu/tdp_mmu.h      |   2 +
>  9 files changed, 167 insertions(+), 81 deletions(-)
> 
> 
> base-commit: 6521e072010d10380eca3d8a2203990e61e16ae0
> -- 
> 2.35.1.1178.g4f1659d476-goog
>
Sean Christopherson July 18, 2022, 4:09 p.m. UTC | #2
On Mon, Jul 18, 2022, Mingwei Zhang wrote:
> On Sat, Apr 09, 2022, Sean Christopherson wrote:
> > This is just the kernel (NX) side of Mingwei's series "Verify dirty
> > logging works properly with page stats".  Relatively to v3 of Mingwei's
> > series[*], this fixes accounting (and tracking in the nonpaging case)
> > of disallowed NX huge pages.
> > 
> > I left off the selftests because I disagree with the "Dump stats" change,
> > and this has snowballed enough.
> 
> Hi Sean,
> 
> Ping on this one? This series might need a rebase and I can quickly
> provide the review, since several issues are blocked by this.

Sorry, I didn't realize (or more likely, forgot) that there is stuff depending
on this series and had it lower on my todo list.  I'll get it rebased this week.