public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] KVM: selftests: dirty_log_test: fixes for running the test nested
@ 2024-12-11 19:37 Maxim Levitsky
  2024-12-11 19:37 ` [PATCH 1/4] KVM: VMX: read the PML log in the same order as it was written Maxim Levitsky
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Maxim Levitsky @ 2024-12-11 19:37 UTC (permalink / raw)
  To: kvm
  Cc: linux-kselftest, Sean Christopherson, Paolo Bonzini, linux-kernel,
	x86, Maxim Levitsky

As a part of the effort to start running kvm selftests nested, this patch
series contains several fixes to the dirty_log_test, which allows this test
to run nested very well.

I also included a mostly nop change to KVM, to reverse the order in which
the PML log is read to align more closely to the hardware. It should
not affect regular users of the dirty logging but it fixes a unit test
specific assumption in the dirty_log_test dirty-ring mode.

Patch 4 fixes a very rare problem, which is hard to reproduce with standard
test parameters, but due to some weird timing issue, it
actually happened a few times on my machine which prompted me to investigate
it.

The issue can be reproduced well by running the test nested
(without patch 4 applied) with a very short iteration time and with a
few iterations in a loop like this:

while ./dirty_log_test -i 10 -I 1 -M dirty-ring ; do true ; done

Or even better, it's possible to manually patch the test to not wait at all
(effectively setting iteration time to 0), then it fails pretty fast.

Best regards,
       Maxim Levitsky

Maxim Levitsky (4):
  KVM: VMX: read the PML log in the same order as it was written
  KVM: selftests: dirty_log_test: Limit s390x workaround to s390x
  KVM: selftests: dirty_log_test: run the guest until some dirty ring
    entries were harvested
  KVM: selftests: dirty_log_test: support multiple write retires

 arch/x86/kvm/vmx/vmx.c                       | 32 +++++---
 arch/x86/kvm/vmx/vmx.h                       |  1 +
 tools/testing/selftests/kvm/dirty_log_test.c | 79 +++++++++++++++++---
 3 files changed, 91 insertions(+), 21 deletions(-)

-- 
2.26.3



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-12-13 20:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11 19:37 [PATCH 0/4] KVM: selftests: dirty_log_test: fixes for running the test nested Maxim Levitsky
2024-12-11 19:37 ` [PATCH 1/4] KVM: VMX: read the PML log in the same order as it was written Maxim Levitsky
2024-12-12  0:44   ` Sean Christopherson
2024-12-12 21:37     ` Maxim Levitsky
2024-12-13  6:19       ` Sean Christopherson
2024-12-13 19:56         ` Maxim Levitsky
2024-12-13 20:31           ` Sean Christopherson
2024-12-11 19:37 ` [PATCH 2/4] KVM: selftests: dirty_log_test: Limit s390x workaround to s390x Maxim Levitsky
2024-12-11 19:37 ` [PATCH 3/4] KVM: selftests: dirty_log_test: run the guest until some dirty ring entries were harvested Maxim Levitsky
2024-12-11 19:37 ` [PATCH 4/4] KVM: selftests: dirty_log_test: support multiple write retires Maxim Levitsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox