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 BF2297485 for ; Fri, 14 Jul 2023 07:59:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BFC5C433C8; Fri, 14 Jul 2023 07:59:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689321566; bh=ykyvyun0QCvrp/NA9j6tIx5hvxfqgpAg7c/Wn4DgfnI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GOeAhK4TE2E5pCkK0sA8qRC//O3C3Euc/utS9CGGgiqTOZ96o4PycP+coECQkXtgO MctEtgrh8D50FQ0BJ5VeCMfifGUEM8rVe23pD/gkpeerLbEuzqNOoDOgBMgXx1rxfk t8lZZ+y4XdJIft7jXTNtfjSF5S00pqM3specTthA2KVkzNufzV6tb7j1IZ3bmcfVgz uRQE5iiqfe7shdt1ZNZLDNwljXEmn2OvGM01zb56oKV+hrLn0UE2ZacZ+vvW7X7GfU WXQYt3OsIexaXloitTiJ1EjVX/yqQANda9szUVWjyenzgbmBJC+6DHeEwxX3EddiXm 2QQLwTYHw2XVw== 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 1qKDhz-00D1Si-UW; Fri, 14 Jul 2023 08:59:24 +0100 Date: Fri, 14 Jul 2023 08:59:23 +0100 Message-ID: <86pm4uvs84.wl-maz@kernel.org> From: Marc Zyngier To: chenxiang Cc: , , , , Subject: Re: [PATCH v2] KVM: arm64: Fix the name of sys_reg_desc related to PMU In-Reply-To: <1689305920-170523-1-git-send-email-chenxiang66@hisilicon.com> References: <1689305920-170523-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 Fri, 14 Jul 2023 04:38:40 +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 another 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 we get is as following: > (((3) << 19) | ((0) << 16) | ((9) << 12) | ((14) << 8) | ((1) << 5)) > The name of system register is used in some tracepoints such as > trace_kvm_sys_access(), if not set correctly, we need to analyze the > inaccurate name to get the exact name (which also is inconsistent with > other system registers), and also the inaccurate name occupies more space. > > To fix the issue, use the name as a input parameter of PMU_SYS_REG like > MTE_REG or EL2_REG. > > Signed-off-by: Xiang Chen Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.