lkml.org 
[lkml]   [2022]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v2 0/6] KVM: x86: Apply NX mitigation more precisely
    From
    On 7/23/22 03:23, Sean Christopherson wrote:
    > Patch 6 from Mingwei is the end goal of the series. KVM incorrectly
    > assumes that the NX huge page mitigation is the only scenario where KVM
    > will create a non-leaf page instead of a huge page. Precisely track
    > (via kvm_mmu_page) if a non-huge page is being forced and use that info
    > to avoid unnecessarily forcing smaller page sizes in
    > disallowed_hugepage_adjust().
    >
    > v2: Rebase, tweak a changelog accordingly.
    >
    > v1:https://lore.kernel.org/all/20220409003847.819686-1-seanjc@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

    Some of the benefits are cool, such as not having to track the pages for
    the TDP MMU, and patch 2 is a borderline bugfix, but there's quite a lot
    of new non-obvious complexity here.

    So the obligatory question is: is it worth a hundred lines of new code?

    Paolo

    \
     
     \ /
      Last update: 2022-07-28 22:18    [W:2.906 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site