linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] KVM: nSVM: few random fixes
@ 2021-01-07  9:38 Maxim Levitsky
  2021-01-07  9:38 ` [PATCH v2 1/4] KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit Maxim Levitsky
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Maxim Levitsky @ 2021-01-07  9:38 UTC (permalink / raw)
  To: kvm
  Cc: Vitaly Kuznetsov, H. Peter Anvin, Sean Christopherson,
	Borislav Petkov, Paolo Bonzini, Thomas Gleixner, linux-kernel,
	maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	Ingo Molnar, Wanpeng Li, Joerg Roedel, Jim Mattson,
	Maxim Levitsky

This is a series of fixes to nested SVM, that finally makes my kvm on kvm
stress test pass, and fix various other issues/regressions.

Patch 1 is a fix for recent regression related to code that delayed the nested
msr bitmap processing to the next vm entry, and started to crash the L1 after
my on demand nested state allocation patches.

The problem was that the code assumed that we will still be in the nested
guest mode on next vmentry after setting the nested state, but a pending event
can cause a nested vmexit prior to that.

Patch 2 makes KVM restore nested_run_pending flag on migration which fixes
various issues including potentially missed L1->L2 event injection
if migration happens while nested run is pending.

Patches 3,4 are few things I found while reviewing the nested migration code.
I don't have a reproducer for them.

Thanks a lot to Sean Christopherson for the review feedback on V1 of this
series, which is fully incorporated in this series.

Best regards,
	Maxim Levitsky

Maxim Levitsky (4):
  KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit
  KVM: nSVM: correctly restore nested_run_pending on migration
  KVM: nSVM: always leave the nested state first on KVM_SET_NESTED_STATE
  KVM: nSVM: mark vmcb as dirty when forcingly leaving the guest mode

 arch/x86/kvm/svm/nested.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-01-07 21:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07  9:38 [PATCH v2 0/4] KVM: nSVM: few random fixes Maxim Levitsky
2021-01-07  9:38 ` [PATCH v2 1/4] KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit Maxim Levitsky
2021-01-07 17:00   ` Sean Christopherson
2021-01-07 17:51     ` Paolo Bonzini
2021-01-07 17:59       ` Paolo Bonzini
2021-01-07 18:03       ` Maxim Levitsky
2021-01-07 19:12       ` Sean Christopherson
2021-01-07  9:38 ` [PATCH v2 2/4] KVM: nSVM: correctly restore nested_run_pending on migration Maxim Levitsky
2021-01-07 18:03   ` Paolo Bonzini
2021-01-07 20:19     ` Sean Christopherson
2021-01-07 21:05       ` Paolo Bonzini
2021-01-07  9:38 ` [PATCH v2 3/4] KVM: nSVM: always leave the nested state first on KVM_SET_NESTED_STATE Maxim Levitsky
2021-01-07  9:38 ` [PATCH v2 4/4] KVM: nSVM: mark vmcb as dirty when forcingly leaving the guest mode Maxim Levitsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).