1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/tools/testing/selftests/kvm/lib/aarch64
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
..
gic.c KVM: selftests: aarch64: Add GICv3 register accessor library functions 2021-12-28 19:23:13 +00:00
gic_private.h KVM: selftests: aarch64: Add GICv3 register accessor library functions 2021-12-28 19:23:13 +00:00
gic_v3.c kvm: selftests: aarch64: fix some vgic related comments 2022-02-08 15:18:58 +00:00
handlers.S KVM: selftests: Add exception handling support for aarch64 2021-06-14 09:06:23 +01:00
processor.c selftests: KVM: Create helper for making SMCCC calls 2022-05-03 21:30:20 +01:00
spinlock.c KVM: arm64: selftests: Add light-weight spinlock support 2021-10-17 11:17:21 +01:00
ucall.c selftests: KVM: Handle compiler optimizations in ucall 2022-06-23 10:26:41 -04:00
vgic.c KVM/arm64 updates for 5.18 2022-03-18 12:43:24 -04:00