]> git.proxmox.com Git - mirror_qemu.git/commit - target/i386/kvm/kvm.c
KVM: add support for AMD nested live migration
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 May 2020 14:49:22 +0000 (10:49 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jul 2020 22:02:17 +0000 (18:02 -0400)
commitb16c0e20c74218f2d69710cedad11da7dd4d2190
tree2ee291426d0eb7c3bc541755eced1113f9fac0c2
parent418b0f93d12a1589d5031405de857844f32e9ccc
KVM: add support for AMD nested live migration

Support for nested guest live migration is part of Linux 5.8, add the
corresponding code to QEMU.  The migration format consists of a few
flags, is an opaque 4k blob.

The blob is in VMCB format (the control area represents the L1 VMCB
control fields, the save area represents the pre-vmentry state; KVM does
not use the host save area since the AMD manual allows that) but QEMU
does not really care about that.  However, the flags need to be
copied to hflags/hflags2 and back.

In addition, support for retrieving and setting the AMD nested virtualization
states allows the L1 guest to be reset while running a nested guest, but
a small bug in CPU reset needs to be fixed for that to work.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.c
target/i386/cpu.h
target/i386/kvm.c
target/i386/machine.c