Re: [PATCH v2 6/8] KVM: SEV: Add SNP vCPU state get and set commands

Tony Lindgren <[email protected]>
Newsgroups org.kernel.vger.linux-doc,dev.linux.lists.coconut-svsm,org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest
Message-ID <aqzOUb1m-v-kG5v-@tlindgre-MOBL1>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.