mbox series

[v2,0/7] KVM: nVMX: Bug fixes and cleanup

Message ID 20200923184452.980-1-sean.j.christopherson@intel.com (mailing list archive)
Headers show
Series KVM: nVMX: Bug fixes and cleanup | expand

Message

Sean Christopherson Sept. 23, 2020, 6:44 p.m. UTC
Fix for a brutal segment caching bug that manifested as random nested
VM-Enter failures when running with unrestricted guest disabled.  A few
more bug fixes and cleanups for stuff found by inspection when hunting
down the caching issue.

v2:
  - Rebased to kvm/queue, commit e1ba1a15af73 ("KVM: SVM: Enable INVPCID
    feature on AMD").

Sean Christopherson (7):
  KVM: nVMX: Reset the segment cache when stuffing guest segs
  KVM: nVMX: Reload vmcs01 if getting vmcs12's pages fails
  KVM: nVMX: Explicitly check for valid guest state for !unrestricted
    guest
  KVM: nVMX: Move free_nested() below vmx_switch_vmcs()
  KVM: nVMX: Ensure vmcs01 is the loaded VMCS when freeing nested state
  KVM: nVMX: Drop redundant VMCS switch and free_nested() call
  KVM: nVMX: WARN on attempt to switch the currently loaded VMCS

 arch/x86/kvm/vmx/nested.c | 103 ++++++++++++++++++++------------------
 arch/x86/kvm/vmx/vmx.c    |   8 +--
 arch/x86/kvm/vmx/vmx.h    |   9 ++++
 3 files changed, 65 insertions(+), 55 deletions(-)

Comments

Paolo Bonzini Sept. 25, 2020, 9:35 p.m. UTC | #1
On 23/09/20 20:44, Sean Christopherson wrote:
> Fix for a brutal segment caching bug that manifested as random nested
> VM-Enter failures when running with unrestricted guest disabled.  A few
> more bug fixes and cleanups for stuff found by inspection when hunting
> down the caching issue.
> 
> v2:
>   - Rebased to kvm/queue, commit e1ba1a15af73 ("KVM: SVM: Enable INVPCID
>     feature on AMD").
> 
> Sean Christopherson (7):
>   KVM: nVMX: Reset the segment cache when stuffing guest segs
>   KVM: nVMX: Reload vmcs01 if getting vmcs12's pages fails
>   KVM: nVMX: Explicitly check for valid guest state for !unrestricted
>     guest
>   KVM: nVMX: Move free_nested() below vmx_switch_vmcs()
>   KVM: nVMX: Ensure vmcs01 is the loaded VMCS when freeing nested state
>   KVM: nVMX: Drop redundant VMCS switch and free_nested() call
>   KVM: nVMX: WARN on attempt to switch the currently loaded VMCS
> 
>  arch/x86/kvm/vmx/nested.c | 103 ++++++++++++++++++++------------------
>  arch/x86/kvm/vmx/vmx.c    |   8 +--
>  arch/x86/kvm/vmx/vmx.h    |   9 ++++
>  3 files changed, 65 insertions(+), 55 deletions(-)
> 

Queued, thanks.

Paolo