From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37D7A100A1 for ; Wed, 12 Jul 2023 08:36:23 +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) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 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.