From patchwork Thu Mar 25 12:47:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 12164049 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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 ADA24C433DB for ; Thu, 25 Mar 2021 12:52:00 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 4B33C61A11 for ; Thu, 25 Mar 2021 12:52:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B33C61A11 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=desiato.20200630; 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=A0RO/iku07tZ7vczRLf4KiFf07ywazudjo8smtdyNns=; b=mkBlVwu79M8XFcIGOSYrW2sIbS jcJlWjnucosZw0xrNwI0/9EByJ0MXKko49s3nPjDSJwUbOMCgvu9zodIaMdXhBNiPXLhRPUBxKIJf xgCRu0YCF9bA4xGSVYs4/iQvjLTAp8rgMI3NNTVRLjdpRlEaUPrijIFWHXUSw8rOlgSpJwjhDkBI7 BLccKT3/JKkE5B+6xjeY9sPLw0p71kxeED1wc3tfiNx1MJynS6fDRBEEtZTvTpFPJ+zEKHbQ++OdK qDfR57tuKR1VLUPKpvt5gFGC2Z+W0sbQy40OyLTT/Ik/6+tGu6Pu8Uwl/9DmBBodebcOnvrXqj1x/ IScJm5ew==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lPPQh-001RRE-LW; Thu, 25 Mar 2021 12:49:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lPPOg-001R66-3m for linux-arm-kernel@lists.infradead.org; Thu, 25 Mar 2021 12:49:36 +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 4829461962; Thu, 25 Mar 2021 12:47:32 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lPPOc-003kFA-4x; Thu, 25 Mar 2021 12:47:30 +0000 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org Cc: Hector Martin , Arnd Bergmann , Mark Rutland , Will Deacon , Catalin Marinas , kernel-team@android.com Subject: [PATCH 0/2] arm64: Dealing with VHE-only CPUs Date: Thu, 25 Mar 2021 12:47:19 +0000 Message-Id: <20210325124721.941182-1-maz@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, marcan@marcan.st, arnd@kernel.org, mark.rutland@arm.com, will@kernel.org, catalin.marinas@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-20210325_124934_628268_7712DA90 X-CRM114-Status: GOOD ( 12.49 ) 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 This short series is a rewrite of [1] after some reviewing from Will. It simplifies the esoteric "stay at EL2" path, and the feature override code where it actually belongs, allowing us to tell the user that no, nVHE isn't a thing on these system. This allows the infamous M1 to boot (tested on a M1 Mini). Hector, feel free to pull these two patches as a preamble to the next version of your series, though I'd expect this to go via the arm64 tree for obvious reasons. [1] https://lore.kernel.org/r/20210304213902.83903-2-marcan@marcan.st Marc Zyngier (2): arm64: cpufeature: Allow early filtering of feature override arm64: Cope with CPUs stuck in VHE mode arch/arm64/kernel/cpufeature.c | 6 ++++++ arch/arm64/kernel/head.S | 33 +++++++++++++++++++++++++++--- arch/arm64/kernel/hyp-stub.S | 15 ++++++++++---- arch/arm64/kernel/idreg-override.c | 26 ++++++++++++++++++++++- 4 files changed, 72 insertions(+), 8 deletions(-)