]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Split out max mapping level calculation to helper
authorSean Christopherson <seanjc@google.com>
Sat, 13 Feb 2021 00:50:04 +0000 (16:50 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 Feb 2021 08:08:11 +0000 (03:08 -0500)
commitf8b560fbb30847a619fc896d57e1920e414f8bc3
tree823839c2cad23e0ed51db9ad41fdd3eb4e335f4c
parent7d254d331f1dce3567362b28cab29c5db5825200
KVM: x86/mmu: Split out max mapping level calculation to helper

Factor out the logic for determining the maximum mapping level given a
memslot and a gpa.  The helper will be used when zapping collapsible
SPTEs when disabling dirty logging, e.g. to avoid zapping SPTEs that
can't possibly be rebuilt as hugepages.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210213005015.1651772-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/mmu_internal.h