KVM: x86/mmu: Capture requested page level before NX huge page workaround
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 23 Sep 2020 18:37:31 +0000 (11:37 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 28 Sep 2020 11:57:41 +0000 (07:57 -0400)
commit3cf066127e8754f680ecb3b63ad7dd6949e5e54c
tree675b86de29739d906c583e795657c1724d7653c3
parent6c2fd34f5c7970915f040b502563cf339fb661cd
KVM: x86/mmu: Capture requested page level before NX huge page workaround

Apply the "huge page disallowed" adjustment of the max level only after
capturing the original requested level.  The requested level will be
used in a future patch to skip adding pages to the list of disallowed
huge pages if a huge page wasn't possible anyways, e.g. if the page
isn't mapped as a huge page in the host.

No functional change intended.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200923183735.584-5-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/paging_tmpl.h