KVM: selftests: Enable dirty_log_test on s390x
authorThomas Huth <thuth@redhat.com>
Wed, 31 Jul 2019 15:15:25 +0000 (17:15 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 2 Aug 2019 13:44:23 +0000 (15:44 +0200)
commita049a377164c3eca7d5323cd9896b64d2120c415
tree578063c175492d7ab87fed9eef10df3f193c200f
parentf90f57b3971a3370be5a3cf02ae783b4bf728b7f
KVM: selftests: Enable dirty_log_test on s390x

To run the dirty_log_test on s390x, we have to make sure that we
access the dirty log bitmap with little endian byte ordering and
we have to properly align the memslot of the guest.
Also all dirty bits of a segment are set once on s390x when one
of the pages of a segment are written to for the first time, so
we have to make sure that we touch all pages during the first
iteration to keep the test in sync here.
DEFAULT_GUEST_TEST_MEM needs an adjustment, too. On some s390x
distributions, the ELF binary is linked to address 0x80000000,
so we have to avoid that our test region overlaps into this area.
0xc0000000 seems to be a good alternative that should work on x86
and aarch64, too.

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Link: https://lore.kernel.org/r/20190731151525.17156-4-thuth@redhat.com
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/dirty_log_test.c