kvm: x86: mmu: Recovery of shattered NX large pages
authorJunaid Shahid <junaids@google.com>
Mon, 4 Nov 2019 19:26:00 +0000 (20:26 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 4 Nov 2019 19:26:00 +0000 (20:26 +0100)
commit1aa9b9572b10529c2e64e2b8f44025d86e124308
tree8986b81fe6ccb070a657d3f37b1963a790890c21
parentc57c80467f90e5504c8df9ad3555d2c78800bf94
kvm: x86: mmu: Recovery of shattered NX large pages

The page table pages corresponding to broken down large pages are zapped in
FIFO order, so that the large page can potentially be recovered, if it is
not longer being used for execution.  This removes the performance penalty
for walking deeper EPT page tables.

By default, one large page will last about one hour once the guest
reaches a steady state.

Signed-off-by: Junaid Shahid <junaids@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Documentation/admin-guide/kernel-parameters.txt
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c
arch/x86/kvm/mmu.h
arch/x86/kvm/x86.c
virt/kvm/kvm_main.c