Skip to content

Commit deb8b84

Browse files
Maxim Levitskysean-jc
authored andcommitted
KVM: selftests: Limit dirty_log_test's s390x workaround to s390x
s390 specific workaround causes the dirty-log mode of the test to dirty all guest memory on the first iteration, which is very slow when the test is run in a nested VM. Limit this workaround to s390x. Signed-off-by: Maxim Levitsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 9b1feec commit deb8b84

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/testing/selftests/kvm/dirty_log_test.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ static void guest_code(void)
9898
uint64_t addr;
9999
int i;
100100

101+
#ifdef __s390x__
101102
/*
102103
* On s390x, all pages of a 1M segment are initially marked as dirty
103104
* when a page of the segment is written to for the very first time.
@@ -108,6 +109,7 @@ static void guest_code(void)
108109
addr = guest_test_virt_mem + i * guest_page_size;
109110
vcpu_arch_put_guest(*(uint64_t *)addr, READ_ONCE(iteration));
110111
}
112+
#endif
111113

112114
while (true) {
113115
for (i = 0; i < TEST_PAGES_PER_LOOP; i++) {

0 commit comments

Comments
 (0)