mirror_ubuntu-kernels/tools/testing/selftests/kvm/lib
Vitaly Kuznetsov 90a48843a1 KVM: selftests: fix ucall on x86
After commit e8bb4755eea2("KVM: selftests: Split ucall.c into architecture
specific files") selftests which use ucall on x86 started segfaulting and
apparently it's gcc to blame: it "optimizes" ucall() function throwing away
va_start/va_end part because it thinks the structure is not being used.
Previously, it couldn't do that because the there was also MMIO version and
the decision which particular implementation to use was done at runtime.

With older gccs it's possible to solve the problem by adding 'volatile'
to 'struct ucall' but at least with gcc-8.3 this trick doesn't work.

'memory' clobber seems to do the job.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-09-25 15:15:03 +02:00
..
aarch64 KVM: selftests: Introduce VM_MODE_PXXV48_4K 2019-09-24 13:37:22 +02:00
s390x KVM: selftests: Implement ucall() for s390x 2019-08-02 15:44:23 +02:00
x86_64 KVM: selftests: fix ucall on x86 2019-09-25 15:15:03 +02:00
assert.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 482 2019-06-19 17:09:52 +02:00
elf.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 482 2019-06-19 17:09:52 +02:00
io.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 482 2019-06-19 17:09:52 +02:00
kvm_util_internal.h KVM/arm updates for 5.3 2019-07-11 15:14:16 +02:00
kvm_util.c KVM: selftests: Remove duplicate guest mode handling 2019-09-24 13:37:24 +02:00
sparsebit.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 482 2019-06-19 17:09:52 +02:00