aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/vm
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-05-20 13:31:02 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-05-24 21:27:10 +0200
commit204c91eff798a78498cc7cbf1bc76892badfa96d (patch)
treecd9516683048d89eaba676657df4ac615b86c52c /tools/testing/selftests/vm
parentKVM: selftests: Remove duplicated TEST_ASSERT in hyperv_cpuid.c (diff)
downloadlinux-dev-204c91eff798a78498cc7cbf1bc76892badfa96d.tar.xz
linux-dev-204c91eff798a78498cc7cbf1bc76892badfa96d.zip
KVM: selftests: do not blindly clobber registers in guest asm
The guest_code of sync_regs_test is assuming that the compiler will not touch %r11 outside the asm that increments it, which is a bit brittle. Instead, we can increment a variable and use a dummy asm to ensure the increment is not optimized away. However, we also need to use a callee-save register or the compiler will insert a save/restore around the vmexit, breaking the whole idea behind the test. (Yes, "if it ain't broken...", but I would like the test to be clean before it is copied into the upcoming s390 selftests). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/vm')
0 files changed, 0 insertions, 0 deletions