From: Paolo Bonzini <pbonzini@redhat.com>
To: Maxim Levitsky <mlevitsk@redhat.com>, kvm@vger.kernel.org
Cc: Sean Christopherson <sean.j.christopherson@intel.com>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@vger.kernel.org>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, Jim Mattson <jmattson@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Joerg Roedel <joro@8bytes.org>,
Wanpeng Li <wanpengli@tencent.com>
Subject: Re: [PATCH v3 8/8] KVM: nSVM: implement ondemand allocation of the nested state
Date: Sat, 12 Sep 2020 18:32:37 +0200 [thread overview]
Message-ID: <58f9d2c1-0739-5b72-ee21-285474666c58@redhat.com> (raw)
In-Reply-To: <20200827171145.374620-9-mlevitsk@redhat.com>
On 27/08/20 19:11, Maxim Levitsky wrote:
> + hsave_page = alloc_page(GFP_KERNEL_ACCOUNT | __GFP_ZERO);
> + if (!hsave_page)
> + goto error;
> +
I think an error here should be just an internal error userspace exit,
or a -ENOMEM from KVM_RUN; not a #GP in the guest[1]. However, that's
difficult to plug into KVM. Can you instead allocate nested state if
KVM_SET_CPUID2 sets the SVM bit? Returning -ENOMEM from KVM_SET_CPUID2
is more likely to be something that userspace copes with.
I queued patches 1-5, and 7 for 5.9-rc.
Paolo
[1] Though in practice an order 0 allocation will never fail
next prev parent reply other threads:[~2020-09-12 16:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 17:11 [PATCH v3 0/8] KVM: nSVM: ondemand nested state allocation + smm fixes Maxim Levitsky
2020-08-27 17:11 ` [PATCH v3 1/8] KVM: SVM: rename a variable in the svm_create_vcpu Maxim Levitsky
2020-08-27 17:11 ` [PATCH v3 2/8] KVM: nSVM: rename nested vmcb to vmcb12 Maxim Levitsky
2020-08-27 17:11 ` [PATCH v3 3/8] KVM: SVM: refactor msr permission bitmap allocation Maxim Levitsky
2020-08-27 17:11 ` [PATCH v3 4/8] KVM: SVM: use __GFP_ZERO instead of clear_page Maxim Levitsky
2020-08-27 17:11 ` [PATCH v3 5/8] KVM: SVM: refactor exit labels in svm_create_vcpu Maxim Levitsky
2020-08-27 17:11 ` [PATCH v3 6/8] KVM: x86: allow kvm_x86_ops.set_efer to return a value Maxim Levitsky
2020-08-27 17:11 ` [PATCH v3 7/8] KVM: emulator: more strict rsm checks Maxim Levitsky
2020-08-27 17:11 ` [PATCH v3 8/8] KVM: nSVM: implement ondemand allocation of the nested state Maxim Levitsky
2020-09-12 16:32 ` Paolo Bonzini [this message]
2020-09-13 19:57 ` 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=58f9d2c1-0739-5b72-ee21-285474666c58@redhat.com \
--to=pbonzini@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=mlevitsk@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
all inboxes | Powered by JetHome®