From mboxrd@z Thu Jan 1 00:00:00 1970 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 53D54C4332F for ; Sat, 12 Nov 2022 10:05:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234673AbiKLKFB (ORCPT ); Sat, 12 Nov 2022 05:05:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234380AbiKLKFB (ORCPT ); Sat, 12 Nov 2022 05:05:01 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B9E112D3E for ; Sat, 12 Nov 2022 02:04:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668247441; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5W9bu2hFI7xLEfEbbLNcIU/JquM0rgAJhzv8BY8pipY=; b=Qey6cEcAyDBVF2JwcrV6m4bdLppEwywnlcU0MoAyWYFj2eKFHkoF+KiZdjr3VwGTfnOf3i ngdZ28PBBcbsC1uKCUGTDaZS5WGXm0YqBCWcfYUn8mIs3y4y1SBpCKb2k3y2A4zGey90o0 It43rDj6pYsWQ1Tn8oTGVXTDdVXvKPU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-240-yuQJI4_1O2ebcW8-0pDPuw-1; Sat, 12 Nov 2022 05:03:57 -0500 X-MC-Unique: yuQJI4_1O2ebcW8-0pDPuw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A4D3F3C02585; Sat, 12 Nov 2022 10:03:56 +0000 (UTC) Received: from [10.67.24.81] (unknown [10.67.24.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 045DB1121330; Sat, 12 Nov 2022 10:03:50 +0000 (UTC) Reply-To: Gavin Shan Subject: Re: [PATCH 1/2] KVM: selftests: Allow >1 guest mode in access_tracking_perf_test To: Oliver Upton , Marc Zyngier , James Morse , Alexandru Elisei , Paolo Bonzini , Shuah Khan Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-kselftest@vger.kernel.org, David Matlack , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org References: <20221111231946.944807-1-oliver.upton@linux.dev> <20221111231946.944807-2-oliver.upton@linux.dev> From: Gavin Shan Message-ID: <1024da03-46f6-b82f-0c17-ca1d95dd171b@redhat.com> Date: Sat, 12 Nov 2022 18:03:45 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <20221111231946.944807-2-oliver.upton@linux.dev> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On 11/12/22 7:19 AM, Oliver Upton wrote: > 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 > --- > tools/testing/selftests/kvm/access_tracking_perf_test.c | 3 +++ > 1 file changed, 3 insertions(+) > Reviewed-by: Gavin Shan > 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) >