From patchwork Wed Aug 7 11:51:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 13756179 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 0EA5FC52D6F for ; Wed, 7 Aug 2024 11:53:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ZU5Tfnnt8TKxM4qfzZNEtkeRlLOWiN8k718H2RJzUZU=; b=ToI41E7kHXDBPPjsQAlKeunTQs 8DD2I5xNctDOGM/lMAuvQBx89jGAlUl0joLDdTt0/PlChHB9Ux6BIEVQSOzo7nRFcv8J/XdJ74ELS /Fnr0gvQdC+BiXKq7PmWC7INVTVYoZjScM/l5KwHi/MrnpRyvGdGMQ6WNyl973BWKaDuM16HF3xKd yWhF6RaGgeVsddwpNZDbYiYmmkVasGVbTiBcyT7oI+0mRRZvZDJcyBuGd9hNcd4CsHaAyaJCoH18x 9GjF6zDx2k/lBWMnzZngQL7Ito01o77tPzNbCEP3BdGL1LsshLiCip57SLNdre7HYe/kkjJ70Q4Hu h/l4IlAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbfDp-00000004v7u-3RqO; Wed, 07 Aug 2024 11:52:54 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbfCq-00000004upB-33Xw for linux-arm-kernel@lists.infradead.org; Wed, 07 Aug 2024 11:51:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 22D2BCE0FC9; Wed, 7 Aug 2024 11:51:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AA0AC32782; Wed, 7 Aug 2024 11:51:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723031510; bh=0m7JnrkgG8nQO7XbNNaCOgZXNbyj6GhrwVnJsEiGC2I=; h=From:To:Cc:Subject:Date:From; b=agSZyOKcHB9lccsU/EJqj+NTAGRLb2Gd4xgncPwdamdGX4xVSnmMOu+wLYvgtX2Sm twiuzrVkEVv8k/fFa+OdG2DfKlCNSu/CsE2NpUFYcyuHkVZXeqXZ7PU7JJWTEvLGJj pdDrSUmHoISgnsUwwnWCkewiFJNIjdb2oLgxd0YICbgk9PL6HIdiAuIsbryHvVpdAD saBWNAuToe6mqu1umhLY2xXA/vOyqce9OhPUsHZ65iTyJqdOQ9Pg2ZGP1c4qRLp2cX jI3kpaK5MpeaohLbyY9dbJUx7OcPcMIol0jbM+puRkU02ctv++OiifDy57uoiKIvvQ mzfkmu3yqXuqw== 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 1sbfCm-001h7T-AX; Wed, 07 Aug 2024 12:51:48 +0100 From: Marc Zyngier To: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Viresh Kumar , Arnd Bergmann Subject: [PATCH] KVM: arm64: Enforce dependency on an ARMv8.4-aware toolchain Date: Wed, 7 Aug 2024 12:51:44 +0100 Message-Id: <20240807115144.3237260-1-maz@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, viresh.kumar@linaro.org, arnd@linaro.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-20240807_045152_960406_E95A726F X-CRM114-Status: GOOD ( 10.37 ) 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 With the NV support of TLBI-range operations, KVM makes use of instructions that are only supported by binutils versions >= 2.30. This breaks the build for very old toolchains. Make KVM support conditional on having ARMv8.4 support in the assembler, side-stepping the issue. Fixes: 5d476ca57d7d ("KVM: arm64: nv: Add handling of range-based TLBI operations") Reported-by: Viresh Kumar Suggested-by: Arnd Bergmann Signed-off-by: Marc Zyngier Acked-by: Arnd Bergmann Tested-by: Viresh Kumar --- arch/arm64/kvm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig index 58f09370d17e..8304eb342be9 100644 --- a/arch/arm64/kvm/Kconfig +++ b/arch/arm64/kvm/Kconfig @@ -19,6 +19,7 @@ if VIRTUALIZATION menuconfig KVM bool "Kernel-based Virtual Machine (KVM) support" + depends on AS_HAS_ARMV8_4 select KVM_COMMON select KVM_GENERIC_HARDWARE_ENABLING select KVM_GENERIC_MMU_NOTIFIER