]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: kvm/set_memory_region_test: Fix race in move region test
authorMaciej S. Szmigiero <maciej.szmigiero@oracle.com>
Wed, 2 Dec 2020 20:35:36 +0000 (21:35 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 3 Dec 2020 17:38:58 +0000 (12:38 -0500)
commit55fb00e94f21f90beeaa9ffc2fb415a034dab1be
tree461e2ae232ae2d351759951fb59cdcc920c84b30
parentb47d8c9677427812be34d1b11c7bb5487e354910
selftests: kvm/set_memory_region_test: Fix race in move region test

The current memory region move test correctly handles the situation that
the second (realigning) memslot move operation would temporarily trigger
MMIO until it completes, however it does not handle the case in which the
first (misaligning) move operation does this, too.
This results in false test assertions in case it does so.

Fix this by handling temporary MMIO from the first memslot move operation
in the test guest code, too.

Fixes: 20771c61c3a1 ("KVM: sefltests: Add explicit synchronization to move mem region test")
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Message-Id: <0fdddb94bb0e31b7da129a809a308d91c10c0b5e.1606941224.git.maciej.szmigiero@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/set_memory_region_test.c