]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: x86: Introduce kvm_mmu_calc_root_page_role()
authorJunaid Shahid <junaids@google.com>
Wed, 27 Jun 2018 21:59:07 +0000 (14:59 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Aug 2018 15:58:51 +0000 (17:58 +0200)
commit007cec40fd0e886bfbb4e856b619092b4fd608a3
treea2bf61809b372d8163c94c38f5daed48c5e5085c
parent8b8f2ab67e04cf8fbc8bf572b90986a71b66a4cc
kvm: x86: Introduce kvm_mmu_calc_root_page_role()

These functions factor out the base role calculation from the
corresponding kvm_init_*_mmu() functions. The new functions return
what would be the role assigned to a root page in the current VCPU
state. This can be masked with mmu_base_role_mask to derive the base
role.

Signed-off-by: Junaid Shahid <junaids@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c