x86/kvm/mmu: check if tdp/shadow MMU reconfiguration is needed
authorVitaly Kuznetsov <vkuznets@redhat.com>
Mon, 8 Oct 2018 19:28:12 +0000 (21:28 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Oct 2018 22:30:06 +0000 (00:30 +0200)
commit7dcd575520082f186231777f4ac9f59ce14d6961
tree927d359330cc04e9952c1c44eb9e4620a67af53e
parenta336282d7753a92ced7b8e52ff959929f6e550ff
x86/kvm/mmu: check if tdp/shadow MMU reconfiguration is needed

MMU reconfiguration in init_kvm_tdp_mmu()/kvm_init_shadow_mmu() can be
avoided if the source data used to configure it didn't change; enhance
MMU extended role with the required fields and consolidate common code in
kvm_calc_mmu_role_common().

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c