1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/tools/testing/selftests/kvm/lib
Raghavendra Rao Ananta 9e2f6498ef selftests: KVM: Handle compiler optimizations in ucall
The selftests, when built with newer versions of clang, is found
to have over optimized guests' ucall() function, and eliminating
the stores for uc.cmd (perhaps due to no immediate readers). This
resulted in the userspace side always reading a value of '0', and
causing multiple test failures.

As a result, prevent the compiler from optimizing the stores in
ucall() with WRITE_ONCE().

Suggested-by: Ricardo Koller <ricarkol@google.com>
Suggested-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Message-Id: <20220615185706.1099208-1-rananta@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-06-23 10:26:41 -04:00
..
aarch64 selftests: KVM: Handle compiler optimizations in ucall 2022-06-23 10:26:41 -04:00
riscv KVM: selftests: riscv: Remove unneeded semicolon 2022-05-20 09:08:58 +05:30
s390x KVM: selftests: Add wrapper to allocate page table page 2021-06-24 11:47:49 -04:00
x86_64 KVM: selftests: Add option to run dirty_log_perf_test vCPUs in L2 2022-06-09 10:52:27 -04:00
assert.c KVM: selftests: Print the errno besides error-string in TEST_ASSERT 2021-04-20 04:18:52 -04:00
elf.c KVM: selftests: Expose align() helpers to tests 2021-11-16 07:43:24 -05:00
guest_modes.c KVM/riscv changes for 5.17, take #1 2022-01-07 10:43:02 -05:00
io.c selftests: kvm: Uses TEST_FAIL in tests/utilities 2020-03-16 17:59:11 +01:00
kvm_util.c KVM: selftests: Split out helper to allocate guest mem via memfd 2022-03-08 10:59:10 -05:00
kvm_util_internal.h KVM: selftests: create alias mappings when using shared memory 2021-05-27 07:45:56 -04:00
perf_test_util.c KVM: selftests: Restrict test region to 48-bit physical addresses when using nested 2022-06-09 10:52:27 -04:00
rbtree.c KVM: selftests: Keep track of memslots more efficiently 2021-05-27 07:45:54 -04:00
sparsebit.c kvm: selftests: Fix spelling mistake "missmatch" -> "mismatch" 2021-09-30 04:27:08 -04:00
test_util.c KVM: selftests: Assert mmap HVA is aligned when using HugeTLB 2021-11-16 07:43:25 -05:00