From: Maxim Levitsky <mlevitsk@redhat.com>
To: kvm@vger.kernel.org
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>, Joerg Roedel <joro@8bytes.org>,
Ingo Molnar <mingo@redhat.com>,
Sean Christopherson <sean.j.christopherson@intel.com>,
x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)),
Wanpeng Li <wanpengli@tencent.com>,
Borislav Petkov <bp@alien8.de>, Jim Mattson <jmattson@google.com>,
linux-kernel@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Maxim Levitsky <mlevitsk@redhat.com>
Subject: [PATCH v5 0/4] KVM: nSVM: ondemand nested state allocation
Date: Mon, 21 Sep 2020 16:19:19 +0300 [thread overview]
Message-ID: <20200921131923.120833-1-mlevitsk@redhat.com> (raw)
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
next reply other threads:[~2020-09-21 13:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 13:19 Maxim Levitsky [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200921131923.120833-1-mlevitsk@redhat.com \
--to=mlevitsk@redhat.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox