From patchwork Thu Dec 1 02:16:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 13060899 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91FCFC352A1 for ; Thu, 1 Dec 2022 02:16:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229796AbiLACQf (ORCPT ); Wed, 30 Nov 2022 21:16:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiLACQd (ORCPT ); Wed, 30 Nov 2022 21:16:33 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9E0D8932A; Wed, 30 Nov 2022 18:16:31 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4NN07F4bmdz4xG6; Thu, 1 Dec 2022 13:16:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1669860986; bh=S5ONOgZTz0o2WtCmNBz+lPKRdK6AlxXo3Pg1r0rdX+Y=; h=Date:From:To:Cc:Subject:From; b=qgDcVfK5GnoATJ2aezvzB2v9wS6E7f6tkrn+ne0/J5FHBMnvUzwTbtzFMB9M0aVVZ ixD9IR3Pqo6Cy8Sy0CPBpS0R1AVDGQufX3/9/ixNeUU5ieYaPj4VwncAqauK+5teqh cKm+SRrp3soXJJgqOGBH8nsJRVyrAuUSsoyRDm+PTTOuPeZMa/5hYfBq8t6qzgJ6o9 lgk+Ouu/DHvNj2mh7Zk4rLhaoR3Sx/leBS3T9nl05kGWB1A0JEWuMdpNLXg0DHwIue xvfz23RD25gBCwMsw0KPeAZ4UNQZtUfBIFQ3iXbn70ZakmQYTszrSef5JDNrsNxDjU lW02TseOnZOAw== Date: Thu, 1 Dec 2022 13:16:23 +1100 From: Stephen Rothwell To: Christoffer Dall , Marc Zyngier , Paolo Bonzini Cc: KVM , David Matlack , Linux Kernel Mailing List , Linux Next Mailing List , Oliver Upton , Sean Christopherson Subject: linux-next: manual merge of the kvm-arm tree with the kvm tree Message-ID: <20221201131623.18ebc8d8@canb.auug.org.au> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 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 --- 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);