+26
−13
+40
−19
Loading
Track possible NX huge pages for the TDP MMU separately from Shadow MMUs in anticipation of doing recovery for the TDP MMU while holding mmu_lock for read instead of write. Use a small structure to hold the list of pages along with the number of pages/entries in the list, as relying on kvm->stat.nx_lpage_splits to calculating the number of pages to recover would result in over-zapping when both TDP and Shadow MMUs are active. Suggested-by:Sean Christopherson <seanjc@google.com> Suggested-by:
David Matlack <dmatlack@google.com> Signed-off-by:
Vipin Sharma <vipinsh@google.com> Co-developed-by:
James Houghton <jthoughton@google.com> Signed-off-by:
James Houghton <jthoughton@google.com> Link: https://lore.kernel.org/r/20250707224720.4016504-2-jthoughton@google.com [sean: rewrite changelog, use #ifdef instead of dummy KVM_TDP_MMU #define] Signed-off-by:
Sean Christopherson <seanjc@google.com>