linux/tools/testing
Vitaly Kuznetsov 9a400068a1 KVM: selftests: x86: Avoid using SSE/AVX instructions
Some distros switched gcc to '-march=x86-64-v3' by default and while it's
hard to find a CPU which doesn't support it today, many KVM selftests fail
with

  ==== Test Assertion Failure ====
    lib/x86_64/processor.c:570: Unhandled exception in guest
    pid=72747 tid=72747 errno=4 - Interrupted system call
    Unhandled exception '0x6' at guest RIP '0x4104f7'

The failure is easy to reproduce elsewhere with

   $ make clean && CFLAGS='-march=x86-64-v3' make -j && ./x86_64/kvm_pv_test

The root cause of the problem seems to be that with '-march=x86-64-v3' GCC
uses AVX* instructions (VMOVQ in the example above) and without prior
XSETBV() in the guest this results in #UD. It is certainly possible to add
it there, e.g. the following saves the day as well:

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-ID: <20240920154422.2890096-1-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-10-20 12:10:27 -04:00
..
crypto/chacha20-s390
cxl cxl: Move mailbox related bits to the same context 2024-09-12 08:38:01 -07:00
fault-injection failcmd: make failcmd.sh executable 2024-09-01 20:43:32 -07:00
ktest ktest.pl: Avoid false positives with grub2 skip regex 2024-09-04 15:06:28 -04:00
kunit kunit: tool: Build compile_commands.json 2024-09-12 09:52:36 -06:00
memblock memblock: updates for 6.12-rc1 2024-09-25 11:35:19 -07:00
nvdimm testing: nvdimm: Add MODULE_DESCRIPTION() macros 2024-06-17 18:43:08 -05:00
radix-tree memblock: updates for 6.12-rc1 2024-09-25 11:35:19 -07:00
scatterlist
selftests KVM: selftests: x86: Avoid using SSE/AVX instructions 2024-10-20 12:10:27 -04:00
shared 19 hotfixes. 13 are cc:stable. 2024-09-27 10:27:22 -07:00
vma mm: rework vm_ops->close() handling on VMA merge 2024-09-03 21:15:55 -07:00
vsock test/vsock: add ioctl unsent bytes test 2024-08-02 09:20:28 +01:00