Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2302581rdh; Tue, 26 Sep 2023 20:47:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFLcozzfzABYAIDknBe/x3X8sKWcc+C5hv8HUi5SgMv+xOz7DcXyTaWmB45VH0mjIyLuFUH X-Received: by 2002:a17:90a:e293:b0:274:9823:b481 with SMTP id d19-20020a17090ae29300b002749823b481mr675677pjz.9.1695786437406; Tue, 26 Sep 2023 20:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695786437; cv=none; d=google.com; s=arc-20160816; b=MDBGf+euduzges6gLnRNXEEcHjkWmv1aIdmjFkktWxvdwe9nFD/+AQBzcLA/DRi4KB BAcquAaJjmjEXwOLP9nphmqqDa95RbJ3We6AQwUwxyJKyhh3e7WMtKj5bwdYhXCNTpas U8uAoosVXHaehMQJsUL4xRuFmiJH8PZ3+7FzEeBU1ITHOy3yywwSUSSSyGyGP+O6t2Oc hxGvD5zDSVWO1uPT8MTKYvIQ1a9G5bkDGufgLusuCFk8v6A6T9WppmpoU1D8NQErwgOG ftgRIfdWgSkivYDpOZ36scMDkZg3dIw18QTIbnqbVfjh/CAeRBDO2aXXcpnfo/1o/2Lz 7VPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=jKu1b4ypf/1yghTsriWdPSnBvGzU0xcIPJuBHtiUctI=; fh=nSGf6E5bqeZ4+WG1wtUl4dHMM2T+/oX4atvC7v39NTU=; b=KTHS2xB8+cTJ4DI5BYOpRv1w8Mz9ftkYueAI3ywWCdRf6eKUjybpFq73Fux9LRt7Uw uqps2xijEzy+vVhC8iGWdWgucpvh6hA87bsiQR4BgGanyIt6PmNCHdgADCfyrn9fu7Ox Z8c0UqV1sCS4Wb7HhCRGAOy3n4pUQ5hW3b/wtAGp96P5EdP7+yRCHQ4GUfdqO+DzLLV+ B6fRmxZ7NX8Qcg8fJDy5pim58xrpDUi/bzz7C6Rd7sFDjzkeChNw3x5EOKDunKLT7N/M E4fuMb0VQymLqV4gyA2If/YGdjzxN2DL62aCCsjj1IakjuCtNDdyLp5mSBXmyep9bpHM YHmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=jxNnwNjI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id b18-20020a170903229200b001c62502d9fasi5547079plh.343.2023.09.26.20.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 20:47:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=jxNnwNjI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7A3F2801B3FB; Tue, 26 Sep 2023 17:22:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232008AbjI0AV7 (ORCPT + 99 others); Tue, 26 Sep 2023 20:21:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232619AbjI0AT4 (ORCPT ); Tue, 26 Sep 2023 20:19:56 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B3921B395 for ; Tue, 26 Sep 2023 16:40:16 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-d8153284d6eso15406041276.3 for ; Tue, 26 Sep 2023 16:40:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695771615; x=1696376415; darn=vger.kernel.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=jKu1b4ypf/1yghTsriWdPSnBvGzU0xcIPJuBHtiUctI=; b=jxNnwNjId4zwWnoM5Lc5fxMEBqlBiEYJXygy1QwBRgaxLJXwDQXN7gKruoh43ieUyu U4uZHU3MgivvYRkJ+nD39LbSJueISZqT4fWOUAszhpIISjN+DZXZH2F3EeDQkwa/tRdf MATE4xKjIGHH21GifDI+imCzzH2V4uHsRXtImqUkKl3wtVmN/m3/4RC+jPK/JdRbDegt hH1PGe92qNRyOgZyEXOiYO4OesoljzhtuGUL89atb169dfQ3NEhD/XmUVH15z1G0+Khf mQoJye0bjbZdVwE/e3jikwNnny4hMVDgwRlVksjTlw8yYRoE/bbC8IcwHh+Awoyp4nrg Wm9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695771615; x=1696376415; 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=jKu1b4ypf/1yghTsriWdPSnBvGzU0xcIPJuBHtiUctI=; b=OeBrA+TaSudiCRvq730qO2ncaWYAknL0wpLgQBzMk6wuJvklPULUluU4aVNSB7YVg3 XARvDIYbNXukVRaDcP91hO+ZEv6UjipnfNHvlV29FfJ23hiWqpy+oSZa7ANW7OBMQPzV UcuJ2NFQ3sIZn5I+Me57ZFCq+xTvr8bG6Gx4/jWWMjVXVpm5U3J+230AyErCU3ZRk8TX 9CSpTBJSGoGsrK5jvoaiAAWs6dJ5OdPlv641mby8KihNZwDJCd3sdF/buvYDuhq2/ZRD AOI346tHE2KxrjNjfi8rxQ+qpruujPdSBrp5pEUMWSw7WIKizXlMTB/GbJ5kygRbKJdJ OMVQ== X-Gm-Message-State: AOJu0YxVsTWMAPNrAWyqY3GzbQmmcYPW6d6+RHahIjncO2UFVPZ+dy+4 PnOfaE15dYLdGYxt/J3U9oETrjAIQsRB X-Received: from rananta-linux.c.googlers.com ([fda3:e722:ac3:cc00:2b:ff92:c0a8:20a1]) (user=rananta job=sendgmr) by 2002:a25:ad13:0:b0:d77:984e:c770 with SMTP id y19-20020a25ad13000000b00d77984ec770mr4746ybi.5.1695771615699; Tue, 26 Sep 2023 16:40:15 -0700 (PDT) Date: Tue, 26 Sep 2023 23:40:01 +0000 In-Reply-To: <20230926234008.2348607-1-rananta@google.com> Mime-Version: 1.0 References: <20230926234008.2348607-1-rananta@google.com> X-Mailer: git-send-email 2.42.0.582.g8ccd20d70d-goog Message-ID: <20230926234008.2348607-5-rananta@google.com> Subject: [PATCH v6 04/11] 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 26 Sep 2023 17:22:04 -0700 (PDT) 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 --- 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 ffd123fae30d6..66b9e1de54230 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), -- 2.42.0.582.g8ccd20d70d-goog