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 X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E093BC07E95 for ; Tue, 13 Jul 2021 13:59:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C54DF6128E for ; Tue, 13 Jul 2021 13:59:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236769AbhGMOB5 (ORCPT ); Tue, 13 Jul 2021 10:01:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:47996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236548AbhGMOB4 (ORCPT ); Tue, 13 Jul 2021 10:01:56 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D6FFF61288; Tue, 13 Jul 2021 13:59:06 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m3IwC-00D5p8-Qf; Tue, 13 Jul 2021 14:59:04 +0100 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Cc: James Morse , Suzuki K Poulose , Alexandru Elisei , Alexandre Chartre , Robin Murphy , kernel-team@android.com Subject: [PATCH 0/3] kvm-arm64: Fix PMU reset values (and more) Date: Tue, 13 Jul 2021 14:58:57 +0100 Message-Id: <20210713135900.1473057-1-maz@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, alexandre.chartre@oracle.com, robin.murphy@arm.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi all, After some back and forth with Alexandre about patch #3 of this series, it became apparent that some of the PMU code paths perform some unnecessary masking, only to hide the fact that some of the PMU register reset values are not architecturally compliant (RES0 bits get set, among other things). The first patch of this series addresses the reset value problem, the second one rids us of the pointless masking, and Alexandre's patch (which depends on the first two) is slapped on top, with a small cosmetic change. Thanks, M. Alexandre Chartre (1): KVM: arm64: Disabling disabled PMU counters wastes a lot of time Marc Zyngier (2): KVM: arm64: Narrow PMU sysreg reset values to architectural requirements KVM: arm64: Drop unnecessary masking of PMU registers arch/arm64/kvm/pmu-emul.c | 8 +++--- arch/arm64/kvm/sys_regs.c | 52 ++++++++++++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 10 deletions(-) -- 2.30.2 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 X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AECB9C07E96 for ; Tue, 13 Jul 2021 13:59:11 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 2C4FD61288 for ; Tue, 13 Jul 2021 13:59:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C4FD61288 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 8ACD84AEF8; Tue, 13 Jul 2021 09:59:10 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t+hfAWVRKzil; Tue, 13 Jul 2021 09:59:09 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 9E3574A523; Tue, 13 Jul 2021 09:59:09 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id DBE714A500 for ; Tue, 13 Jul 2021 09:59:08 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6-Kmk-ubwQoS for ; Tue, 13 Jul 2021 09:59:08 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id F00A74A4E1 for ; Tue, 13 Jul 2021 09:59:07 -0400 (EDT) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D6FFF61288; Tue, 13 Jul 2021 13:59:06 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m3IwC-00D5p8-Qf; Tue, 13 Jul 2021 14:59:04 +0100 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Subject: [PATCH 0/3] kvm-arm64: Fix PMU reset values (and more) Date: Tue, 13 Jul 2021 14:58:57 +0100 Message-Id: <20210713135900.1473057-1-maz@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, alexandre.chartre@oracle.com, robin.murphy@arm.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: kernel-team@android.com, Robin Murphy X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu Hi all, After some back and forth with Alexandre about patch #3 of this series, it became apparent that some of the PMU code paths perform some unnecessary masking, only to hide the fact that some of the PMU register reset values are not architecturally compliant (RES0 bits get set, among other things). The first patch of this series addresses the reset value problem, the second one rids us of the pointless masking, and Alexandre's patch (which depends on the first two) is slapped on top, with a small cosmetic change. Thanks, M. Alexandre Chartre (1): KVM: arm64: Disabling disabled PMU counters wastes a lot of time Marc Zyngier (2): KVM: arm64: Narrow PMU sysreg reset values to architectural requirements KVM: arm64: Drop unnecessary masking of PMU registers arch/arm64/kvm/pmu-emul.c | 8 +++--- arch/arm64/kvm/sys_regs.c | 52 ++++++++++++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 10 deletions(-) -- 2.30.2 _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33D4DC07E96 for ; Tue, 13 Jul 2021 14:00:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 018556127C for ; Tue, 13 Jul 2021 14:00:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 018556127C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=v4RoQ3J2bC1yZRGyUly9DazskF4A4QHi3/fzEs/4j78=; b=RREDLdGDm32FHY vHvAxWby+iKYlMKBH7IN8WpSfCVtoKjgp/FPQM88o9oJntiRXtVbLgWkXUwrMgC89io3V51g/vBBZ L3BSb0d4iQPVxgD16/7XJuIdNKK48Yc89S7aKhEfcIMPo/oikbKmGd0e3CF8BUyVtIZF/zA+lBn6p 2h8AJRKNOkfb63c9samj82mOd79TPyyyDXIDeaxeVHRqLKfSoYY144ejlXi2naWaWFmmz6rAnb6AS Qa51xkBTLULEWbCy0IZ8A2OvMTVSAUV/3bSWqbPAkj0iCQGN5/lbFZo6cPrk3WqP4U0eSO3eDhJ5m 82Gq3rzJ0iEbw8frffUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3IwJ-00AcMR-1X; Tue, 13 Jul 2021 13:59:11 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3IwF-00AcKs-5U for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 13:59:08 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D6FFF61288; Tue, 13 Jul 2021 13:59:06 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m3IwC-00D5p8-Qf; Tue, 13 Jul 2021 14:59:04 +0100 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Cc: James Morse , Suzuki K Poulose , Alexandru Elisei , Alexandre Chartre , Robin Murphy , kernel-team@android.com Subject: [PATCH 0/3] kvm-arm64: Fix PMU reset values (and more) Date: Tue, 13 Jul 2021 14:58:57 +0100 Message-Id: <20210713135900.1473057-1-maz@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, alexandre.chartre@oracle.com, robin.murphy@arm.com, kernel-team@android.com 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-20210713_065907_338715_E7F55A7B X-CRM114-Status: GOOD ( 10.50 ) 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 Hi all, After some back and forth with Alexandre about patch #3 of this series, it became apparent that some of the PMU code paths perform some unnecessary masking, only to hide the fact that some of the PMU register reset values are not architecturally compliant (RES0 bits get set, among other things). The first patch of this series addresses the reset value problem, the second one rids us of the pointless masking, and Alexandre's patch (which depends on the first two) is slapped on top, with a small cosmetic change. Thanks, M. Alexandre Chartre (1): KVM: arm64: Disabling disabled PMU counters wastes a lot of time Marc Zyngier (2): KVM: arm64: Narrow PMU sysreg reset values to architectural requirements KVM: arm64: Drop unnecessary masking of PMU registers arch/arm64/kvm/pmu-emul.c | 8 +++--- arch/arm64/kvm/sys_regs.c | 52 ++++++++++++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 10 deletions(-) -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel