]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Refactor the per-slot level calculation in mapping_level()
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 6 Dec 2019 23:57:19 +0000 (15:57 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jan 2020 17:16:04 +0000 (18:16 +0100)
commitaa44ac3819bf3e782c43c23ad66ebef10ad66d93
tree9c0431f7b6af26983b3ac4956031b03a2ad3497a
parent987854d69ae61615b4b31198ff09775271e2417d
KVM: x86/mmu: Refactor the per-slot level calculation in mapping_level()

Invert the loop which adjusts the allowed page level based on what's
compatible with the associated memslot to use a largest-to-smallest
page size walk.  This paves the way for passing around a "max level"
variable instead of having redundant checks and/or multiple booleans.

No functional change intended.

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