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 1C9AFEB64D9 for ; Wed, 12 Jul 2023 08:38:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232887AbjGLIi5 (ORCPT ); Wed, 12 Jul 2023 04:38:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232486AbjGLIhs (ORCPT ); Wed, 12 Jul 2023 04:37:48 -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 9E4A21987 for ; Wed, 12 Jul 2023 01:36:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 32F6A60DD5 for ; Wed, 12 Jul 2023 08:36:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 936E1C43391; Wed, 12 Jul 2023 08:36:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689150983; bh=l4Kn5TJNw7wRZQEm7UHDmvbXG/8WcpDSoZhthGLfRuE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=f0CjJVpY1M7J6wrW8dwqoMGBefRQDFZP7/lgdcgjlxvO/iLSzZ2qyZGjEt7/WLwj8 VbAg8kyEWcodQDcIeIcU1aGehZqzPrdjYXUHBpHzzy3Ivm01tnI79o3qB9j63rE/0B PEARe0FYbXV2Zr7ctf+alraOt9hl5B/167jUbdsg4EuyPhM5gmzTU44DdRrvo6T+yQ YNcckB0acQQweV0DI4MN6DOKknbPutL5c4AHKltn7/o+628XXszbW7xwF1hzbFcM6/ yG2vFh7q+0nh6MFwBbgN4zESEZlTVwQoD12tE5Aq0qDDrwwOxUtT+7wXMYHfuoR6Lj pHz7DKJII0F9g== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.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 1qJVKf-00CNbK-3G; Wed, 12 Jul 2023 09:36:21 +0100 Date: Wed, 12 Jul 2023 09:36:20 +0100 Message-ID: <868rblwmpn.wl-maz@kernel.org> From: Marc Zyngier To: chenxiang Cc: , , , , Subject: Re: [PATCH] KVM: arm64: Fix the name of sys_reg_desc related to PMU In-Reply-To: <1689148505-13914-1-git-send-email-chenxiang66@hisilicon.com> References: <1689148505-13914-1-git-send-email-chenxiang66@hisilicon.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 (aarch64-unknown-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: chenxiang66@hisilicon.com, oliver.upton@linux.dev, james.morse@arm.com, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linuxarm@huawei.com 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 Wed, 12 Jul 2023 08:55:05 +0100, chenxiang wrote: > > From: Xiang Chen > > For those PMU system registers defined in sys_reg_descs[], use macro > PMU_SYS_REG() / PMU_PMEVCNTR_EL0 / PMU_PMEVTYPER_EL0 to define them, and > later two macros call macro PMU_SYS_REG() actually. > Currently the input parameter of PMU_SYS_REG() is other macro which is > calculation formula of the value of system registers, so for example, if > we want to "SYS_PMINTENSET_EL1" as the name of sys register, actually > the name will be as following: > (((3) << 19) | ((0) << 16) | ((9) << 12) | ((14) << 8) | ((1) << 5)) > > To fix the issue, use the name as a input parameter of PMU_SYS_REG like > MTE_REG or EL2_REG. Why is the name relevant? Is this related to tracing? M. -- Without deviation from the norm, progress is not possible.