From patchwork Fri Feb 3 04:20:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reiji Watanabe X-Patchwork-Id: 13126994 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 60C94C61DA4 for ; Fri, 3 Feb 2023 04:24:47 +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=WQY/S55yN8ASI0aUO4x6vuKAxWhwWSkFR6P+j0zjkpk=; b=k+frN29HklwVRkmytZSuvZ56/G xOKU80oj4vHaZBYGLg5I2v6NUMeJto62iN/nbw5HUMpDeIDmCdlEl3WihFWYRjBw5XWWvHx8kAaPR zYaQAnX3nQ7P5/jzOFHYIYysjxDYFrfAL7pWJJOMRRuiEW/RN74DyQuFON0KCRNj5pQwrP6AbiIW1 LMAeNy4VdgZb9cIXwqn55aIa4KJzOweNmW4oIiicaovUuVaz+I8rJNieudTrslgVCTKl4kzJC43YJ i6aC9DIoNlLyvNlH7A55hmookC4xiPKWeaLgPhX5U8W0DeHm6Bt2+HhRt6GJDYYjUyVZVJ5ODbCA9 em6yPArw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNnc4-000Jit-IK; Fri, 03 Feb 2023 04:23:48 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNnbj-000JZ1-9L for linux-arm-kernel@lists.infradead.org; Fri, 03 Feb 2023 04:23:28 +0000 Received: by mail-yb1-xb49.google.com with SMTP id w70-20020a25df49000000b00803e799d7b1so3795965ybg.10 for ; Thu, 02 Feb 2023 20:23:26 -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=HBCz7z4MHncYI2KSfyYRfjQx9Mlcxqfcto8G8RgoI+M=; b=WofD4bhyrBhdRY20IdvABnvAxrZJGDg14FMZs4aRUuxFzcyyJNLD8BNBBOaCBqFvKm b+adIuQveo0NZ2IyySWJTMXaRtjsGVoB9q9vxBIimzF8cOvUB73PMiVm5IqyYRtpWWV7 U1/MCwDf1QXL9F7T53pC+otZQ9ZT48w+Eh2gtY2UNGgo+v7tL3ENLIOci92h5nA1fwTO WmmAW0qdiBcWdAT9FsPT+2fUjjG5gputhLsp4bqaRCALKB2qk0fjiArKzUnIeEKPymXU +V9Vcf87R4tkBTJO0TS/VlrxUAGw+6IidvTOCHVsMgkNg4kwnDRKBO4/MwXxSoKUkA2n CcHA== 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=HBCz7z4MHncYI2KSfyYRfjQx9Mlcxqfcto8G8RgoI+M=; b=cffYv9JW+UYpGgxGA+zGNdOx86aLxFL9zL9GNTvDIOh4aQy5CK8AUEXqaMP6k7zIgW +E7DFmiLq23HhKDjNCsHAjQlw3dlsZYJlwyn1wwoojmiw3SYTHCNs+Um8p7/eK7RWFUt RLAWsOJUG6tf2ggigNqzPAGn0gUeMj935xMfdZEBWvXnAipZBUmQBV1RxeQvnXixgVjg sPpk7FgB0+adJc7Y1OkATInkG1m39myJjHLH620rF5HhUy4GvZKtGyOThuiDqC1PzvBk eoArV10PdF87E3SKSm0Ouzig2ur6SrRDKYtCWMML6yLEmZgDnpRtceGAhGdspDbnIBMN IzVQ== X-Gm-Message-State: AO0yUKXsu9xuaIYZjn/OikCYmlBavfuU+TA9y11pXLOjYFplarIY2QHc xzd8uVobG6+lOTB6ysZztoalXWw0i8k= X-Google-Smtp-Source: AK7set/t8pe6lygSGCd7T7jks2ZMy/qqzT75Fgk2uLNRlJkG/RDtkFqloigxMAKyLeMC43xNsHeIvtJtJq8= X-Received: from reijiw-west4.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:aa1]) (user=reijiw job=sendgmr) by 2002:a25:cad4:0:b0:855:fd13:bc37 with SMTP id a203-20020a25cad4000000b00855fd13bc37mr4ybg.6.1675398205745; Thu, 02 Feb 2023 20:23:25 -0800 (PST) Date: Thu, 2 Feb 2023 20:20:48 -0800 In-Reply-To: <20230203042056.1794649-1-reijiw@google.com> Mime-Version: 1.0 References: <20230203042056.1794649-1-reijiw@google.com> X-Mailer: git-send-email 2.39.1.519.gcb327c4b5f-goog Message-ID: <20230203042056.1794649-5-reijiw@google.com> Subject: [PATCH v3 06/14] KVM: arm64: PMU: Don't define the sysreg reset() for PM{USERENR,CCFILTR}_EL0 From: Reiji Watanabe To: Marc Zyngier , 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 , Oliver Upton , 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-20230202_202327_361905_376BDD54 X-CRM114-Status: GOOD ( 12.77 ) 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 },