kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Shuah Khan <shuah@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
	Ricardo Koller <ricarkol@google.com>,
	David Matlack <dmatlack@google.com>,
	kvmarm@lists.linux.dev, Oliver Upton <oliver.upton@linux.dev>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] KVM: selftests: Allow >1 guest mode in access_tracking_perf_test
Date: Fri, 11 Nov 2022 23:19:45 +0000	[thread overview]
Message-ID: <20221111231946.944807-2-oliver.upton@linux.dev> (raw)
Message-ID: <20221111231945.IC1z4ad495VQ-0YPG0blzOFvfcz73n7P5ocjz9MExvQ@z> (raw)
In-Reply-To: <20221111231946.944807-1-oliver.upton@linux.dev>

As the name implies, for_each_guest_mode() will run the test case for
all supported guest addressing modes. On x86 that doesn't amount to
anything, but arm64 can handle 4K, 16K, and 64K page sizes on supporting
hardware.

Blindly attempting to run access_tracking_perf_test on arm64 stalls on
the second test case, as the 'done' global remains set between test
iterations. Clear it after VM teardown in anticipation of a subsequent
test case.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
---
 tools/testing/selftests/kvm/access_tracking_perf_test.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/kvm/access_tracking_perf_test.c b/tools/testing/selftests/kvm/access_tracking_perf_test.c
index 76c583a07ea2..4da066479e0a 100644
--- a/tools/testing/selftests/kvm/access_tracking_perf_test.c
+++ b/tools/testing/selftests/kvm/access_tracking_perf_test.c
@@ -326,6 +326,9 @@ static void run_test(enum vm_guest_mode mode, void *arg)
 
 	perf_test_join_vcpu_threads(nr_vcpus);
 	perf_test_destroy_vm(vm);
+
+	/* Clear done in anticipation of testing another guest mode */
+	done = false;
 }
 
 static void help(char *name)
-- 
2.38.1.431.g37b22c650d-goog


  parent reply	other threads:[~2022-11-11 23:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 23:19 [PATCH 0/2] KVM: selftests: Enable access_tracking_perf_test for arm64 Oliver Upton
2022-11-11 23:19 ` Oliver Upton
2022-11-11 23:19 ` Oliver Upton [this message]
2022-11-11 23:19   ` [PATCH 1/2] KVM: selftests: Allow >1 guest mode in access_tracking_perf_test Oliver Upton
2022-11-12 10:03   ` Gavin Shan
2022-11-12 10:03     ` Gavin Shan
2022-11-14 17:12   ` Sean Christopherson
2022-11-14 17:12     ` Sean Christopherson
2022-11-14 21:57     ` Oliver Upton
2022-11-14 21:57       ` Oliver Upton
2022-11-11 23:19 ` [PATCH 2/2] KVM: selftests: Build access_tracking_perf_test for arm64 Oliver Upton
2022-11-11 23:19   ` Oliver Upton
2022-11-12 10:04   ` Gavin Shan
2022-11-12 10:04     ` Gavin Shan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221111231946.944807-2-oliver.upton@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=alexandru.elisei@arm.com \
    --cc=dmatlack@google.com \
    --cc=james.morse@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=ricarkol@google.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).