Messages in this thread | | | From | Paolo Bonzini <> | Subject | [PATCH v3 0/2] KVM: x86: guest interface for SEV live migration | Date | Thu, 29 Apr 2021 06:47:05 -0400 |
| |
This is a reviewed version of the guest interface (hypercall+MSR) for SEV live migration. The differences lie mostly in the API for userspace. In particular:
- the CPUID feature is not exposed in KVM_GET_SUPPORTED_CPUID
- the hypercall must be enabled manually with KVM_ENABLE_CAP
- the MSR has sensible behavior if not filtered
Compared to v2, the KVM-provided behavior of the MSR is different: it is set to 0 if the guest memory is encrypted, and 1 if it is not. The idea is that the MSR is read-only if KVM_FEATURE_HC_PAGE_ENC_STATUS is not exposed to the guest (it should only be exposed if the guest has encrypted memory), but it also has a sensible value for non-encrypted guests. QEMU could however expose a "0" value for the special "-cpu host,migratable=no" mode if it wanted.
Because of this new behavior, the CPUID bit are split.
Paolo
Ashish Kalra (1): KVM: X86: Introduce KVM_HC_PAGE_ENC_STATUS hypercall
Paolo Bonzini (1): KVM: x86: add MSR_KVM_MIGRATION_CONTROL
Documentation/virt/kvm/api.rst | 14 +++++++ Documentation/virt/kvm/cpuid.rst | 9 +++++ Documentation/virt/kvm/hypercalls.rst | 21 ++++++++++ Documentation/virt/kvm/msr.rst | 14 +++++++ arch/x86/include/asm/kvm-x86-ops.h | 1 + arch/x86/include/asm/kvm_host.h | 3 ++ arch/x86/include/uapi/asm/kvm_para.h | 5 +++ arch/x86/kvm/cpuid.c | 3 +- arch/x86/kvm/svm/svm.c | 1 + arch/x86/kvm/vmx/vmx.c | 7 ++++ arch/x86/kvm/x86.c | 56 +++++++++++++++++++++++++++ include/uapi/linux/kvm.h | 1 + include/uapi/linux/kvm_para.h | 1 + 13 files changed, 135 insertions(+), 1 deletion(-)
-- 2.26.2
| |