From patchwork Sat Feb 11 03:14:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reiji Watanabe X-Patchwork-Id: 13136805 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 6A2C9C636D3 for ; Sat, 11 Feb 2023 03:18:26 +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=D9mRpHRFGdtiAwoGdCb6mnn1/nZ+EUvy2W1O0gWwtyA=; b=D/vDsJPUKxuEKHYwG085GIk7Eu q+jXqzCTWBYuk+rR4GBfCbguoADFyoeSkbqU8/WQBPmfY4mIsMOUxgtop1t/5Z4uKwd4ObZL1nloE noeJjoAcJE5AkJm+RgOV2nWAHqqTUbvcQMb2oSQNKWi6LPS2z/XiuSsFGMCppxNCXX7SznAcWRJWu zituK1kK/uu6wh4AlGNOg7SMr3xoNjE+PrE0o+H27YIhgo4TkzyDlwjratgXTLZcAsY5AiB7qbEB6 tyMCMpQ8jV/xZpbiFrrXNZon+dhNos/AB1HlQL+6i3gllowPG1rBdpaovYD2VnVtK4a2QzP28qLJC 0nbVp94w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQgOF-008R9C-7G; Sat, 11 Feb 2023 03:17:27 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQgNZ-008Qoz-UN for linux-arm-kernel@lists.infradead.org; Sat, 11 Feb 2023 03:16:47 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id a17-20020a256611000000b00889c54916f2so6766105ybc.14 for ; Fri, 10 Feb 2023 19:16:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=agf94AuTrHxCSXQaehK7Zl4P+40uGWhpn6X3L2a5GPA=; b=TFQ9QwV+p6zUCAWb8PQ0XUHpz7d7S20zrq4xFspgd62UPZ8ZwVLp4FZ7Ec0wXAGy5a mUxV/RSLDot3wPpar3LEfqAk4isVq7lujAAUEdQ+BVhpTKJfalBLcQFf73xu3sxW8ILJ OqJ6EygOpMRO/Ld2MC1q5qpUuvu2XVn00RDJtJBzH4okHXFIzloWw/Vs6rNNYaev3lry Gjxc5PFysYHP1T0QhyUXufhh2mmxWaRDlJFliqoDphGxMCC8l83XTNFqlwlGLxH7xHU0 pMCa4lN0GmitdJIkqs0wtz9Cz/4owPsEdfJtJ2wHG3WV8DHTXA43OPrbrfXfRUEivPcA z9lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=agf94AuTrHxCSXQaehK7Zl4P+40uGWhpn6X3L2a5GPA=; b=z4r0sXofsFlp1l4Wukz8Is3xQUqdOGwM+4BX7Qt7CIQVedtaamgZAMlU5MEuTt8AC9 jo9rfMX6NNtVeYRSNKzFX0MkW6706Wi6GxOhVUM+0QaKMmY34l3TuR5dEISFVO0Iq7RJ KZkWy1rYjUYt1mi2wcayHvJgcw6whZkAALU89gCaA3M4PCbCKE8EKtotX1/9bRzXHKpt FICpTVjJL+clI3+gtqY6ODbDx2Ocpefbzh5K8kfOxJMwbjRoXM9iDiEkzb+1CpNNKDLR php3K2yiwc4Z6/caWq1Muh0CVingqQj7zBUUUUnkySXwH+E0tM1yvgSg53AsljNtKJQL OI0A== X-Gm-Message-State: AO0yUKUxBmSGvfTT+CP1gnzr/TwyBTk+bv8l2/+wTBQKdleYWk7KaI91 InBoC4m/L2LucqwA642uAplHc73Ou48= X-Google-Smtp-Source: AK7set9b7sVz+BIQF/Y69bLjTeuuu6haCf6tB27Fceumt1tmwKTb6i26DmdDPHoNuYujCvhTV68xnHmJoKo= X-Received: from reijiw-west4.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:aa1]) (user=reijiw job=sendgmr) by 2002:a05:6902:54a:b0:8bb:dfe8:a33b with SMTP id z10-20020a056902054a00b008bbdfe8a33bmr77ybs.9.1676085403814; Fri, 10 Feb 2023 19:16:43 -0800 (PST) Date: Fri, 10 Feb 2023 19:14:58 -0800 In-Reply-To: <20230211031506.4159098-1-reijiw@google.com> Mime-Version: 1.0 References: <20230211031506.4159098-1-reijiw@google.com> X-Mailer: git-send-email 2.39.1.581.gbfd45094c4-goog Message-ID: <20230211031506.4159098-7-reijiw@google.com> Subject: [PATCH v4 06/14] KVM: arm64: PMU: Don't define the sysreg reset() for PM{USERENR,CCFILTR}_EL0 From: Reiji Watanabe To: Marc Zyngier , Oliver Upton , kvmarm@lists.linux.dev Cc: 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 , Shaoqin Huang , Reiji Watanabe X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_191646_019132_0DB3B368 X-CRM114-Status: GOOD ( 12.62 ) 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 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 --- 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 e6e419157856..790f028a1686 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -1752,7 +1752,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(SYS_PMUSERENR_EL0), .access = access_pmuserenr, - .reset = reset_val, .reg = PMUSERENR_EL0, .val = 0 }, + .reg = PMUSERENR_EL0 }, { PMU_SYS_REG(SYS_PMOVSSET_EL0), .access = access_pmovs, .reg = PMOVSSET_EL0 }, @@ -1908,7 +1908,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(SYS_PMCCFILTR_EL0), .access = access_pmu_evtyper, - .reset = reset_val, .reg = PMCCFILTR_EL0, .val = 0 }, + .reg = PMCCFILTR_EL0 }, { SYS_DESC(SYS_DACR32_EL2), NULL, reset_unknown, DACR32_EL2 }, { SYS_DESC(SYS_IFSR32_EL2), NULL, reset_unknown, IFSR32_EL2 },