All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] KVM: nSVM: ondemand nested state allocation
@ 2020-09-21 13:19 Maxim Levitsky
  2020-09-21 13:19 ` [PATCH v5 1/4] KVM: x86: xen_hvm_config: cleanup return values Maxim Levitsky
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Maxim Levitsky @ 2020-09-21 13:19 UTC (permalink / raw)
  To: kvm
  Cc: Vitaly Kuznetsov, H. Peter Anvin, Joerg Roedel, Ingo Molnar,
	Sean Christopherson,
	maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), Wanpeng Li,
	Borislav Petkov, Jim Mattson, linux-kernel, Paolo Bonzini,
	Thomas Gleixner, Maxim Levitsky

This is yet another version of ondemand nested state allocation.

In this version I adoped the suggestion of Sean Christopherson
to return make EFER write return a negative error which then should
propogate to the userspace.

So I fixed the WRMSR code to actually obey this (#GP on positive
return value, exit to userspace when negative error value,
and success on 0 error value, and fixed one user (xen)
that returned negative error code on failures.

The XEN patch is only compile tested. The rest were tested
by always returning -ENOMEM from svm_allocate_nested.

Best regards,
	Maxim Levitsky

Maxim Levitsky (4):
  KVM: x86: xen_hvm_config cleanup return values
  KVM: x86: report negative values from wrmsr to userspace
  KVM: x86: allow kvm_x86_ops.set_efer to return a value
  KVM: nSVM: implement ondemand allocation of the nested state

 arch/x86/include/asm/kvm_host.h |  2 +-
 arch/x86/kvm/emulate.c          |  7 ++--
 arch/x86/kvm/svm/nested.c       | 42 ++++++++++++++++++++++++
 arch/x86/kvm/svm/svm.c          | 58 +++++++++++++++++++--------------
 arch/x86/kvm/svm/svm.h          |  8 ++++-
 arch/x86/kvm/vmx/vmx.c          |  9 +++--
 arch/x86/kvm/x86.c              | 36 ++++++++++----------
 7 files changed, 113 insertions(+), 49 deletions(-)

-- 
2.26.2



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

end of thread, other threads:[~2020-09-22 16:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-21 13:19 [PATCH v5 0/4] KVM: nSVM: ondemand nested state allocation Maxim Levitsky
2020-09-21 13:19 ` [PATCH v5 1/4] KVM: x86: xen_hvm_config: cleanup return values Maxim Levitsky
2020-09-21 13:19 ` [PATCH v5 2/4] KVM: x86: report negative values from wrmsr to userspace Maxim Levitsky
2020-09-21 16:08   ` Sean Christopherson
2020-09-22 16:13     ` Maxim Levitsky
2020-09-21 13:19 ` [PATCH v5 3/4] KVM: x86: allow kvm_x86_ops.set_efer to return a value Maxim Levitsky
     [not found]   ` <20200921154151.GA23807@linux.intel.com>
2020-09-22 16:05     ` Maxim Levitsky
2020-09-21 13:19 ` [PATCH v5 4/4] KVM: nSVM: implement ondemand allocation of the nested state Maxim Levitsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.