mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-02-25 18:55:23 -06:00
Flush caches between writing and verifying test data.
Mostly we write and read large chunks of data which will make it likely that the data is no longer in the cache when we come to verify it. But this is not always true, and in any case, we shouldn't rely on it.
This commit is contained in:
@@ -73,6 +73,8 @@ int test_mov_inv_walk1(int my_vcpu, int iterations, int offset, bool inverse)
|
||||
for (int i = 0; i < iterations; i++) {
|
||||
pattern = (testword_t)1 << offset;
|
||||
|
||||
flush_caches(my_vcpu);
|
||||
|
||||
for (int j = 0; j < vm_map_size; j++) {
|
||||
testword_t *start, *end;
|
||||
calculate_chunk(&start, &end, my_vcpu, j, sizeof(testword_t));
|
||||
@@ -108,6 +110,8 @@ int test_mov_inv_walk1(int my_vcpu, int iterations, int offset, bool inverse)
|
||||
} while (!at_end && ++pe); // advance pe to next start point
|
||||
}
|
||||
|
||||
flush_caches(my_vcpu);
|
||||
|
||||
for (int j = vm_map_size - 1; j >= 0; j--) {
|
||||
testword_t *start, *end;
|
||||
calculate_chunk(&start, &end, my_vcpu, j, sizeof(testword_t));
|
||||
|
||||
Reference in New Issue
Block a user