From patchwork Fri Nov 11 23:19:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Upton X-Patchwork-Id: 13040928 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6F8FEC43217 for ; Fri, 11 Nov 2022 23:21:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ISpoIBJH4cvIlTqpv0MdVr7Vpa3XJtlRXmzIyVzsk5s=; b=0po4zufrkL3Ndv b5Gu1qK6JC4WN3l+3fyDC98moIWTNMf5LsHQM+IK2Nr+MDdyqFE8CBKZ+6W2PmJHkt+0r099//7nC Gd36sGzqkNW61F8scO0xznHXACF8l0RohFLTT4IA4zs/2+TalGnecD9m+Wmulad0Opjf7bHx1DQkF rIv8oILoXTQaigRwHRLkBQIGCqKv9X7xy0lcdKDJnmPphmuD/p/HNCtEjmJ6m428hx33YCKYV9f1a sTxPikKLkcQbN5B1wQbG2LkKBNJUJq7S4SiIm9XLEBTrC+6Vbc7GOdJLZ4ufxUPs9Bzp8nKexMZ8+ zoJ+teIa9Wq3Cg08Dmug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otdJi-001nw0-G0; Fri, 11 Nov 2022 23:20:10 +0000 Received: from out0.migadu.com ([2001:41d0:2:267::]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otdJX-001nqB-Ra for linux-arm-kernel@lists.infradead.org; Fri, 11 Nov 2022 23:20:01 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1668208797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r3Mxkoz9yPxl2ebLuf8V6mN46tSyBQbdzK/qJ9VV9Pc=; b=QfGoQIh4mca3HDhHokOJyORl/l2YJZ4ZQgHTFgn3XROh2W7y85pZ/H3INIZgFDGVziDkjy 2HoloB9tqNz0+jh9eisokKhpuF0fvgoODgC78kE+xRo314fVIafoOsMfpTIoTCZUW7sumB 3/3YQ8glAWj0ck/SQlX/eOLmkRUW2EU= From: Oliver Upton To: Marc Zyngier , James Morse , Alexandru Elisei , Paolo Bonzini , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Ricardo Koller , David Matlack , kvmarm@lists.linux.dev, Oliver Upton , 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 Message-Id: <20221111231946.944807-2-oliver.upton@linux.dev> In-Reply-To: <20221111231946.944807-1-oliver.upton@linux.dev> References: <20221111231946.944807-1-oliver.upton@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221111_152000_049249_90AB0E3E X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Gavin Shan --- 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) From patchwork Fri Nov 11 23:19:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Upton X-Patchwork-Id: 13040930 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63449C4321E for ; Fri, 11 Nov 2022 23:21:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rlaPfFhKiaINL7vu61geYNvkLE+K1H/+dvz/8HTXRTQ=; b=JIexCCA7tNl02v g5XDAcaPrrLvbh8VDGlEFm+YlmNsBeDkMTMbjWky4AQ049OViSU6z/vi6VRo/pE1ZKCSbuS6EMjKE 0TASMfhQFJ+DWLfPqDAy0M6M3ZkblxxXJN9IvRppXKl2WhatjO15jm4MwT4PqQz6cN0s17I9X7YFB WH7bdbqEPDvyP37UbXsJIF08xBHQU8WfC2x9R2gmxmAsSm2e6nQIMuoKxFdNCuMfpbQ1SlsAIBPVD CbqJ6AGl8mDTmy1GmVsGu7LjanRBfKCQOcTRJ9P7ufqGuTULziTRXTPkHSob4954yhJuhEXR4vIa5 WQyHEnLE8Pszi65xLWmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otdJr-001nzx-1Y; Fri, 11 Nov 2022 23:20:19 +0000 Received: from out0.migadu.com ([2001:41d0:2:267::]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otdJa-001nrk-4V for linux-arm-kernel@lists.infradead.org; Fri, 11 Nov 2022 23:20:03 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1668208800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FmNsJgQsGNOtJgVX1p1TSDR/6XSvxYRuK6DmS7w9sD4=; b=LuT2xS0xvyBb4BuQlbPGxoHJsIzKUW15/41hKrCQAKUp+srlIVOqkf/LIWx5jdkSzgxKui YYbIXxGP7YF8SRl/vTQxq/WZWk7OXe7uYnMCYZ4krwEJH4PpfAfpKtTGmlINsyynuXA14r lMV4KJO7dgSyAJXuA2lMl/d9ZDI4FGM= From: Oliver Upton To: Marc Zyngier , James Morse , Alexandru Elisei , Paolo Bonzini , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Ricardo Koller , David Matlack , kvmarm@lists.linux.dev, Oliver Upton , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] KVM: selftests: Build access_tracking_perf_test for arm64 Date: Fri, 11 Nov 2022 23:19:46 +0000 Message-Id: <20221111231946.944807-3-oliver.upton@linux.dev> In-Reply-To: <20221111231946.944807-1-oliver.upton@linux.dev> References: <20221111231946.944807-1-oliver.upton@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221111_152002_364777_9D437F64 X-CRM114-Status: UNSURE ( 6.73 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Does exactly what it says on the tin. Signed-off-by: Oliver Upton Reviewed-by: Gavin Shan --- tools/testing/selftests/kvm/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index 0172eb6cb6ee..4c0ff91a8964 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -156,6 +156,7 @@ TEST_GEN_PROGS_aarch64 += aarch64/psci_test TEST_GEN_PROGS_aarch64 += aarch64/vcpu_width_config TEST_GEN_PROGS_aarch64 += aarch64/vgic_init TEST_GEN_PROGS_aarch64 += aarch64/vgic_irq +TEST_GEN_PROGS_aarch64 += access_tracking_perf_test TEST_GEN_PROGS_aarch64 += demand_paging_test TEST_GEN_PROGS_aarch64 += dirty_log_test TEST_GEN_PROGS_aarch64 += dirty_log_perf_test