summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2020-05-01 21:32:33 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2020-05-13 12:15:13 -0400
commit0047fcade4cb1204cafdf62150081a39356f4dbd (patch)
tree46f9d0e157f25fcbc552bb60a17067248bc39f45 /arch/x86/include/asm/kvm_host.h
parentbd31fe495d0d1a67fe6f44f06dfef637f202241d (diff)
downloadlwn-0047fcade4cb1204cafdf62150081a39356f4dbd.tar.gz
lwn-0047fcade4cb1204cafdf62150081a39356f4dbd.zip
KVM: VMX: Move nested EPT out of kvm_x86_ops.get_tdp_level() hook
Separate the "core" TDP level handling from the nested EPT path to make it clear that kvm_x86_ops.get_tdp_level() is used if and only if nested EPT is not in use (kvm_init_shadow_ept_mmu() calculates the level from the passed in vmcs12->eptp). Add a WARN_ON() to enforce that the kvm_x86_ops hook is not called for nested EPT. This sets the stage for snapshotting the non-"nested EPT" TDP page level during kvm_cpuid_update() to avoid the retpoline associated with kvm_x86_ops.get_tdp_level() when resetting the MMU, a relatively frequent operation when running a nested guest. No functional change intended. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Message-Id: <20200502043234.12481-10-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
0 files changed, 0 insertions, 0 deletions