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 8DCB2C433F5 for ; Tue, 19 Apr 2022 18:42:00 +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=STf7yNGxzScr76lqG4o6A914NgdrkHU9RC+6P3VgDAs=; b=bgoCMWYEAHizrz WUiLVLF5JfmrypuEauoW5Muv+AXRN8iUbT5wHYWWtouEzJ+hT8rJJ17KZ7N7attj3QWOOgO0bq4/u 5y43QVeSEpEaD1Z2AIybwCcRVyvirEUblhLFda7OPE2NAO9L+kpMalj5/pK1qhWhFk9xi6q3jQ1b2 hwjKg7mUSbE8hKmFpzBtKenlbidrjiJEmMRAzezGvaWzuGTuWMJoYY6QnaxdizaulTBHz6Q7gGUbp iEGwIaaW2XTZWN79DcM72/xKp6/ROKEUxMnPsNAuJFezTXtZnuVn2Oq+jB/4HbZHWFb2yenJ3sLfd C48Hm5XdOUaI88b9IQ2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngsmM-005l9q-PU; Tue, 19 Apr 2022 18:40:47 +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 1ngsa9-005fkj-Vr for linux-arm-kernel@lists.infradead.org; Tue, 19 Apr 2022 18:28:13 +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 23BB2B819B1; Tue, 19 Apr 2022 18:28:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D31FAC385A7; Tue, 19 Apr 2022 18:28:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650392886; bh=dYKlvZ5LenzpdmPTCAB4AqiqMLiJhQAEeink3mrOudc=; h=From:To:Cc:Subject:Date:From; b=D5yK2eAW+WCxe6hxEqlwqas1NnHs3Z4mj5+fwFxCuovMsBpfQps90/jOaphK9v9VC yip+AbNxlUhtdcLh5H/Asxnxp1XR/Hwj3s8CcfJ0udFUh2b563sSbhgzofH951D53y 5FH+5CGfU/fTp05qMjdEQRQw/ALJkkE9PUT2djS8qRvuYSc6jhzADjcs1uNOSiMM9O E13etbgi1g80n7yBrlb07CnBt3fYekkw3RdX/isfvkOg2WH1EdV31bBG3PqheNJVMN DVfNNnZwbn+6ITfT20I3W2+ychLBaD+tVq7ykYucAiAwqEeD/BS+d9U8pHB8HfPOrv swQQcVgTO+DcA== 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 1ngsa4-005QYF-7X; Tue, 19 Apr 2022 19:28:04 +0100 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Cc: Catalin Marinas , Will Deacon , Mark Rutland , James Morse , Suzuki K Poulose , Alexandru Elisei , Joey Gouly , kernel-team@android.com Subject: [PATCH v2 00/10] arm64: Add initial support for FEAT_WFxT Date: Tue, 19 Apr 2022 19:27:45 +0100 Message-Id: <20220419182755.601427-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, kvm@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, joey.gouly@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-20220419_112810_368555_EF19B75B X-CRM114-Status: GOOD ( 15.87 ) 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 The ARMv8.7 WFxT feature is a new take on the good old WFI/WFE instructions as they behave the same way, only taking an extra timeout parameter. This small series aims at adding the minimal support for this feature, enabling it for both the kernel and KVM. A potential addition to this series would be to remove the event generation from the counters, and rely on the timeout where it matters (spinlocks?). Feedback welcome. Patches on top of 5.18-rc2, tested of the FVP AEM. * From v1 [1]: - Properly generate traces even if the deadline has already expired - Collect RBs, with thanks. [1] https://lore.kernel.org/r/20220412131303.504690-1-maz@kernel.org Marc Zyngier (10): arm64: Expand ESR_ELx_WFx_ISS_TI to match its ARMv8.7 definition arm64: Add RV and RN fields for ESR_ELx_WFx_ISS KVM: arm64: Simplify kvm_cpu_has_pending_timer() KVM: arm64: Introduce kvm_counter_compute_delta() helper KVM: arm64: Handle blocking WFIT instruction KVM: arm64: Offer early resume for non-blocking WFxT instructions KVM: arm64: Expose the WFXT feature to guests arm64: Add HWCAP advertising FEAT_WFXT arm64: Add wfet()/wfit() helpers arm64: Use WFxT for __delay() when possible Documentation/arm64/cpu-feature-registers.rst | 2 + Documentation/arm64/elf_hwcaps.rst | 4 ++ arch/arm64/include/asm/barrier.h | 4 ++ arch/arm64/include/asm/esr.h | 8 +++- arch/arm64/include/asm/hwcap.h | 1 + arch/arm64/include/asm/kvm_host.h | 1 + arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 13 +++++ arch/arm64/kernel/cpuinfo.c | 1 + arch/arm64/kvm/arch_timer.c | 47 ++++++++++++------- arch/arm64/kvm/arm.c | 6 +-- arch/arm64/kvm/handle_exit.c | 35 ++++++++++++-- arch/arm64/kvm/sys_regs.c | 2 + arch/arm64/lib/delay.c | 12 ++++- arch/arm64/tools/cpucaps | 1 + include/kvm/arm_arch_timer.h | 2 - 16 files changed, 110 insertions(+), 30 deletions(-) -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel