diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2021-01-07 18:06:52 -0500 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-01-07 18:06:52 -0500 |
| commit | bc351f07260533cc1b3987339551decd00ddd52e (patch) | |
| tree | 3b6f396681f08dacc8dd24ce2c586ea2195e825d /tools/testing/selftests/kvm | |
| parent | d45f89f7437d0f2c8275b4434096164db106384d (diff) | |
| parent | 9aa418792f5f11ef5d6f72265e1f8ae07efd5784 (diff) | |
| download | cachepc-linux-bc351f07260533cc1b3987339551decd00ddd52e.tar.gz cachepc-linux-bc351f07260533cc1b3987339551decd00ddd52e.zip | |
Merge branch 'kvm-master' into kvm-next
Fixes to get_mmio_spte, destined to 5.10 stable branch.
Diffstat (limited to 'tools/testing/selftests/kvm')
| -rw-r--r-- | tools/testing/selftests/kvm/set_memory_region_test.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/testing/selftests/kvm/set_memory_region_test.c b/tools/testing/selftests/kvm/set_memory_region_test.c index 5fa5823661da..f127ed31dba7 100644 --- a/tools/testing/selftests/kvm/set_memory_region_test.c +++ b/tools/testing/selftests/kvm/set_memory_region_test.c @@ -154,14 +154,23 @@ static void guest_code_move_memory_region(void) GUEST_SYNC(0); /* - * Spin until the memory region is moved to a misaligned address. This - * may or may not trigger MMIO, as the window where the memslot is - * invalid is quite small. + * Spin until the memory region starts getting moved to a + * misaligned address. + * Every region move may or may not trigger MMIO, as the + * window where the memslot is invalid is usually quite small. */ val = guest_spin_on_val(0); GUEST_ASSERT_1(val == 1 || val == MMIO_VAL, val); - /* Spin until the memory region is realigned. */ + /* Spin until the misaligning memory region move completes. */ + val = guest_spin_on_val(MMIO_VAL); + GUEST_ASSERT_1(val == 1 || val == 0, val); + + /* Spin until the memory region starts to get re-aligned. */ + val = guest_spin_on_val(0); + GUEST_ASSERT_1(val == 1 || val == MMIO_VAL, val); + + /* Spin until the re-aligning memory region move completes. */ val = guest_spin_on_val(MMIO_VAL); GUEST_ASSERT_1(val == 1, val); |
