linux-stable/arch/x86
Vitaly Kuznetsov c6617c61e8 KVM: x86: Partially allow KVM_SET_CPUID{,2} after KVM_RUN
Commit feb627e8d6 ("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: feb627e8d6 ("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>
2022-01-17 12:29:41 -05:00
..
boot
configs
crypto
entry x86/xen: Add xenpv_restore_regs_and_return_to_usermode() 2021-12-03 19:21:15 +01:00
events x86/perf: Fix snapshot_branch_stack warning in VM 2021-11-17 14:48:43 +01:00
hyperv x86/hyperv: Move required MSRs check to initial platform probing 2021-11-15 12:37:08 +00:00
ia32
include x86/fpu: Fix inline prefix warnings 2022-01-14 13:48:38 -05:00
kernel x86/fpu: Fix inline prefix warnings 2022-01-14 13:48:38 -05:00
kvm KVM: x86: Partially allow KVM_SET_CPUID{,2} after KVM_RUN 2022-01-17 12:29:41 -05:00
lib
math-emu
mm Merge branch 'kvm-guest-sev-migration' into kvm-master 2021-11-11 07:40:26 -05:00
net
pci xen: branch for v5.16-rc1 2021-11-10 11:14:21 -08:00
platform
power
purgatory
ras
realmode x86/64/mm: Map all kernel memory into trampoline_pgd 2021-12-03 09:11:43 +01:00
tools Driver core changes for 5.16-rc1 2021-11-04 08:32:38 -07:00
um
video
xen x86/xen: Add xenpv_restore_regs_and_return_to_usermode() 2021-12-03 19:21:15 +01:00
.gitignore
Kbuild
Kconfig ftrace/samples: add missing Kconfig option for ftrace direct multi sample 2021-11-18 17:50:54 +01:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug
Makefile Kbuild updates for v5.16 2021-11-08 09:15:45 -08:00
Makefile.um
Makefile_32.cpu