From mboxrd@z Thu Jan 1 00:00:00 1970 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 A6A7FC4332F for ; Sat, 10 Dec 2022 11:19:53 +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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jQOJNiyXvkY1E0RSfr+m4NhLZHi+nVIEIGYYoBUSGv8=; b=ds+sL6xiN4Cc3I jia52sc1DM2JfX353zDWVtt89cFALRKdrBXRxSSebnZmXirAGQySt/cSodJiGQPZr1G7uXpK83SUe cCZTWOLxC87GFoax37iGPGOKkgRlU/4MevMK4jQ2nPb6Cpi/AMohF8OamptUR71ze7ccd7kZAU+Th mRKS/WaBP8OKLaLMNgNeQrXbn2qzlV9fdEK5oO26F+mjJhRye2wSoFp7jm37SoUkwZpeHjMZJSJpc xwQ+f3wi/lHNCy3XhEEErYSFrzfSWDoFphfCmfKmyPkjZj/jAasLkJnedLC/4pQYJIbpFcP7qaO3U WmHJ3a2vqNjAWACkhNRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3xsA-00GiF4-4b; Sat, 10 Dec 2022 11:18:28 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3xs6-00GiD7-3K for linux-arm-kernel@lists.infradead.org; Sat, 10 Dec 2022 11:18:23 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 12D31B829A6; Sat, 10 Dec 2022 11:18:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A00BDC433D2; Sat, 10 Dec 2022 11:18:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670671096; bh=2ol2CYikgIYVfVb+OZiZSB+xwMyqaLEDiIfsEIqMMHk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IRXwJzG5tMMKaadAVZ+PcfLGh9BTuFHJX08H6Sc6kTynyxsZOMM8gw8o8kpOlLYAj F1TkATzT9Jrv2AKL28Cnm+dvydIYU3RONnQ78BmIF6Mq03PpSpyKBz4qsZasO45Yo7 nSq5R3vNDfBybRW+arijzqeplXYbj/E1RCn9lIOjMnjkdpx7Ybt2ELEAHsBhj3EaBZ GB+zNQ5a4/PovtZIvbHpHhjADiuELKffmgv7VwmrPNYxuj5iErELcWDtwy2HAgfzwo OsYZCGfxebtYlG1yohwGwzDG1YeC6YypJHdPgNYPD3JIIc8Y04F/aahYlBf1Hw289z ncclXffxQxU2g== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1p3xry-00BlMm-B4; Sat, 10 Dec 2022 11:18:14 +0000 Date: Sat, 10 Dec 2022 11:16:37 +0000 Message-ID: <87edt7fqzu.wl-maz@kernel.org> From: Marc Zyngier To: James Clark , Oliver Upton Cc: kvmarm@lists.linux.dev, James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] KVM: arm64: PMU: Fix PMCR_EL0 reset value In-Reply-To: References: <20221209164446.1972014-1-james.clark@arm.com> <20221209164446.1972014-2-james.clark@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: james.clark@arm.com, oliver.upton@linux.dev, kvmarm@lists.linux.dev, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221210_031822_329111_BDDD52B3 X-CRM114-Status: GOOD ( 20.69 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 09 Dec 2022 17:58:31 +0000, Oliver Upton wrote: > > On Fri, Dec 09, 2022 at 04:44:46PM +0000, James Clark wrote: > > ARMV8_PMU_PMCR_N_MASK is an unshifted value which results in the wrong > > reset value for PMCR_EL0, so shift it to fix it. > > That's just mean. *_MASK tends to be a shifted mask, although it would > appear that asm/perf_event.h does not follow this convention. Fixing > that would be nice (as I'm sure somebody else will get burned by this), > but for the sake of an immediate fix: Well, that'll teach me the usual lesson: last minute changes without full non-regression testing are bound to end in disaster. > > > This fixes the following error when running qemu: > > > > $ qemu-system-aarch64 -cpu host -machine type=virt,accel=kvm -kernel ... > > > > target/arm/helper.c:1813: pmevcntr_rawwrite: Assertion `counter < pmu_num_counters(env)' failed. > > > > Fixes: 292e8f149476 ("KVM: arm64: PMU: Simplify PMCR_EL0 reset handling") > > Signed-off-by: James Clark > > Reviewed-by: Oliver Upton Thanks both. I'll queue that ASAP as a fix. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel