KVM: selftests: Move Hyper-V specific functions out of processor.c
Since there is 'hyperv.c' for Hyper-V specific functions already, move Hyper-V specific functions out of processor.c there. No functional change intended. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Link: https://lore.kernel.org/r/20240816130139.286246-2-vkuznets@redhat.com Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
committed by
Sean Christopherson
parent
47ac09b91b
commit
24a7e94496
@@ -343,4 +343,8 @@ struct hyperv_test_pages *vcpu_alloc_hyperv_test_pages(struct kvm_vm *vm,
|
||||
/* HV_X64_MSR_TSC_INVARIANT_CONTROL bits */
|
||||
#define HV_INVARIANT_TSC_EXPOSED BIT_ULL(0)
|
||||
|
||||
const struct kvm_cpuid2 *kvm_get_supported_hv_cpuid(void);
|
||||
const struct kvm_cpuid2 *vcpu_get_supported_hv_cpuid(struct kvm_vcpu *vcpu);
|
||||
void vcpu_set_hv_cpuid(struct kvm_vcpu *vcpu);
|
||||
|
||||
#endif /* !SELFTEST_KVM_HYPERV_H */
|
||||
|
||||
@@ -25,6 +25,10 @@ extern bool host_cpu_is_intel;
|
||||
extern bool host_cpu_is_amd;
|
||||
extern uint64_t guest_tsc_khz;
|
||||
|
||||
#ifndef MAX_NR_CPUID_ENTRIES
|
||||
#define MAX_NR_CPUID_ENTRIES 100
|
||||
#endif
|
||||
|
||||
/* Forced emulation prefix, used to invoke the emulator unconditionally. */
|
||||
#define KVM_FEP "ud2; .byte 'k', 'v', 'm';"
|
||||
|
||||
@@ -908,8 +912,6 @@ static inline void vcpu_xcrs_set(struct kvm_vcpu *vcpu, struct kvm_xcrs *xcrs)
|
||||
const struct kvm_cpuid_entry2 *get_cpuid_entry(const struct kvm_cpuid2 *cpuid,
|
||||
uint32_t function, uint32_t index);
|
||||
const struct kvm_cpuid2 *kvm_get_supported_cpuid(void);
|
||||
const struct kvm_cpuid2 *kvm_get_supported_hv_cpuid(void);
|
||||
const struct kvm_cpuid2 *vcpu_get_supported_hv_cpuid(struct kvm_vcpu *vcpu);
|
||||
|
||||
static inline uint32_t kvm_cpu_fms(void)
|
||||
{
|
||||
@@ -1009,7 +1011,6 @@ static inline struct kvm_cpuid2 *allocate_kvm_cpuid2(int nr_entries)
|
||||
}
|
||||
|
||||
void vcpu_init_cpuid(struct kvm_vcpu *vcpu, const struct kvm_cpuid2 *cpuid);
|
||||
void vcpu_set_hv_cpuid(struct kvm_vcpu *vcpu);
|
||||
|
||||
static inline struct kvm_cpuid_entry2 *__vcpu_get_cpuid_entry(struct kvm_vcpu *vcpu,
|
||||
uint32_t function,
|
||||
|
||||
Reference in New Issue
Block a user