From patchwork Tue May 25 17:42:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 12279777 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A488BC2B9F8 for ; Tue, 25 May 2021 17:56:48 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6552B61003 for ; Tue, 25 May 2021 17:56:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6552B61003 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: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:In-Reply-To:References: List-Owner; bh=oXEFOx0kvjmt3Ltw/0iCGUH+ZH0EVaNgnB3uP3DxJPo=; b=kXOQnpntNP8/6q zg6aaGixpPbd/bz22zOZzhRsCdMkhpsjzedsz4ebe/EmzdyaFAhJBSGDvSXVInY/zaLHh8XTNFoxp PvO2LPX/rVtKSy7IEfmTIV+5QB0yYRpo85q6qx93023Y5PRFSbw9rqiOreL64H2JR+xLvtZj0UDz8 JpHqzoqAJGMLcCH9T5NBe2QaPyddzuXEddzuq5nQ39g6PZTveqN1PONFoq5URALAqOshQ6pgFvj/T kKR08faAjawgyknPdCvjb7e5r0ltGlbvJhb+D7fb+GINvg3xcUxFBi7Kmto4zR4R7KknuXdHRPQ5o QErDgVGHVNzCMtEjGTCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1llbGJ-0074MU-P1; Tue, 25 May 2021 17:54:41 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1llb4e-006ylu-6l for linux-arm-kernel@lists.infradead.org; Tue, 25 May 2021 17:42:37 +0000 Received: by mail-wm1-x330.google.com with SMTP id u133so17203915wmg.1 for ; Tue, 25 May 2021 10:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xRd9XsO+PDr6n4FeCOKrjoZ73C+wdSaKiGHr6cRSi/o=; b=lcuvChzJ8BN2TYlPcmvvAZ5Q1xMlrBmS6r7ceo1rAACSz8yGjYpW+/iucHYFCQ0Wtd 6w0DRSeHgsM28X67c9WCerAUnRIiXLyA0Wi7Ni8yoZc7SJ+HtTx2oio0cOFQA6fzRa0B ApTF3w5tVirxlb7+AohSilHxlzQwyDv+MexiO+tDQGOcseSL09qetYIZS4pPRsmYGJMm N5WHGRY+kRtvDtApIvxHS0tn8Y8N1Rvc7YA4CWBuWvPEH4ctTCXt22B3tF8ft69JgPiI IgfwpdhDSf+t6Ai7635kgD4PE1ZBCb9vdU/puofaNvmoQaBY2eDAKLfR7qPbp9lMt0pH BmDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xRd9XsO+PDr6n4FeCOKrjoZ73C+wdSaKiGHr6cRSi/o=; b=kMvhj8ZPu4i1DBzLhehYSWE5VzasRi7mXgrTyxase2yzqcFF/zZzH75KrFyjAWdyKq oW2NSwzuBVKWAA1rNo0i+9NBa5kaEZTgMa3Tx1alNfipp3+2mx9h/6qv18VbNUzOKRKK QOu9uyG3p03Ls0FCPm/igCwN2gXuUlv/DjEVwqapMDFX4rjVlM3gmxT/yexvCE/lB7vZ OTm1bW1ZyT2rxwuCIr2cwYxfjTAAn/0mNIEfXfYarAA7dV3Fo76n7UV0cu9aEmUOAIrR Jlc3HPTVCTNGdHym04QAFXTWkAzvjqp8jHm/fHK5w/vxL4AT88sS6CYP29PHl7g4zlvF d4fQ== X-Gm-Message-State: AOAM530bxl5LCgrNNp+GZEjYSdiCgYP3ecJ4TEjR7GGlDh3GWbEhJDfy HP2lxOc5GtP4W97OOF7aRUVC6w== X-Google-Smtp-Source: ABdhPJxaqQHNaLKGr4fuwt/Q7tHiqBlX9WrKJ8ZFkr85g6fKVEx9BNsMXajWfHgn+YRz4uEKvCtTeg== X-Received: by 2002:a1c:b646:: with SMTP id g67mr24639077wmf.117.1621964554306; Tue, 25 May 2021 10:42:34 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id d3sm16788921wrs.41.2021.05.25.10.42.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 10:42:32 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C4ADF1FF7E; Tue, 25 May 2021 18:42:31 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@arm.com, maz@kernel.org, qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [kvm-unit-tests RFC PATCH] arm64: split pmu tests into tcg/kvm variants Date: Tue, 25 May 2021 18:42:21 +0100 Message-Id: <20210525174221.16987-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210525_104236_297475_3C4B32DB X-CRM114-Status: GOOD ( 10.83 ) 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 QEMU is able to give a counter for instructions retired under TCG but you need to enable -icount for it to work. Split the tests into kvm/tcg variants to support this. [AJB: I wonder if the solution is to have a totally separate unittests.cfg for TCG mode here?] Signed-off-by: Alex Bennée --- arm/unittests.cfg | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/arm/unittests.cfg b/arm/unittests.cfg index adc1bbf..2c4cf41 100644 --- a/arm/unittests.cfg +++ b/arm/unittests.cfg @@ -66,24 +66,40 @@ file = pmu.flat groups = pmu extra_params = -append 'cycle-counter 0' -[pmu-event-introspection] +[pmu-event-introspection-kvm] file = pmu.flat groups = pmu arch = arm64 +accel = kvm extra_params = -append 'pmu-event-introspection' +[pmu-event-introspection-tcg] +file = pmu.flat +groups = pmu +arch = arm64 +accel = tcg +extra_params = -append 'pmu-event-introspection' -icount shift=1 + [pmu-event-counter-config] file = pmu.flat groups = pmu arch = arm64 extra_params = -append 'pmu-event-counter-config' -[pmu-basic-event-count] +[pmu-basic-event-count-kvm] file = pmu.flat groups = pmu arch = arm64 +accel = kvm extra_params = -append 'pmu-basic-event-count' +[pmu-basic-event-count-tcg] +file = pmu.flat +groups = pmu +arch = arm64 +accel = tcg +extra_params = -append 'pmu-basic-event-count' -icount shift=1 + [pmu-mem-access] file = pmu.flat groups = pmu