From: Maxim Levitsky <mlevitsk@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
kvm@vger.kernel.org
Cc: Sean Christopherson <seanjc@google.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>,
Cathy Avery <cavery@redhat.com>,
Emanuele Giuseppe Esposito <eesposit@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] KVM: nSVM: Fix L1 state corruption upon return from SMM
Date: Wed, 23 Jun 2021 14:39:34 +0300 [thread overview]
Message-ID: <2eaa94bcc697fec92d994146f7c69625b6a84cd0.camel@redhat.com> (raw)
In-Reply-To: <a3918bfa-7b4f-c31a-448a-aa22a44d4dfd@redhat.com>
On Wed, 2021-06-23 at 11:39 +0200, Paolo Bonzini wrote:
> On 23/06/21 09:44, Vitaly Kuznetsov wrote:
> > - RFC: I'm not 100% sure my 'smart' idea to use currently-unused HSAVE area
> > is that smart. Also, we don't even seem to check that L1 set it up upon
> > nested VMRUN so hypervisors which don't do that may remain broken. A very
> > much needed selftest is also missing.
>
> It's certainly a bit weird, but I guess it counts as smart too. It
> needs a few more comments, but I think it's a good solution.
>
> One could delay the backwards memcpy until vmexit time, but that would
> require a new flag so it's not worth it for what is a pretty rare and
> already expensive case.
>
> Paolo
>
I wonder what would happen if SMM entry is triggered by L1 (say with ICR),
on a VCPU which is in L2. Such exit should go straight to L1 SMM mode.
I will very very soon, maybe even today start testing SMM with my migration
tests and such. I hope I will find more bugs in this area.
Thanks for fixing this issue!
Best regards,
Maxim Levitsky
next prev parent reply other threads:[~2021-06-23 11:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 7:44 [PATCH RFC] KVM: nSVM: Fix L1 state corruption upon return from SMM Vitaly Kuznetsov
2021-06-23 9:39 ` Paolo Bonzini
2021-06-23 11:39 ` Maxim Levitsky [this message]
2021-06-23 12:00 ` Paolo Bonzini
2021-06-23 13:01 ` Maxim Levitsky
2021-06-23 13:07 ` Maxim Levitsky
2021-06-23 13:32 ` Vitaly Kuznetsov
2021-06-23 14:41 ` Maxim Levitsky
2021-06-23 16:10 ` Sean Christopherson
2021-06-23 16:21 ` Sean Christopherson
2021-06-23 20:37 ` Paolo Bonzini
2021-06-24 7:41 ` Vitaly Kuznetsov
2021-06-24 8:20 ` Maxim Levitsky
2021-06-24 10:38 ` Paolo Bonzini
2021-06-24 14:32 ` Tom Lendacky
2021-06-24 15:36 ` Maxim Levitsky
2021-06-23 13:21 ` Paolo Bonzini
2021-06-23 14:06 ` 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=2eaa94bcc697fec92d994146f7c69625b6a84cd0.camel@redhat.com \
--to=mlevitsk@redhat.com \
--cc=cavery@redhat.com \
--cc=eesposit@redhat.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
/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;
as well as URLs for NNTP newsgroup(s).