linux/tools/testing/selftests/kvm/x86_64
Sean Christopherson 5addaf5309 KVM: selftests: Mark "guest_saw_irq" as volatile in xen_shinfo_test
Tag "guest_saw_irq" as "volatile" to ensure that the compiler will never
optimize away lookups.  Relying on the compiler thinking that the flag
is global and thus might change also works, but it's subtle, less robust,
and looks like a bug at first glance, e.g. risks being "fixed" and
breaking the test.

Make the flag "static" as well since convincing the compiler it's global
is no longer necessary.

Alternatively, the flag could be accessed with {READ,WRITE}_ONCE(), but
literally every access would need the wrappers, and eking out performance
isn't exactly top priority for selftests.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20221013211234.1318131-17-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-10-28 06:10:28 -04:00
..
amx_test.c KVM: selftests: Clean up requirements for XFD-aware XSAVE features 2022-07-13 18:14:24 -07:00
cpuid_test.c KVM: selftests: Set input function/index in raw CPUID helper(s) 2022-07-13 18:14:21 -07:00
cr4_cpuid_sync_test.c KVM: selftests: Use this_cpu_has() in CR4/CPUID sync test 2022-07-13 18:14:21 -07:00
debug_regs.c KVM: selftests: Add TEST_REQUIRE macros to reduce skipping copy+paste 2022-06-11 11:47:29 -04:00
emulator_error_test.c KVM: selftests: Add and use helper to set vCPU's CPUID maxphyaddr 2022-07-13 18:14:17 -07:00
evmcs_test.c KVM: selftests: Use kvm_cpu_has() for nested VMX checks 2022-07-13 18:14:10 -07:00
fix_hypercall_test.c KVM: selftests: Dedup subtests of fix_hypercall_test 2022-09-30 06:39:34 -04:00
get_msr_index_features.c KVM: selftests: Add TEST_REQUIRE macros to reduce skipping copy+paste 2022-06-11 11:47:29 -04:00
hyperv_clock.c KVM: selftests: Fix filename reporting in guest asserts 2022-07-13 18:14:08 -07:00
hyperv_cpuid.c KVM: selftests: Make get_supported_cpuid() returns "const" 2022-07-13 18:14:20 -07:00
hyperv_features.c KVM: selftests: Don't set reserved bits for invalid Hyper-V hypercall number 2022-09-28 12:47:20 -07:00
hyperv_svm_test.c KVM: selftests: Use kvm_cpu_has() for nested SVM checks 2022-07-13 18:14:10 -07:00
kvm_clock_test.c KVM: selftests: Fix filename reporting in guest asserts 2022-07-13 18:14:08 -07:00
kvm_pv_test.c KVM: selftests: Use vcpu_get_cpuid_entry() in PV features test (sort of) 2022-07-13 18:14:18 -07:00
max_vcpuid_cap_test.c KVM: selftests: Rename vm_create() => vm_create_barebones(), drop param 2022-06-11 11:46:33 -04:00
mmio_warning_test.c KVM: selftests: Sanity check input to ioctls() at build time 2022-06-11 11:48:09 -04:00
monitor_mwait_test.c KVM: selftests: Use vcpu_clear_cpuid_feature() in monitor_mwait_test 2022-07-13 18:14:17 -07:00
nested_exceptions_test.c KVM: selftests: Add an x86-only test to verify nested exception queueing 2022-09-26 12:03:12 -04:00
nx_huge_pages_test.c Merge tag 'kvm-x86-6.1-2' of https://github.com/sean-jc/linux into HEAD 2022-09-30 07:09:48 -04:00
nx_huge_pages_test.sh KVM: selftests: Test disabling NX hugepages on a VM 2022-06-24 04:51:51 -04:00
platform_info_test.c KVM: selftests: Add TEST_REQUIRE macros to reduce skipping copy+paste 2022-06-11 11:47:29 -04:00
pmu_event_filter_test.c KVM: selftests: Drop unnecessary use of kvm_get_supported_cpuid_index() 2022-07-13 18:14:22 -07:00
set_boot_cpu_id.c KVM: selftests: Fix filename reporting in guest asserts 2022-07-13 18:14:08 -07:00
set_sregs_test.c KVM: selftests: Add framework to query KVM CPUID bits 2022-07-13 18:14:09 -07:00
sev_migrate_tests.c KVM: selftests: Use kvm_cpu_has() in the SEV migration test 2022-07-13 18:14:09 -07:00
smm_test.c KVM: selftests: Use this_cpu_has() to detect SVM support in L1 2022-07-13 18:14:22 -07:00
state_test.c KVM: selftests: Use this_cpu_has() to detect SVM support in L1 2022-07-13 18:14:22 -07:00
svm_int_ctl_test.c KVM: selftests: Use kvm_cpu_has() for nested SVM checks 2022-07-13 18:14:10 -07:00
svm_nested_soft_inject_test.c KVM: selftests: Use kvm_cpu_has() for nSVM soft INT injection test 2022-07-13 18:14:13 -07:00
svm_vmcall_test.c KVM: selftests: Use kvm_cpu_has() for nested SVM checks 2022-07-13 18:14:10 -07:00
sync_regs_test.c KVM: selftests: Add TEST_REQUIRE macros to reduce skipping copy+paste 2022-06-11 11:47:29 -04:00
triple_fault_event_test.c KVM: selftests: Use kvm_cpu_has() for nested VMX checks 2022-07-13 18:14:10 -07:00
tsc_msrs_test.c KVM: selftests: Fix filename reporting in guest asserts 2022-07-13 18:14:08 -07:00
tsc_scaling_sync.c KVM: selftests: Add TEST_REQUIRE macros to reduce skipping copy+paste 2022-06-11 11:47:29 -04:00
ucna_injection_test.c KVM: selftests: Add a self test for CMCI and UCNA emulations. 2022-06-24 04:52:04 -04:00
userspace_io_test.c KVM: selftests: Fix filename reporting in guest asserts 2022-07-13 18:14:08 -07:00
userspace_msr_exit_test.c KVM: selftests: Fix filename reporting in guest asserts 2022-07-13 18:14:08 -07:00
vmx_apic_access_test.c KVM: selftests: Use kvm_cpu_has() for nested VMX checks 2022-07-13 18:14:10 -07:00
vmx_close_while_nested_test.c KVM: selftests: Use kvm_cpu_has() for nested VMX checks 2022-07-13 18:14:10 -07:00
vmx_dirty_log_test.c KVM: selftests: Use kvm_cpu_has() for nested VMX checks 2022-07-13 18:14:10 -07:00
vmx_exception_with_invalid_guest_state.c KVM: selftests: Add TEST_REQUIRE macros to reduce skipping copy+paste 2022-06-11 11:47:29 -04:00
vmx_invalid_nested_guest_state.c KVM: selftests: Use kvm_cpu_has() for nested VMX checks 2022-07-13 18:14:10 -07:00
vmx_msrs_test.c KVM: selftests: Verify VMX MSRs can be restored to KVM-supported values 2022-07-28 13:25:24 -04:00
vmx_nested_tsc_scaling_test.c KVM: selftests: Use kvm_cpu_has() for nested VMX checks 2022-07-13 18:14:10 -07:00
vmx_pmu_caps_test.c KVM: selftests: Test all possible "invalid" PERF_CAPABILITIES.LBR_FMT vals 2022-08-10 15:08:29 -04:00
vmx_preemption_timer_test.c KVM: selftests: Use kvm_cpu_has() for nested VMX checks 2022-07-13 18:14:10 -07:00
vmx_set_nested_state_test.c KVM: selftests: Use vcpu_{set,clear}_cpuid_feature() in nVMX state test 2022-07-13 18:14:19 -07:00
vmx_tsc_adjust_test.c KVM: selftests: Use kvm_cpu_has() for nested VMX checks 2022-07-13 18:14:10 -07:00
xapic_ipi_test.c KVM: selftests: Purge vm+vcpu_id == vcpu silliness 2022-06-11 11:47:22 -04:00
xapic_state_test.c KVM: selftests: Use vcpu_clear_cpuid_feature() to clear x2APIC 2022-07-13 18:14:20 -07:00
xen_shinfo_test.c KVM: selftests: Mark "guest_saw_irq" as volatile in xen_shinfo_test 2022-10-28 06:10:28 -04:00
xen_vmcall_test.c KVM: selftests: Fix filename reporting in guest asserts 2022-07-13 18:14:08 -07:00
xss_msr_test.c KVM: selftests: Use kvm_cpu_has() for XSAVES in XSS MSR test 2022-07-13 18:14:11 -07:00