Linux Documentation
 help / color / mirror / Atom feed
From: Tony Lindgren <tony.lindgren@linux.intel.com>
To: "Jörg Rödel" <joro@8bytes.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	Michael Roth <michael.roth@amd.com>,
	Liam Merwick <liam.merwick@oracle.com>,
	Vishal Annapurve <vannapurve@google.com>,
	Ninad Naik <ninadnaik07@gmail.com>,
	Joerg Roedel <joerg.roedel@amd.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	kvm@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	coconut-svsm@lists.linux.dev
Subject: Re: [PATCH v2 6/8] KVM: SEV: Add SNP vCPU state get and set commands
Date: Fri, 18 Sep 2026 08:38:25 +0300	[thread overview]
Message-ID: <aqzOUb1m-v-kG5v-@tlindgre-MOBL1> (raw)
In-Reply-To: <aqv-FtT1v1FjDZJD@8bytes.org>

On Thu, Sep 17, 2026 at 04:59:37PM +0200, Jörg Rödel wrote:
> Hi Tony,
> 
> On Thu, Sep 17, 2026 at 09:27:47AM +0300, Tony Lindgren wrote:
> > Oh OK, so calling for both hypervisor and confidential VCPU state would be
> > needed. The difference could be specified in the struct kvm_vcpu_transfer
> > flags?
> 
> Or hypervisor state is migrated outside of the CVM live migration interface? From QEMUs
> perspective it is not different to other state like for emulated devices and
> such. Does TDX also have per-cpu hypervisor state that needs to be migrated?
>
> In any case, for SNP this state must be settable from QEMU to correctly support
> IGVM loading, so an interface outside of live migration is needed :)

Oh OK so the per-cpu hypervisor state is part of the IGVM loading.

Yes the per-vcpu migration is a bit different for TDX. No two separate
steps like you're describing for vCPU migration (per-cpu for vCPU
registers and per-cpu for hypervisor state).

After stopping the TDX source, the VM state is migrated. And then the
per-cpu state. The per-vcpu state is just a QEMU VMState for TDX too,
and it needs the help of KVM to export the state into an encrypted blob.

  reply	other threads:[~2026-09-18  5:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 10:33 [PATCH v2 0/8] KVM: SVM: Support direct setting of VMSA for SEV-SNP guests Jörg Rödel
2026-09-08 10:33 ` [PATCH v2 1/8] KVM: SEV: Document SNP direct VMSA userspace ABI Jörg Rödel
2026-09-08 10:33 ` [PATCH v2 2/8] KVM: SVM: Implement GET_AP_APIC_IDS NAE event Jörg Rödel
2026-09-08 10:33 ` [PATCH v2 3/8] KVM: SVM: Hold SRCU while reloading guest-owned VMSAs Jörg Rödel
2026-09-08 10:33 ` [PATCH v2 4/8] KVM: SEV: Add direct VMSA capability Jörg Rödel
2026-09-08 10:33 ` [PATCH v2 5/8] KVM: SEV: Allow VMSA pages in SNP launch updates Jörg Rödel
2026-09-08 10:33 ` [PATCH v2 6/8] KVM: SEV: Add SNP vCPU state get and set commands Jörg Rödel
2026-09-15 11:30   ` Tony Lindgren
2026-09-16 16:31     ` Jörg Rödel
2026-09-17  6:27       ` Tony Lindgren
2026-09-17 14:59         ` Jörg Rödel
2026-09-18  5:38           ` Tony Lindgren [this message]
2026-09-08 10:33 ` [PATCH v2 7/8] KVM: selftests: Test the SNP APIC-ID-list GHCB request Jörg Rödel
2026-09-08 10:33 ` [PATCH v2 8/8] KVM: selftests: Test SNP vCPU state and direct VMSA launch Jörg Rödel

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=aqzOUb1m-v-kG5v-@tlindgre-MOBL1 \
    --to=tony.lindgren@linux.intel.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=coconut-svsm@lists.linux.dev \
    --cc=joerg.roedel@amd.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=liam.merwick@oracle.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=michael.roth@amd.com \
    --cc=ninadnaik07@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vannapurve@google.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