]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - arch/x86/kvm/cpuid.c
KVM: x86: fix backward migration with async_PF
authorRadim Krčmář <rkrcmar@redhat.com>
Thu, 1 Feb 2018 21:16:21 +0000 (22:16 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 15 Mar 2018 13:29:03 +0000 (08:29 -0500)
commite3d2ada7e7f903206ce96c9874f485f33a5afdd4
tree3651ce245f89585e8e1e72e00106866e9fbc5c93
parent86a5aa62add167bf36707856d265e927a64bfdca
KVM: x86: fix backward migration with async_PF

BugLink: http://bugs.launchpad.net/bugs/1755275
commit fe2a3027e74e40a3ece3a4c1e4e51403090a907a upstream.

Guests on new hypersiors might set KVM_ASYNC_PF_DELIVERY_AS_PF_VMEXIT
bit when enabling async_PF, but this bit is reserved on old hypervisors,
which results in a failure upon migration.

To avoid breaking different cases, we are checking for CPUID feature bit
before enabling the feature and nothing else.

Fixes: 52a5c155cf79 ("KVM: async_pf: Let guest support delivery of async_pf from guest mode")
Cc: <stable@vger.kernel.org>
Reviewed-by: Wanpeng Li <wanpengli@tencent.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[jwang: port to 4.14]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Documentation/virtual/kvm/cpuid.txt
Documentation/virtual/kvm/msr.txt
arch/x86/include/uapi/asm/kvm_para.h
arch/x86/kernel/kvm.c
arch/x86/kvm/cpuid.c