From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04FFE62F for ; Thu, 12 Jan 2023 12:38:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5A6DC433D2; Thu, 12 Jan 2023 12:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673527134; bh=+LEeLMYkd9RkMQSIuh1SSyTKV795y+lqyBKTQSXPkNA=; h=From:To:Cc:Subject:Date:From; b=b42dJms9soLm/YDE2LeMzTf4lI5WlvRJ96yQfMOuoPnmjY2QXoomjBnc/9Gu797U9 zbDCKso8jzmby21abrxmUhzzE9WPOHPw8U/nNUQdx4DXy1lNIvSJpzmuvZ9UOjeqQ4 ZwbAGlgVU8c0QdsnmCXLqx+3LKIDvo5Ljpkd8urk51rai4MFkovdgoCuabIIuYhSzU xf2tmzMHKP0p8xSdCWFDbvKw1j9ONIi4caM7IwB7HA9zwrsHg3TcEvTSE6h0rNqI+H VbmouXa09RwN/m0qnVv+8BFapYbYOQDk8Wtg2GEL/+bhb/8i/di7YcVzUKMoTVIPGU aF1nBpbTGnDJA== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pFwr6-001BBa-F2; Thu, 12 Jan 2023 12:38:52 +0000 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, , , kvm@vger.kernel.org Cc: D Scott Phillips , Ganapatrao Kulkarni , James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu Subject: [PATCH 0/3] KVM: arm64: timer fixes and optimisations Date: Thu, 12 Jan 2023 12:38:26 +0000 Message-Id: <20230112123829.458912-1-maz@kernel.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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, kvmarm@lists.cs.columbia.edu, kvmarm@lists.linux.dev, kvm@vger.kernel.org, scott@os.amperecomputing.com, gankulkarni@os.amperecomputing.com, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Having been busy on the NV front the past few weeks, I collected a small set of fixes/improvements that make sense even outside of NV. The first one is an interesting fix (actually a regression introduced by the initial set of NV-related patches) reported by Scott and Ganapatrao, where we fail to recognise that a timer that has fired doesn't need to fire again. And again. The second patch is a definite performance improvement on nVHE systems when accessing the emulated physical timer. It also makes NV bearable in some conditions (with FEAT_ECV, for example). The last patch is more of a sanity check. There is no reason to BUG() if we can avoid it at all and kill the guest instead! These patches are 6.3 candidates, although the first one could be a 6.2 fix. M. Marc Zyngier (3): KVM: arm64: Don't arm a hrtimer for an already pending timer KVM: arm64: Reduce overhead of trapped timer sysreg accesses KVM: arm64: timers: Don't BUG() on unhandled timer trap arch/arm64/kvm/arch_timer.c | 77 +++++++++++++++++++++++-------------- arch/arm64/kvm/sys_regs.c | 4 +- 2 files changed, 52 insertions(+), 29 deletions(-) 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 4210CC54EBC for ; Thu, 12 Jan 2023 12:40:24 +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: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=X9qv1lAHpecDTFSHl0AR5ElXTn5TJUfHmK6AldXcM3o=; b=AqZKmUYfeC4E0N p7foRF1fb7SVmPc/zsC3HkX9lXnpN3IID1LSCXuekkMm+k9DvBo6g2y0ArbSYBlZLtXawMjLplidq XWuRrAMj0bb6WGxVDyJOKUakYkl1uA2JBfWOYZXD3S/bn61Y90mEP7ynUxw4fup3Z3mtlj5QedlKX dL318PJ2bszpBLaTnOOJ9xbq9+0YOxlCcCrHge2QwUpRqZvlI3AHT3LE/eOu3DFtqivV2hy/Tqpxw kArjvmxboANWIcLYpjsHjvh1hUmTbeOeqHTHhklcab4cXnnshXtW1D3TCEbKDaihNsTAm+Nu+Jb2B 6AMkP1ycCmcIKscxsJNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFwrc-00F0n4-1H; Thu, 12 Jan 2023 12:39:24 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFwrG-00F0ho-8P for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 12:39:03 +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 0C05DB81E5B; Thu, 12 Jan 2023 12:38:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5A6DC433D2; Thu, 12 Jan 2023 12:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673527134; bh=+LEeLMYkd9RkMQSIuh1SSyTKV795y+lqyBKTQSXPkNA=; h=From:To:Cc:Subject:Date:From; b=b42dJms9soLm/YDE2LeMzTf4lI5WlvRJ96yQfMOuoPnmjY2QXoomjBnc/9Gu797U9 zbDCKso8jzmby21abrxmUhzzE9WPOHPw8U/nNUQdx4DXy1lNIvSJpzmuvZ9UOjeqQ4 ZwbAGlgVU8c0QdsnmCXLqx+3LKIDvo5Ljpkd8urk51rai4MFkovdgoCuabIIuYhSzU xf2tmzMHKP0p8xSdCWFDbvKw1j9ONIi4caM7IwB7HA9zwrsHg3TcEvTSE6h0rNqI+H VbmouXa09RwN/m0qnVv+8BFapYbYOQDk8Wtg2GEL/+bhb/8i/di7YcVzUKMoTVIPGU aF1nBpbTGnDJA== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pFwr6-001BBa-F2; Thu, 12 Jan 2023 12:38:52 +0000 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, , , kvm@vger.kernel.org Cc: D Scott Phillips , Ganapatrao Kulkarni , James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu Subject: [PATCH 0/3] KVM: arm64: timer fixes and optimisations Date: Thu, 12 Jan 2023 12:38:26 +0000 Message-Id: <20230112123829.458912-1-maz@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvmarm@lists.linux.dev, kvm@vger.kernel.org, scott@os.amperecomputing.com, gankulkarni@os.amperecomputing.com, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.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-20230112_043902_482638_B6526263 X-CRM114-Status: GOOD ( 13.38 ) 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 Having been busy on the NV front the past few weeks, I collected a small set of fixes/improvements that make sense even outside of NV. The first one is an interesting fix (actually a regression introduced by the initial set of NV-related patches) reported by Scott and Ganapatrao, where we fail to recognise that a timer that has fired doesn't need to fire again. And again. The second patch is a definite performance improvement on nVHE systems when accessing the emulated physical timer. It also makes NV bearable in some conditions (with FEAT_ECV, for example). The last patch is more of a sanity check. There is no reason to BUG() if we can avoid it at all and kill the guest instead! These patches are 6.3 candidates, although the first one could be a 6.2 fix. M. Marc Zyngier (3): KVM: arm64: Don't arm a hrtimer for an already pending timer KVM: arm64: Reduce overhead of trapped timer sysreg accesses KVM: arm64: timers: Don't BUG() on unhandled timer trap arch/arm64/kvm/arch_timer.c | 77 +++++++++++++++++++++++-------------- arch/arm64/kvm/sys_regs.c | 4 +- 2 files changed, 52 insertions(+), 29 deletions(-) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel