KVM: x86/cpuid: generalize kvm_update_kvm_cpuid_base() and also capture limit
authorPaul Durrant <pdurrant@amazon.com>
Fri, 6 Jan 2023 10:35:59 +0000 (10:35 +0000)
committerSean Christopherson <seanjc@google.com>
Tue, 24 Jan 2023 18:05:19 +0000 (10:05 -0800)
commit48639df8a9e3a1dfcb5880f77556681bd1e53657
treeb38c535649f8f871949b02c897b8e291f938c350
parentee661d8ea94e11b3452cd27c301241f2cfa95fca
KVM: x86/cpuid: generalize kvm_update_kvm_cpuid_base() and also capture limit

A subsequent patch will need to acquire the CPUID leaf range for emulated
Xen so explicitly pass the signature of the hypervisor we're interested in
to the new function. Also introduce a new kvm_hypervisor_cpuid structure
so we can neatly store both the base and limit leaf indices.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Link: https://lore.kernel.org/r/20230106103600.528-2-pdurrant@amazon.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/cpuid.c