aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2019-10-08 20:08:08 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-10-22 13:31:18 +0200
commitef4059809890f732c69cc1726d3a9a108a832a2f (patch)
tree6ac0a5e1d902568a9a4cc374a5c34d7107ee2e2b /arch/x86
parentselftests: kvm: vmx_dirty_log_test: skip the test when VMX is not supported (diff)
downloadlinux-dev-ef4059809890f732c69cc1726d3a9a108a832a2f.tar.xz
linux-dev-ef4059809890f732c69cc1726d3a9a108a832a2f.zip
selftests: kvm: fix sync_regs_test with newer gccs
Commit 204c91eff798a ("KVM: selftests: do not blindly clobber registers in guest asm") was intended to make test more gcc-proof, however, the result is exactly the opposite: on newer gccs (e.g. 8.2.1) the test breaks with ==== Test Assertion Failure ==== x86_64/sync_regs_test.c:168: run->s.regs.regs.rbx == 0xBAD1DEA + 1 pid=14170 tid=14170 - Invalid argument 1 0x00000000004015b3: main at sync_regs_test.c:166 (discriminator 6) 2 0x00007f413fb66412: ?? ??:0 3 0x000000000040191d: _start at ??:? rbx sync regs value incorrect 0x1. Apparently, compile is still free to play games with registers even when they have variables attached. Re-write guest code with 'asm volatile' by embedding ucall there and making sure rbx is preserved. Fixes: 204c91eff798a ("KVM: selftests: do not blindly clobber registers in guest asm") Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86')
0 files changed, 0 insertions, 0 deletions