Merge tag 'kvm-x86-selftests-6.12' of https://github.com/kvm-x86/linux into HEAD
KVM selftests changes for 6.12: - Fix a goof that caused some Hyper-V tests to be skipped when run on bare metal, i.e. NOT in a VM. - Add a regression test for KVM's handling of SHUTDOWN for an SEV-ES guest. - Explicitly include one-off assets in .gitignore. Past Sean was completely wrong about not being able to detect missing .gitignore entries. - Verify userspace single-stepping works when KVM happens to handle a VM-Exit in its fastpath. - Misc cleanups
This commit is contained in:
@@ -428,8 +428,6 @@ const char *vm_guest_mode_string(uint32_t i);
|
||||
void kvm_vm_free(struct kvm_vm *vmp);
|
||||
void kvm_vm_restart(struct kvm_vm *vmp);
|
||||
void kvm_vm_release(struct kvm_vm *vmp);
|
||||
int kvm_memcmp_hva_gva(void *hva, struct kvm_vm *vm, const vm_vaddr_t gva,
|
||||
size_t len);
|
||||
void kvm_vm_elf_load(struct kvm_vm *vm, const char *filename);
|
||||
int kvm_memfd_alloc(size_t size, bool hugepages);
|
||||
|
||||
|
||||
@@ -186,6 +186,18 @@
|
||||
#define HV_X64_ENLIGHTENED_VMCS_RECOMMENDED \
|
||||
KVM_X86_CPU_FEATURE(HYPERV_CPUID_ENLIGHTMENT_INFO, 0, EAX, 14)
|
||||
|
||||
/* HYPERV_CPUID_NESTED_FEATURES.EAX */
|
||||
#define HV_X64_NESTED_DIRECT_FLUSH \
|
||||
KVM_X86_CPU_FEATURE(HYPERV_CPUID_NESTED_FEATURES, 0, EAX, 17)
|
||||
#define HV_X64_NESTED_GUEST_MAPPING_FLUSH \
|
||||
KVM_X86_CPU_FEATURE(HYPERV_CPUID_NESTED_FEATURES, 0, EAX, 18)
|
||||
#define HV_X64_NESTED_MSR_BITMAP \
|
||||
KVM_X86_CPU_FEATURE(HYPERV_CPUID_NESTED_FEATURES, 0, EAX, 19)
|
||||
|
||||
/* HYPERV_CPUID_NESTED_FEATURES.EBX */
|
||||
#define HV_X64_NESTED_EVMCS1_PERF_GLOBAL_CTRL \
|
||||
KVM_X86_CPU_FEATURE(HYPERV_CPUID_NESTED_FEATURES, 0, EBX, 0)
|
||||
|
||||
/* HYPERV_CPUID_SYNDBG_PLATFORM_CAPABILITIES.EAX */
|
||||
#define HV_X64_SYNDBG_CAP_ALLOW_KERNEL_DEBUGGING \
|
||||
KVM_X86_CPU_FEATURE(HYPERV_CPUID_SYNDBG_PLATFORM_CAPABILITIES, 0, EAX, 1)
|
||||
@@ -343,4 +355,10 @@ 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);
|
||||
|
||||
bool kvm_hv_cpu_has(struct kvm_x86_cpu_feature feature);
|
||||
|
||||
#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