From patchwork Mon Oct 9 23:08:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghavendra Rao Ananta X-Patchwork-Id: 13414647 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 57E72E94139 for ; Mon, 9 Oct 2023 23:09:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=i2Am19kQIhaPMv3j94l5EkV8qponddiMoS9VLvvWIn4=; b=Z8ke279D6rjwfX8J3IXey/CPBS LiCaNDnKePbuvJFLKCg3W3dtBQP7CIFhrrGtfx9n5Bjt+fpQQOyVtTwpXsU0Zh+F+97sW1cqHCMnE 01pNIKNmLGKGpU1LsXl4H9TvYcVYg5UIpGwDfVOTm4SCHjoF413f1ES1Liq+lN4ZJp6NmcmqrvgiR brsANO7juz5JR5HSeAdpo/7ou07bkT9Nei/vX7WZe2vEWYSC8ziQaQLetjcRw7llj+wsdP+kLZdXe EvkvU6gFNOQGWikvkIMCSJiRpZX+9tMSIf1yOvqOVZL6OwScK07sVa2xTa5aObsIbkP0DuOg0g1K0 pqCp0rDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qpzND-00BmnS-0s; Mon, 09 Oct 2023 23:09:15 +0000 Received: from mail-oi1-x24a.google.com ([2607:f8b0:4864:20::24a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qpzN7-00Bmjs-2Z for linux-arm-kernel@lists.infradead.org; Mon, 09 Oct 2023 23:09:11 +0000 Received: by mail-oi1-x24a.google.com with SMTP id 5614622812f47-3aec0675519so8827100b6e.1 for ; Mon, 09 Oct 2023 16:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696892948; x=1697497748; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=gqnG4RpBlXbew2IIW8/0Y16WbuRr1AUJcTSoXQ3GxWs=; b=1c4TPK7VClM7nMgaTtCDPIciXrJk2VZy/agO7D5eVn8Htm/WOZeEWV/BqyukI5ZN0n /ci9DJS6u6Vtg6RXGL1Fe7NxSoG7x3hX6L9w/Ao50iKymMmujbwspU2uxEL5Nei1/rsp e0+pCdUNk/MTUbtlsiCmfKSzCwlh059nJtDKDFbleAt95i9RIL56WLC5/QqPM6ZLV+9K p36Q48LsxhjyPQZmeytWVoaQVatH8ZM4oODwrsZLx3CXVhsmfu0YYdS3Uj5Pm/f0ADn8 QVSHlMTQUcgDe7pmFY39hvys4tpqv0KrX0warfr+8QtRBQ9AXai56wj8CY7ly376Mds5 rnYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696892948; x=1697497748; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gqnG4RpBlXbew2IIW8/0Y16WbuRr1AUJcTSoXQ3GxWs=; b=Jjx0R+XTBGwnFl0wW2XbPTNNSRc+oPdoQAEX+DMilygQCLEv2jw89hmCCKESwrdgkl qZHQ+2XqJNnPlZOj2/tRcNOMKSgSbX/uPcCT7uMY7G7XEIRgBRnDYAU9NKJwdlup0G27 nrbR1cS7dJMkWKnSt7AMA567lA0+Yi1LPmKxOGqj3qXt9X9LEILyB/Ds2SeCWJrn8cZy dGLoTbQCNxEtnzudt5lTN++aa0cmkkxX4EykpQPq0USxn8m3HIDOF9WtIdRy8udoab6y 7/8b2M9I/xHHT6XLodsMwCDRl9gb2qNryodOKzejphNlgTTYU8P+JK/3s2gTpokUAZEG Lkzg== X-Gm-Message-State: AOJu0Yw8IpCT72HqbbiUaP2T0M4d/QK49d2v2BFLXBA19CnEirkq2s+E xM/4vmko6/RkqU4cdiK1Ob3bdY3t2Iw7 X-Google-Smtp-Source: AGHT+IHZZh94mOKGfOCAtlgZAgd/+koLjHYW/Z6Xqzqw/ekKEsynPRD2lrKaZKtg4PoFRUM5ElzQFOQbafP8 X-Received: from rananta-linux.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:20a1]) (user=rananta job=sendgmr) by 2002:a05:6870:7686:b0:1c8:f237:303a with SMTP id dx6-20020a056870768600b001c8f237303amr6171317oab.5.1696892948012; Mon, 09 Oct 2023 16:09:08 -0700 (PDT) Date: Mon, 9 Oct 2023 23:08:50 +0000 In-Reply-To: <20231009230858.3444834-1-rananta@google.com> Mime-Version: 1.0 References: <20231009230858.3444834-1-rananta@google.com> X-Mailer: git-send-email 2.42.0.609.gbb76f46606-goog Message-ID: <20231009230858.3444834-5-rananta@google.com> Subject: [PATCH v7 04/12] KVM: arm64: PMU: Don't define the sysreg reset() for PM{USERENR,CCFILTR}_EL0 From: Raghavendra Rao Ananta To: Oliver Upton , Marc Zyngier Cc: Alexandru Elisei , James Morse , Suzuki K Poulose , Paolo Bonzini , Zenghui Yu , Shaoqin Huang , Jing Zhang , Reiji Watanabe , Colton Lewis , Raghavendra Rao Anata , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231009_160909_835333_1A13BA0D X-CRM114-Status: GOOD ( 12.58 ) 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 From: Reiji Watanabe The default reset function for PMU registers (defined by PMU_SYS_REG) now simply clears a specified register. Use the default one for PMUSERENR_EL0 and PMCCFILTR_EL0, as KVM currently clears those registers on vCPU reset (NOTE: All non-RES0 fields of those registers have UNKNOWN reset values, and the same fields of their AArch32 registers have 0 reset values). No functional change intended. Signed-off-by: Reiji Watanabe Signed-off-by: Raghavendra Rao Ananta Reviewed-by: Eric Auger --- arch/arm64/kvm/sys_regs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 3dbb7d276b0e..08af7824e9d8 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -2180,7 +2180,7 @@ static const struct sys_reg_desc sys_reg_descs[] = { * in 32bit mode. Here we choose to reset it as zero for consistency. */ { PMU_SYS_REG(PMUSERENR_EL0), .access = access_pmuserenr, - .reset = reset_val, .reg = PMUSERENR_EL0, .val = 0 }, + .reg = PMUSERENR_EL0, }, { PMU_SYS_REG(PMOVSSET_EL0), .access = access_pmovs, .reg = PMOVSSET_EL0 }, @@ -2338,7 +2338,7 @@ static const struct sys_reg_desc sys_reg_descs[] = { * in 32bit mode. Here we choose to reset it as zero for consistency. */ { PMU_SYS_REG(PMCCFILTR_EL0), .access = access_pmu_evtyper, - .reset = reset_val, .reg = PMCCFILTR_EL0, .val = 0 }, + .reg = PMCCFILTR_EL0, }, EL2_REG(VPIDR_EL2, access_rw, reset_unknown, 0), EL2_REG(VMPIDR_EL2, access_rw, reset_unknown, 0),