diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2022-01-17 18:05:40 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-01-17 20:29:41 +0300 |
commit | c6617c61e8fe44b9e9fdfede921f61cac6b5149d (patch) | |
tree | 0600727b137c2b9cd3b5096bfb7b205e6f522277 /tools/testing/selftests/kvm/Makefile | |
parent | ee3a5f9e3d9bf94159f3cc80da542fbe83502dd8 (diff) | |
download | linux-c6617c61e8fe44b9e9fdfede921f61cac6b5149d.tar.xz |
KVM: x86: Partially allow KVM_SET_CPUID{,2} after KVM_RUN
Commit feb627e8d6f6 ("KVM: x86: Forbid KVM_SET_CPUID{,2} after KVM_RUN")
forbade changing CPUID altogether but unfortunately this is not fully
compatible with existing VMMs. In particular, QEMU reuses vCPU fds for
CPU hotplug after unplug and it calls KVM_SET_CPUID2. Instead of full ban,
check whether the supplied CPUID data is equal to what was previously set.
Reported-by: Igor Mammedov <imammedo@redhat.com>
Fixes: feb627e8d6f6 ("KVM: x86: Forbid KVM_SET_CPUID{,2} after KVM_RUN")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20220117150542.2176196-3-vkuznets@redhat.com>
Cc: stable@vger.kernel.org
[Do not call kvm_find_cpuid_entry repeatedly. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/Makefile')
0 files changed, 0 insertions, 0 deletions