mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxim Levitsky <mlevitsk@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, Jim Mattson <jmattson@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kvm list <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: nSVM: vmentry ignores EFER.LMA and possibly RFLAGS.VM
Date: Fri, 10 Jul 2020 11:37:13 +0300	[thread overview]
Message-ID: <f9570ac28fc1792b91ff6db29bc6bba5d4453607.camel@redhat.com> (raw)
In-Reply-To: <a341f7ca-4739-db84-74e0-27859bba9eeb@redhat.com>

On Thu, 2020-07-09 at 20:41 +0200, Paolo Bonzini wrote:
> On 09/07/20 20:40, Jim Mattson wrote:
> > On Thu, Jul 9, 2020 at 11:31 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
> > > On 09/07/20 20:28, Jim Mattson wrote:
> > > > > That said, the VMCB here is guest memory and it can change under our
> > > > > feet between nested_vmcb_checks and nested_prepare_vmcb_save.  Copying
> > > > > the whole save area is overkill, but we probably should copy at least
> > > > > EFER/CR0/CR3/CR4 in a struct at the beginning of nested_svm_vmrun; this
> > > > > way there'd be no TOC/TOU issues between nested_vmcb_checks and
> > > > > nested_svm_vmrun.  This would also make it easier to reuse the checks in
> > > > > svm_set_nested_state.  Maybe Maxim can look at it while I'm on vacation,
> > > > > as he's eager to do more nSVM stuff. :D
> > > > 
> > > > I fear that nested SVM is rife with TOCTTOU issues.
> > > 
> > > I am pretty sure about that, actually. :)
> > > 
> > > Another possibility to stomp them in a more efficient manner could be to
> > > rely on the dirty flags, and use them to set up an in-memory copy of the
> > > VMCB.
> > 
> > That sounds like a great idea! Is Maxim going to look into that?
> > 
> 
> Now he is!

Yep :-)

Best regards,
	Maxim Levitsky

> 
> Paolo
> 



      reply	other threads:[~2020-07-10  8:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09  9:55 Paolo Bonzini
2020-07-09 17:12 ` Jim Mattson
2020-07-09 17:25   ` Paolo Bonzini
2020-07-09 18:28     ` Jim Mattson
2020-07-09 18:31       ` Paolo Bonzini
2020-07-09 18:40         ` Jim Mattson
2020-07-09 18:41           ` Paolo Bonzini
2020-07-10  8:37             ` Maxim Levitsky [this message]

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=f9570ac28fc1792b91ff6db29bc6bba5d4453607.camel@redhat.com \
    --to=mlevitsk@redhat.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.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®