1. 20 May, 2020 2 commits
  2. 19 May, 2020 7 commits
  3. 15 May, 2020 29 commits
  4. 13 May, 2020 2 commits
    • Sean Christopherson's avatar
      KVM: x86/mmu: Capture TDP level when updating CPUID · e93fd3b3
      Sean Christopherson authored
      Snapshot the TDP level now that it's invariant (SVM) or dependent only
      on host capabilities and guest CPUID (VMX).  This avoids having to call
      kvm_x86_ops.get_tdp_level() when initializing a TDP MMU and/or
      calculating the page role, and thus avoids the associated retpoline.
      
      Drop the WARN in vmx_get_tdp_level() as updating CPUID while L2 is
      active is legal, if dodgy.
      
      No functional change intended.
      Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
      Message-Id: <20200502043234.12481-11-sean.j.christopherson@intel.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      e93fd3b3
    • Sean Christopherson's avatar
      KVM: VMX: Move nested EPT out of kvm_x86_ops.get_tdp_level() hook · 0047fcad
      Sean Christopherson authored
      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: default avatarSean Christopherson <sean.j.christopherson@intel.com>
      Message-Id: <20200502043234.12481-10-sean.j.christopherson@intel.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      0047fcad