From patchwork Tue Jul 2 16:35:13 2024 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: 13720069 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 E5648C30658 for ; Tue, 2 Jul 2024 16:35:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type: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=xACPF8qTitC4C85q3Uzl6H9P/C7FAYrxs6IESUhBvq0=; b=XHGxwOfS+7g4NO/yhwKbLDygeg IcqAKxv4Z27pkF4uib9KdBJZ+ABTxZ96drQ2iTqOhccmO2lXHtuAy3tAWGMYLvwOVfaaJeqieAbs1 Wpd/sAsA7quxSHPrZ59NCItCMLSeO7HSvEEpxXwmXVlvAeLAb5pAIZcNvKw29GHyUh7KOhFsLGlmN axEBaByCaeE7CwBFdFBvYOnBQv/32tmXs3SnOpVQa9dBn4sHsKefF3vcVHIL+Sb0yk3No3IsBM+/v f3Fsq3Iy+3lrlEmF5VM4GZj+Trk2mZsTYdC/SwgfKUQZ4L53iqKARR+2f/p3LhkEeGg+nzO1tEVpn iBm3uiyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOgTk-00000007OOz-1eMr; Tue, 02 Jul 2024 16:35:40 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOgTQ-00000007OIA-0zhx for linux-arm-kernel@lists.infradead.org; Tue, 02 Jul 2024 16:35:21 +0000 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-58c2e5e8649so597104a12.1 for ; Tue, 02 Jul 2024 09:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719938118; x=1720542918; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xACPF8qTitC4C85q3Uzl6H9P/C7FAYrxs6IESUhBvq0=; b=iF50Qd3kiln8gcEnO6CnzrxDFneNypxgRFYmGwT9Hv+wVBkQ39seccCSI/iRViUtaU X5iy5E/KTmmuMWw9KjK2Ud7fG5BHcXBFBO3UXsPEqzddvuqb+o6znowQ4HZg3g2dq14g RoT3s9wO7j2bUeQRZ9HqlM1UxRDDLhq+9Nz9HXwepvXnaFBTID+bfuGWLAMqw+RfNLSL i2NBI3WrEPNn71TvxtSsM17e8DVQpbmQIFFY8U7HAEQowhLDI8YBisIqYVfk1RwOeoHq zvAkgjp0FVhrzCPr9i7wqP11n85NX7mpArgspZBP1D/p4mBefuPDTw6NfQiQwRCoRDAK JBTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719938118; x=1720542918; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xACPF8qTitC4C85q3Uzl6H9P/C7FAYrxs6IESUhBvq0=; b=SPDNi5wxc7Iu3ZErHZu9Dy7bFaKJ8n1lcr3AuqmWxpiVGKljKr0nkAymzaTBZnS2zZ t7tl+y2hpbvROz6GDzOOMlJwiR0Tanz2Bb2fvd+ibAInW6KMN67ZMq/zqjJ9f2z1dzrG E3L7zm8EpLSAjmtd6v41ILePRauE/QvWBeQt4KXMuEdcdDsidFaL6nbca5OzChK1LGDF b23kH9FxpCGAm4uZP2adTfW7hlP8m33ygW8Ll/Cr6JYfLNWZ17XrhJcPpYrrApq5LSll AgEXiHmsPwfOWVsJtU56/Zxu5ZJ3FW8Wx9ZsVETDgT13tNqbjtmTyptcY20S+MhISHJs MI6A== X-Forwarded-Encrypted: i=1; AJvYcCV+72wRaDISIryQPBXoLJ+gZwEuT6OHlc46MBADy4NV2r0OKJrwbEWvCL0m6fE/dXyv6fecvvpSzg9Tdxd91HAfQrgySXW7TKcJqPdxdQT5FeL3OTI= X-Gm-Message-State: AOJu0YxOf+NdMrp1J40VL90ZZXO+h1BpdtUXMbP58u/E343ksqx1zGv9 8CQezC5POo6gXAYkaJSqj0wgZkg2eqZ+ARvI6l2Ct3blGEbY68qMznrNmVnor3U= X-Google-Smtp-Source: AGHT+IFn+KAnLT7OQQYFhCtyRn1CjpvcLN6nIOZfDstHnU2Uiz2RCBWdS7oCkVfmV4i1lqUv2u3LZg== X-Received: by 2002:a05:6402:26c8:b0:584:21eb:7688 with SMTP id 4fb4d7f45d1cf-5865d47375fmr11121050a12.14.1719938116959; Tue, 02 Jul 2024 09:35:16 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5861324f08esm5839957a12.27.2024.07.02.09.35.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 09:35:16 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9E1C35F790; Tue, 2 Jul 2024 17:35:15 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: pbonzini@redhat.com, drjones@redhat.com, thuth@redhat.com Cc: kvm@vger.kernel.org, qemu-arm@nongnu.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@arm.com, maz@kernel.org, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [kvm-unit-tests PATCH v1 0/2] Some fixes for running under -cpu max on QEMU Date: Tue, 2 Jul 2024 17:35:13 +0100 Message-Id: <20240702163515.1964784-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240702_093520_305366_C4955327 X-CRM114-Status: GOOD ( 11.36 ) 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 Hi, The following fixes try and make the experience of QEMU -cpu max a bit smoother by actually checking the PMU versions supported. You can also set -cpu max,pmu=off to fully hide PMU functionality from the processor. As max includes all the features we also need to take into account the additional TGran values you can have with 52 bit addressing. Please review, Alex Bennée (2): arm/pmu: skip the PMU introspection test if missing arm/mmu: widen the page size check to account for LPA2 lib/arm64/asm/processor.h | 29 ++++++++++++++--------------- arm/pmu.c | 7 ++++++- 2 files changed, 20 insertions(+), 16 deletions(-)