]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Use common macros to compute 32/64-bit paging masks
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 15 Jun 2022 14:15:56 +0000 (10:15 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 20 Jun 2022 10:21:29 +0000 (06:21 -0400)
commit91699586329f3590662fa0adbab57b2297481619
tree66914d1e9be136434399c98bae9498b10547e385
parentcae4b40b5fe7650ba0a8b7437d7082f4f5e5bada
KVM: x86/mmu: Use common macros to compute 32/64-bit paging masks

Dedup the code for generating (most of) the per-type PT_* masks in
paging_tmpl.h.  The relevant macros only vary based on the number of bits
per level, and that smidge of info is already provided in a common form
as PT_LEVEL_BITS.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220614233328.3896033-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/paging.h
arch/x86/kvm/mmu/paging_tmpl.h