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 5CF4AC7EE29 for ; Mon, 29 May 2023 13:39:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229824AbjE2Nje (ORCPT ); Mon, 29 May 2023 09:39:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbjE2Njd (ORCPT ); Mon, 29 May 2023 09:39:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 234428E for ; Mon, 29 May 2023 06:39:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8DD1961475 for ; Mon, 29 May 2023 13:39:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4808C433D2; Mon, 29 May 2023 13:39:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685367571; bh=TywXBZ4m9v2GLWYycQVa7xcIyqIEXSB8qeMjgXYIglk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TtEYO7tHBR+J/9QisSHq8YmHGvb2xrlMqvyiybaCrHQqHABteBA9p6sTjzrnHWeh1 SHVjrcU+xqBWsnFkRVdRwgCAPak4DVvdIIslGkwr6ng0gfF/VQqSo/a/dJ7/PSi/// 4fBq8yRy+cIk0Cox9MtCEaIldzcvqzFKYj4pOuT1JDCpnePwcPymaB8vO3qBS7/m6H nIJMUhvc1yTm8ItttRkZyl7KLw2V1mwUFhmLfBcg0X7eBdeq8CZmVWevBDPkarSPDo kd6TYzWO1AImovdRQOMVWhogK6mZT6OZEhpDWNLXcwM1i/4TdaJxeOqWkfyMb8/Mdx cB8ui/eeXh2Sw== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1q3d5s-0014lC-I2; Mon, 29 May 2023 14:39:28 +0100 Date: Mon, 29 May 2023 14:39:28 +0100 Message-ID: <87zg5njlyn.wl-maz@kernel.org> From: Marc Zyngier To: Reiji Watanabe Cc: Oliver Upton , kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse , Alexandru Elisei , Zenghui Yu , Suzuki K Poulose , Paolo Bonzini , Ricardo Koller , Jing Zhang , Raghavendra Rao Anata , Will Deacon Subject: Re: [PATCH 0/4] KVM: arm64: PMU: Fix PMUVer handling on heterogeneous PMU systems In-Reply-To: <20230527040236.1875860-1-reijiw@google.com> References: <20230527040236.1875860-1-reijiw@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: reijiw@google.com, oliver.upton@linux.dev, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, alexandru.elisei@arm.com, yuzenghui@huawei.com, suzuki.poulose@arm.com, pbonzini@redhat.com, ricarkol@google.com, jingzhangos@google.com, rananta@google.com, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Sat, 27 May 2023 05:02:32 +0100, Reiji Watanabe wrote: > > This series fixes issues with PMUVer handling for a guest with > PMU configured on heterogeneous PMU systems. > Specifically, it addresses the following two issues. > > [A] The default value of ID_AA64DFR0_EL1.PMUVer of the vCPU is set > to its sanitized value. This could be inappropriate on > heterogeneous PMU systems, as arm64_ftr_bits for PMUVer is defined > as FTR_EXACT with safe_val == 0 (when ID_AA64DFR0_EL1.PMUVer of all > PEs on the host is not uniform, the sanitized value will be 0). Why is this a problem? The CPUs don't implement the same version of the architecture, we don't get a PMU. Why should we try to do anything better? I really don't think we should go out or out way and make the code more complicated for something that doesn't really exist. Or am I missing the problem altogether? Thanks, M. -- Without deviation from the norm, progress is not possible.