aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2022-01-17 16:05:40 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2022-01-17 12:29:41 -0500
commitc6617c61e8fe44b9e9fdfede921f61cac6b5149d (patch)
tree0600727b137c2b9cd3b5096bfb7b205e6f522277 /tools/testing/selftests
parentKVM: x86: Do runtime CPUID update before updating vcpu->arch.cpuid_entries (diff)
downloadlinux-dev-c6617c61e8fe44b9e9fdfede921f61cac6b5149d.tar.xz
linux-dev-c6617c61e8fe44b9e9fdfede921f61cac6b5149d.zip
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')
0 files changed, 0 insertions, 0 deletions