]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: Add a macro to init CPUID features that KVM emulates in software
authorSean Christopherson <seanjc@google.com>
Thu, 28 Nov 2024 01:33:57 +0000 (17:33 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 22:19:53 +0000 (14:19 -0800)
commit6174004ebd2508556204255757fd77fbc10009f9
treedf46a95bf85c08375580f05d80905d7f6c58284b
parent5c8de4b3a5bc4dc6a1a8afd46ff5d58beebb6356
KVM: x86: Add a macro to init CPUID features that KVM emulates in software

Now that kvm_cpu_cap_init() is a macro with its own scope, add EMUL_F() to
OR-in features that KVM emulates in software, i.e. that don't depend on
the feature being available in hardware.  The contained scope
of kvm_cpu_cap_init() allows using a local variable to track the set of
emulated leaves, which in addition to avoiding confusing and/or
unnecessary variables, helps prevent misuse of EMUL_F().

Link: https://lore.kernel.org/r/20241128013424.4096668-31-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/cpuid.c