kvm: x86: ensure pv_cpuid.features is initialized when enabling cap
Oliver Upton authored
Make the paravirtual cpuid enforcement mechanism idempotent to ioctl()
ordering by updating pv_cpuid.features whenever userspace requests the
capability. Extract this update out of kvm_update_cpuid_runtime() into a
new helper function and move its other call site into
kvm_vcpu_after_set_cpuid() where it more likely belongs.

Fixes: 66570e96

 ("kvm: x86: only provide PV features if enabled in guest's CPUID")
Signed-off-by: default avatarOliver Upton <oupton@google.com>
Reviewed-by: default avatarPeter Shier <pshier@google.com>
Message-Id: <20201027231044.655110-5-oupton@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
01b4f510
Name Last commit Last update
..
boot treewide: Convert macro and uses of __section(foo) to __section("foo")
configs Merge tag 'x86_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
crypto crypto: x86/poly1305 - Remove assignments with no effect
entry Merge tag 'kbuild-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
events Merge tag 'perf-core-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
hyperv x86/hyperv: Remove aliases with X64 in their name
ia32 x86: remove address space overrides using set_fs()
include x86/kvm: Reserve KVM_FEATURE_MSI_EXT_DEST_ID
kernel treewide: Convert macro and uses of __section(foo) to __section("foo")
kvm kvm: x86: ensure pv_cpuid.features is initialized when enabling cap
lib Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
math-emu treewide: Use fallthrough pseudo-keyword
mm treewide: Convert macro and uses of __section(foo) to __section("foo")
net bpf: x64: Do not emit sub/add 0, %rsp when !stack_depth
oprofile x86: Use pr_warn instead of pr_warning
pci Merge tag 'pci-v5.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
platform treewide: Convert macro and uses of __section(foo) to __section("foo")
power Merge tag 'kbuild-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
purgatory treewide: Convert macro and uses of __section(foo) to __section("foo")
ras treewide: replace '---help---' in Kconfig files with 'help'
realmode x86/head/64: Don't call verify_cpu() on starting APs
tools x86/insn: Make inat-tables.c suitable for pre-decompression code
um treewide: Convert macro and uses of __section(foo) to __section("foo")
video treewide: Add SPDX license identifier - Makefile/Kconfig
xen treewide: Convert macro and uses of __section(foo) to __section("foo")
.gitignore .gitignore: add SPDX License Identifier
Kbuild treewide: Add SPDX license identifier - Kbuild
Kconfig Merge tag 'x86_seves_for_v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Kconfig.assembler x86/delay: Introduce TPAUSE delay
Kconfig.cpu treewide: replace '---help---' in Kconfig files with 'help'
Kconfig.debug x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}()
Makefile x86/build: Warn on orphan section placement
Makefile.um x86, powerpc: Remove -funit-at-a-time compiler option entirely
Makefile_32.cpu x86/math-emu: Limit MATH_EMULATION to 486SX compatibles