diff options
author | Sean Christopherson <sean.j.christopherson@intel.com> | 2020-05-02 06:32:33 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-05-13 18:15:13 +0200 |
commit | 0047fcade4cb1204cafdf62150081a39356f4dbd (patch) | |
tree | 46f9d0e157f25fcbc552bb60a17067248bc39f45 /net/xfrm/xfrm_sysctl.c | |
parent | KVM: VMX: Add proper cache tracking for CR0 (diff) | |
download | linux-0047fcade4cb1204cafdf62150081a39356f4dbd.tar.xz linux-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 'net/xfrm/xfrm_sysctl.c')
0 files changed, 0 insertions, 0 deletions