Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2185981rdb; Mon, 9 Oct 2023 16:11:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFIsDRFbfy7oYgKxK9Rhnyz0Z0YB0no8Pco75b/I2OCzoetNpmnQA8HtA1FrGJZL9a4Cojh X-Received: by 2002:a05:6a00:b8f:b0:693:4202:b535 with SMTP id g15-20020a056a000b8f00b006934202b535mr18157346pfj.27.1696893095779; Mon, 09 Oct 2023 16:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696893095; cv=none; d=google.com; s=arc-20160816; b=PMSjCWoebV556YoRmQh9u+KXb+31jEhX26SC7qhVV8hSPayfvzXr75xD/Bo9TJJ83i g8Fhe3P0aXjG3FjQNI3uT034ioowZTj9f4MRbVAmAzpee+tVS9FIH5Izm35tiYkAjgX7 Pz53IVtNiogt/Sv/EZfgQwVwaMFuYgykgKmbIHW+AzljAm+ZgPVcLDIH5mOzShT+wSdV ryclBIH33O9VOI8M+dyEpy5HcVICp0lLY2s1ZDf7NeEwqNdw/mLq44O9ItlcN6glQNnp Slpg4xgahmUCbJl742HOeAbmbUX85nqIooXhNJ0id3QMstApdAr1U55a+mPv37YQeVv/ ZTQA== 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=gqnG4RpBlXbew2IIW8/0Y16WbuRr1AUJcTSoXQ3GxWs=; fh=nSGf6E5bqeZ4+WG1wtUl4dHMM2T+/oX4atvC7v39NTU=; b=c/JA/PFCLAvAFE2p0N6MfcFns7U/5f3stg/roAHGSJrRPCCPa7XAFB3SbLOvRikKvZ NBjWkFpf2fpUr9DN7Vo/TBgiAXqqFThAZK8mEBMIzdTrOdUqDngGuIAimO8LxGUkQlQw Tx7zaYjp/z9cRERyzOZ4H9sTRugJIyJmZ2LYGVUYlK5Qj7vR+BvaVkSAipc+P/o12Ezb MZb+/OA1jDpZrnm6y669MNOlmdwi2AbOjVVo6KO1mtJpJwfJqM/NHLMKFc+FL9qOsNTG mvkoDSWPgHSYU1LO3IkUWhbcWPwFrhTdNNBOA9n35LLwfoM7NpbxYr3yT/BJc9yIBmVZ IojQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=sykqH8cO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id i17-20020a635851000000b005775a4a2961si8002042pgm.657.2023.10.09.16.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 16:11:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=sykqH8cO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 337838073DCC; Mon, 9 Oct 2023 16:10:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379038AbjJIXK3 (ORCPT + 99 others); Mon, 9 Oct 2023 19:10:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379055AbjJIXKE (ORCPT ); Mon, 9 Oct 2023 19:10:04 -0400 Received: from mail-oi1-x249.google.com (mail-oi1-x249.google.com [IPv6:2607:f8b0:4864:20::249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3591810C6 for ; Mon, 9 Oct 2023 16:09:09 -0700 (PDT) Received: by mail-oi1-x249.google.com with SMTP id 5614622812f47-3ae32875530so8803358b6e.3 for ; Mon, 09 Oct 2023 16:09:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696892948; x=1697497748; 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=gqnG4RpBlXbew2IIW8/0Y16WbuRr1AUJcTSoXQ3GxWs=; b=sykqH8cOdKRdvXGw2phY/cQrflSnyPEu7t2RqmstyKxKsubhSyWtqL13lyjw1mMsFQ KfoMmCBsCJ3y1ApKZd3yOb38E0yQSInkfg+aOa8zIdwAln8GYt5lQl2ErUxs89BItgga xoCicS1XSH3lXFXPfM3roRMiCoaKM/durA5+i8o8YRSSOH00e6r7Q22jZJVv9koothNh Goi/8ralsD4rpaQBY1+Eh9izG+42RNK2A5MhnIwHWIIw3psc3xFVx/DC7TTG4bbmya4Q dO8+b4nrf0dgMQDqNwHhB+QKBUMuDi2JY2RMo+ZDjsVl/x5D42S1gvTX8LCEpYB+KJbW BDrA== 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=d5gbrilnb6J+FFkafY5E1hfJgN6MUH5ouA8RfWdpyAZMbuixK1Si7D7oG9UQfii7Pe wwYRhbN2S6LdWxgOvW77GAfNrtnHdNzx8PHiNx6ic8+rRPyMwJfvCDnni80ZPMVgjRj3 4cVRi4xw9aoAwHobGjLYK77x7F9Sfl2PX/JorHlqCj1Ku4nPxdZmzbg2UhljBPg5qlkv uTQlT2XyzG7rWEEFL1ndI0mlpMPvUy52Se4nTOT4s9NUsvlNdo0x0rRbOM7WORHkSfKF iGwGKjQUn1sPtyaQx2foyXlnXDVU2bN69vKAlm3gfziOkRrr8T0LgcGnQaM1s53II1Tt mIyA== X-Gm-Message-State: AOJu0YzaSExbUamWcy+GvQA5X8KbnMsbq/2fuhfgNr8vyTB2FyYvtBJk y2y9sLI448k9tOkWYbpVkgAF06OEfNt5 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Mon, 09 Oct 2023 16:10:47 -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 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), -- 2.42.0.609.gbb76f46606-goog