Skip to content

Commit c1d1650

Browse files
Ben Gardonbonzini
authored andcommitted
KVM: selftests: Disable dirty logging with vCPUs running
Disabling dirty logging is much more intestesting from a testing perspective if the vCPUs are still running. This also excercises the code-path in which collapsible SPTEs must be faulted back in at a higher level after disabling dirty logging. To: [email protected] CC: Peter Xu <[email protected]> CC: Andrew Jones <[email protected]> CC: Thomas Huth <[email protected]> Signed-off-by: Ben Gardon <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 9e965bb commit c1d1650

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/testing/selftests/kvm/dirty_log_perf_test.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,18 +211,18 @@ static void run_test(enum vm_guest_mode mode, void *arg)
211211
}
212212
}
213213

214-
/* Tell the vcpu thread to quit */
215-
host_quit = true;
216-
for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++)
217-
pthread_join(vcpu_threads[vcpu_id], NULL);
218-
219214
/* Disable dirty logging */
220215
clock_gettime(CLOCK_MONOTONIC, &start);
221216
vm_mem_region_set_flags(vm, PERF_TEST_MEM_SLOT_INDEX, 0);
222217
ts_diff = timespec_elapsed(start);
223218
pr_info("Disabling dirty logging time: %ld.%.9lds\n",
224219
ts_diff.tv_sec, ts_diff.tv_nsec);
225220

221+
/* Tell the vcpu thread to quit */
222+
host_quit = true;
223+
for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++)
224+
pthread_join(vcpu_threads[vcpu_id], NULL);
225+
226226
avg = timespec_div(get_dirty_log_total, p->iterations);
227227
pr_info("Get dirty log over %lu iterations took %ld.%.9lds. (Avg %ld.%.9lds/iteration)\n",
228228
p->iterations, get_dirty_log_total.tv_sec,

0 commit comments

Comments
 (0)