KVM: x86: Extract code for generating per-entry emulated CPUID information
authorSean Christopherson <seanjc@google.com>
Thu, 28 Nov 2024 01:34:09 +0000 (17:34 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 22:20:07 +0000 (14:20 -0800)
commitff402f56e8eb21d65c73e559fb5db5a00cedb14a
treec81cf9e13ac05f5048ddc06bd843e6d3c54cdf17
parenta7a308f863a1b82a2940ef4e8de0feef0a65403e
KVM: x86: Extract code for generating per-entry emulated CPUID information

Extract the meat of __do_cpuid_func_emulated() into a separate helper,
cpuid_func_emulated(), so that cpuid_func_emulated() can be used with a
single CPUID entry.  This will allow marking emulated features as fully
supported in the guest cpu_caps without needing to hardcode the set of
emulated features in multiple locations.

No functional change intended.

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20241128013424.4096668-43-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/cpuid.c