[PATCH v5 0/4] KVM: nSVM: ondemand nested state allocation
From: Maxim Levitsky
Date: Mon Sep 21 2020 - 09:19:37 EST
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