kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Yu Zhang <yu.c.zhang@linux.intel.com>
Cc: Maxim Levitsky <mlevitsk@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH 08/12] KVM: nSVM: Use KVM-governed feature framework to track "vVM{SAVE,LOAD} enabled"
Date: Tue, 7 Mar 2023 16:32:50 +0000	[thread overview]
Message-ID: <ZAdmecm4Pp7pT3jM@google.com> (raw)
In-Reply-To: <20230227065437.j7f7rfadut532fud@linux.intel.com>

On Mon, Feb 27, 2023, Yu Zhang wrote:
> On Fri, Feb 24, 2023 at 08:16:40AM -0800, Sean Christopherson wrote:
> > On Fri, Feb 24, 2023, Yu Zhang wrote:
> > > But why it is related to nested migration? 
> > 
> > I understand why it's related, but I don't understand why we bothered to add "support"
> > for this.
> > 
> > In theory, if L1 is migrated by L0 while L1 is running an L2 that uses SYSENTER,
> > problems will occur.  I'm a bit lost as to how this matters in practice, as KVM
> > doesn't support cross-vendor nested virtualization, and if L1 can be enlightened
> > to the point where it can switch from VMX=>SVM during migration, what's the point
> > of doing a migration?
> 
> Oh. So that is what people call "nested migration". I had thought "nested
> migration" is to migrate L2. Instead, it is still a migration of L1 with
> VMX/SVM capability... :(

More or less, yes.  I personally would prefer a less ambiguous description, e.g.
"migration with nested VMs", but unfortunately I can't mind control others :-)
 
> Is it a possible scenario that:
> 1> A L1 VM is created on Intel platform, with VMX capability virtualized
> to it.
> 2> The SYSENTER_EIP/ESP is set to a 64-bit value in L1.
> 3> Before creating a L2 VM, this L1 VM is migrated to a AMD machine.
> 4> The migrated L1 VM is exposed with SVM capability.
> 5> And then when L1 tries to create L2, the virtual vmload/vmsave shall
> be disabled.
> 
> But is step 4> a valid operation in KVM?   

It's valid in KVM (as L0), but I don't see how L1 can handle it cleanly without
an absurd level of enlightenment.  And if L1 is highly enlightened, I don't see
why it's desirable to do cross-vendor migration of the VM.

  parent reply	other threads:[~2023-03-07 16:35 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 23:10 [PATCH 00/12] KVM: x86: Add "governed" X86_FEATURE framework Sean Christopherson
2023-02-17 23:10 ` [PATCH 01/12] KVM: x86: Add a framework for enabling KVM-governed x86 features Sean Christopherson
2023-02-21 17:12   ` Vitaly Kuznetsov
2023-06-29  2:40   ` Binbin Wu
2023-06-29 16:26     ` Sean Christopherson
2023-06-30  8:01   ` Chao Gao
2023-06-30 15:31     ` Sean Christopherson
2023-02-17 23:10 ` [PATCH 02/12] KVM: x86/mmu: Use KVM-governed feature framework to track "GBPAGES enabled" Sean Christopherson
2023-02-17 23:10 ` [PATCH 03/12] KVM: VMX: Recompute "XSAVES enabled" only after CPUID update Sean Christopherson
2023-02-17 23:10 ` [PATCH 04/12] KVM: VMX: Rename XSAVES control to follow KVM's preferred "ENABLE_XYZ" Sean Christopherson
2023-02-17 23:10 ` [PATCH 05/12] KVM: x86: Use KVM-governed feature framework to track "XSAVES enabled" Sean Christopherson
2023-02-21 14:56   ` Yu Zhang
2023-02-22 18:56     ` Sean Christopherson
2023-02-24  9:54       ` Yu Zhang
2023-02-17 23:10 ` [PATCH 06/12] KVM: nSVM: Use KVM-governed feature framework to track "NRIPS enabled" Sean Christopherson
2023-02-17 23:10 ` [PATCH 07/12] KVM: nSVM: Use KVM-governed feature framework to track "TSC scaling enabled" Sean Christopherson
2023-02-17 23:10 ` [PATCH 08/12] KVM: nSVM: Use KVM-governed feature framework to track "vVM{SAVE,LOAD} enabled" Sean Christopherson
2023-02-21 15:23   ` Yu Zhang
2023-02-21 15:33     ` Yu Zhang
2023-02-21 23:48       ` Sean Christopherson
2023-02-22  6:49         ` Yu Zhang
2023-02-22 16:39           ` Sean Christopherson
2023-02-24  9:25             ` Yu Zhang
2023-02-24 16:16               ` Sean Christopherson
     [not found]                 ` <20230227065437.j7f7rfadut532fud@linux.intel.com>
2023-03-07 16:32                   ` Sean Christopherson [this message]
2023-06-29 16:50             ` Sean Christopherson
2023-06-30 10:00               ` Yu Zhang
2023-02-17 23:10 ` [PATCH 09/12] KVM: nSVM: Use KVM-governed feature framework to track "LBRv enabled" Sean Christopherson
2023-02-17 23:10 ` [PATCH 10/12] KVM: nSVM: Use KVM-governed feature framework to track "Pause Filter enabled" Sean Christopherson
2023-02-17 23:10 ` [PATCH 11/12] KVM: nSVM: Use KVM-governed feature framework to track "vGIF enabled" Sean Christopherson
2023-02-17 23:10 ` [PATCH 12/12] KVM: x86: Disallow guest CPUID lookups when IRQs are disabled Sean Christopherson

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=ZAdmecm4Pp7pT3jM@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=mlevitsk@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=vkuznets@redhat.com \
    --cc=yu.c.zhang@linux.intel.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).