KVM: x86: Handle kernel- and KVM-defined CPUID words in a single helper
authorSean Christopherson <seanjc@google.com>
Thu, 28 Nov 2024 01:33:53 +0000 (17:33 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 22:19:49 +0000 (14:19 -0800)
commit46505c0f69f99cc8cf0b50842a35a49200db5144
treeb813900d79d8976e0e5a30c049214ea5790fcd11
parent264969b48a295e3fd89f01d3584a9f3cf6b47eb1
KVM: x86: Handle kernel- and KVM-defined CPUID words in a single helper

Merge kvm_cpu_cap_init() and kvm_cpu_cap_init_kvm_defined() into a single
helper.  The only advantage of separating the two was to make it somewhat
obvious that KVM directly initializes the KVM-defined words, whereas using
a common helper will allow for hardening both kernel- and KVM-defined
CPUID words without needing copy+paste.

No functional change intended.

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