mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Sean Christopherson <seanjc@google.com>,
	Maxim Levitsky <mlevitsk@redhat.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.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, kvm@vger.kernel.org
Subject: Re: [PATCH RFC] KVM: nSVM: Fix L1 state corruption upon return from SMM
Date: Wed, 23 Jun 2021 22:37:53 +0200	[thread overview]
Message-ID: <82327cd1-92ca-9f6b-3af0-8215e9d21eae@redhat.com> (raw)
In-Reply-To: <YNNfnLsc+3qMsdlN@google.com>

On 23/06/21 18:21, Sean Christopherson wrote:
> On Wed, Jun 23, 2021, Sean Christopherson wrote:
>> And I believe this hackery is necessary only because nested_svm_vmexit() isn't
>> following the architcture in the first place.  I.e. using vmcb01 to restore
>> host state is flat out wrong.
> 
> Ah, that's not true, using vmcb01 is allowed by "may store some or all host state
> in hidden on-chip memory".

And also, "Different implementations may choose to save the hidden parts 
of the host’s segment registers as well as the selectors".

>  From a performance perspective, I do like the SMI/RSM shenanigans.  I'm not
> totally opposed to the trickery since I think it will break a guest if and only
> if the L1 guest is also violating the APM.  And we're not fudging the spec thaat
> much :-)

Yeah, that was my reasoning as well.  Any reference to "hidden on-chip 
memory", plus the forbidding modifications of the host save area, sort 
of implies that the processor can actually flush that hidden on-chip 
memory for whatever reason (such as on some sleep states?!?).

Paolo


  reply	other threads:[~2021-06-23 20:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23  7:44 Vitaly Kuznetsov
2021-06-23  9:39 ` Paolo Bonzini
2021-06-23 11:39   ` Maxim Levitsky
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 [this message]
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=82327cd1-92ca-9f6b-3af0-8215e9d21eae@redhat.com \
    --to=pbonzini@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=mlevitsk@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

all inboxes | Powered by JetHome®