1. 01 Oct, 2021 1 commit
    • Paolo Bonzini's avatar
      KVM: x86: SVM: don't set VMLOAD/VMSAVE intercepts on vCPU reset · 36e8194d
      Paolo Bonzini authored
      Commit adc2a237 ("KVM: nSVM: improve SYSENTER emulation on AMD"),
      made init_vmcb set vmload/vmsave intercepts unconditionally,
      and relied on svm_vcpu_after_set_cpuid to clear them when possible.
      
      However init_vmcb is also called when the vCPU is reset, and it is
      not followed by another call to svm_vcpu_after_set_cpuid because
      the CPUID is already set.  This mistake makes the VMSAVE/VMLOAD intercept
      to be set when it is not needed, and harms performance of the nested
      guest.
      
      Extract the relevant parts of svm_vcpu_after_set_cpuid so that they
      can be called again on reset.
      
      Fixes: adc2a237 ("KVM: nSVM: improve SYSENTER emulation on AMD")
      Signed-off-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      36e8194d
  2. 30 Sep, 2021 38 commits
  3. 28 Sep, 2021 1 commit