All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Christoffer Dall <cdall@cs.columbia.edu>,
	Marc Zyngier <maz@kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: KVM <kvm@vger.kernel.org>, David Matlack <dmatlack@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Oliver Upton <oliver.upton@linux.dev>,
	Sean Christopherson <seanjc@google.com>
Subject: linux-next: manual merge of the kvm-arm tree with the kvm tree
Date: Thu, 1 Dec 2022 13:16:23 +1100	[thread overview]
Message-ID: <20221201131623.18ebc8d8@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 4876 bytes --]

Hi all,

Today's linux-next merge of the kvm-arm tree got a conflict in:

  tools/testing/selftests/kvm/include/perf_test_util.h

between commit:

  9fda6753c9dd ("KVM: selftests: Rename perf_test_util.[ch] to memstress.[ch]")

from the kvm tree and commit:

  9ec1eb1bccee ("KVM: selftests: Have perf_test_util signal when to stop vCPUs")

from the kvm-arm tree.

I fixed it up (I removed the file and applied the following patch) and
can carry the fix as necessary. This is now fixed as far as linux-next
is concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

(this patch covered another occurrence fo the needed rename)

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 1 Dec 2022 12:19:45 +1100
Subject: [PATCH] fix up for rename of perf_test_args to memstress_args

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 tools/testing/selftests/kvm/access_tracking_perf_test.c       | 2 +-
 tools/testing/selftests/kvm/demand_paging_test.c              | 2 +-
 tools/testing/selftests/kvm/include/memstress.h               | 2 ++
 tools/testing/selftests/kvm/lib/memstress.c                   | 4 ++--
 .../testing/selftests/kvm/memslot_modification_stress_test.c  | 2 +-
 5 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/kvm/access_tracking_perf_test.c b/tools/testing/selftests/kvm/access_tracking_perf_test.c
index 2c9e0abcac94..57a16371e9c2 100644
--- a/tools/testing/selftests/kvm/access_tracking_perf_test.c
+++ b/tools/testing/selftests/kvm/access_tracking_perf_test.c
@@ -208,7 +208,7 @@ static bool spin_wait_for_next_iteration(int *current_iteration)
 	int last_iteration = *current_iteration;
 
 	do {
-		if (READ_ONCE(perf_test_args.stop_vcpus))
+		if (READ_ONCE(memstress_args.stop_vcpus))
 			return false;
 
 		*current_iteration = READ_ONCE(iteration);
diff --git a/tools/testing/selftests/kvm/demand_paging_test.c b/tools/testing/selftests/kvm/demand_paging_test.c
index f980ed8aeead..b0e1fc4de9e2 100644
--- a/tools/testing/selftests/kvm/demand_paging_test.c
+++ b/tools/testing/selftests/kvm/demand_paging_test.c
@@ -161,7 +161,7 @@ static void run_test(enum vm_guest_mode mode, void *arg)
 			vcpu_alias = addr_gpa2alias(vm, vcpu_args->gpa);
 
 			prefault_mem(vcpu_alias,
-				vcpu_args->pages * perf_test_args.guest_page_size);
+				vcpu_args->pages * memstress_args.guest_page_size);
 
 			/*
 			 * Set up user fault fd to handle demand paging
diff --git a/tools/testing/selftests/kvm/include/memstress.h b/tools/testing/selftests/kvm/include/memstress.h
index bbd2a302df10..4ae63963c14f 100644
--- a/tools/testing/selftests/kvm/include/memstress.h
+++ b/tools/testing/selftests/kvm/include/memstress.h
@@ -40,6 +40,8 @@ struct memstress_args {
 
 	/* Run vCPUs in L2 instead of L1, if the architecture supports it. */
 	bool nested;
+	/* Test is done, stop running vCPUs. */
+	bool stop_vcpus;
 	/* Randomize which pages are accessed by the guest. */
 	bool random_access;
 	/* True if all vCPUs are pinned to pCPUs */
diff --git a/tools/testing/selftests/kvm/lib/memstress.c b/tools/testing/selftests/kvm/lib/memstress.c
index 3742ce238129..5f1d3173c238 100644
--- a/tools/testing/selftests/kvm/lib/memstress.c
+++ b/tools/testing/selftests/kvm/lib/memstress.c
@@ -292,7 +292,7 @@ void memstress_start_vcpu_threads(int nr_vcpus,
 
 	vcpu_thread_fn = vcpu_fn;
 	WRITE_ONCE(all_vcpu_threads_running, false);
-	WRITE_ONCE(perf_test_args.stop_vcpus, false);
+	WRITE_ONCE(memstress_args.stop_vcpus, false);
 
 	for (i = 0; i < nr_vcpus; i++) {
 		struct vcpu_thread *vcpu = &vcpu_threads[i];
@@ -315,7 +315,7 @@ void memstress_join_vcpu_threads(int nr_vcpus)
 {
 	int i;
 
-	WRITE_ONCE(perf_test_args.stop_vcpus, true);
+	WRITE_ONCE(memstress_args.stop_vcpus, true);
 
 	for (i = 0; i < nr_vcpus; i++)
 		pthread_join(vcpu_threads[i].thread, NULL);
diff --git a/tools/testing/selftests/kvm/memslot_modification_stress_test.c b/tools/testing/selftests/kvm/memslot_modification_stress_test.c
index 431dbc47d345..9855c41ca811 100644
--- a/tools/testing/selftests/kvm/memslot_modification_stress_test.c
+++ b/tools/testing/selftests/kvm/memslot_modification_stress_test.c
@@ -43,7 +43,7 @@ static void vcpu_worker(struct memstress_vcpu_args *vcpu_args)
 	run = vcpu->run;
 
 	/* Let the guest access its memory until a stop signal is received */
-	while (!READ_ONCE(perf_test_args.stop_vcpus)) {
+	while (!READ_ONCE(memstress_args.stop_vcpus)) {
 		ret = _vcpu_run(vcpu);
 		TEST_ASSERT(ret == 0, "vcpu_run failed: %d\n", ret);
 
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2022-12-01  2:16 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01  2:16 Stephen Rothwell [this message]
2022-12-01 15:23 ` linux-next: manual merge of the kvm-arm tree with the kvm tree Marc Zyngier
  -- strict thread matches above, loose matches on Subject: below --
2023-04-06  3:06 Stephen Rothwell
2023-03-31  2:26 Stephen Rothwell
2022-12-01  1:09 Stephen Rothwell
2022-12-01  0:57 Stephen Rothwell
2022-12-01  0:36 Stephen Rothwell
2022-12-01  0:24 Stephen Rothwell
2022-07-18  5:19 Stephen Rothwell
2022-05-05  4:47 Stephen Rothwell
2021-12-17  4:19 Stephen Rothwell
2021-12-09 22:01 broonie
2021-06-25  5:24 Stephen Rothwell
2021-06-25  5:20 Stephen Rothwell
2021-06-25  5:15 Stephen Rothwell
2021-06-23  5:53 Stephen Rothwell
2021-06-22  5:31 Stephen Rothwell
2021-04-22  4:43 Stephen Rothwell
2021-04-22  4:39 Stephen Rothwell
2020-07-13  4:40 Stephen Rothwell
2020-08-09  8:55 ` Stephen Rothwell
2020-07-13  4:39 Stephen Rothwell
2020-08-09  8:54 ` Stephen Rothwell
2020-03-25  3:23 Stephen Rothwell
2018-10-18  2:46 Stephen Rothwell
2017-04-10  3:52 Stephen Rothwell
2017-04-10  6:26 ` Christoffer Dall
2016-07-24  6:04 Stephen Rothwell
2016-07-24  6:04 ` Stephen Rothwell
2016-07-24  5:59 Stephen Rothwell
2016-07-24  5:59 ` Stephen Rothwell
2016-07-20  5:27 Stephen Rothwell
2016-07-20  5:27 ` Stephen Rothwell
2015-10-16  3:53 Stephen Rothwell
2015-10-16  3:53 ` Stephen Rothwell
2015-10-16  4:20 ` Wu, Feng
2014-11-26  6:19 Stephen Rothwell
2014-11-26 11:39 ` Christoffer Dall
2014-09-25  5:32 Stephen Rothwell
2014-09-18  3:52 Stephen Rothwell
2014-09-18 15:13 ` Marc Zyngier
2014-09-18 15:13   ` Marc Zyngier
2014-09-08  6:04 Stephen Rothwell

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=20221201131623.18ebc8d8@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=cdall@cs.columbia.edu \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.