Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3514045pxp; Mon, 14 Mar 2022 23:10:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydDv5ENPOW3r6EXbGxCoTNUhzLruvTVImkfoTafyfzDVY8ZsctLbmjWf82C8vDo7WIcU0n X-Received: by 2002:a17:906:154c:b0:6ce:21d7:2826 with SMTP id c12-20020a170906154c00b006ce21d72826mr21654927ejd.9.1647324649438; Mon, 14 Mar 2022 23:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647324649; cv=none; d=google.com; s=arc-20160816; b=pPvQe6FCy2pSdEgqwL0+k0dc5+fsDIVBIVRk3NrzKmHzxhl5CPHDTmvP+pFMtH37Pk zN4bw/a2yh9OU3m3ybYPO+hATYBNa0PWte9SR/tpfhaCBKCfz9DuIPOye6p8kVSFr6MD 2XDMPq5DCys6xvN670QnFT1w4VZy0oeJHrtkHFiDlVrqUflPo88Vh4CgKdr7CY5mBPUX /dD4LqdD2tgycMEUbkhdFObpDktLmPuKEj8uoiCSr7SPBMbUvF4fs82hKnkDP95trKD7 9Rpeq43cLqBtqC0+dFtfZC4YkiSmSQ30ULtNG41S3SUZiohPaxLjQM7FiVXn2WgJDxxF 8akg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=W6hA5uboJeNKWm9S/YhbgP1yFsg53zZeeTZz0HBXZ24=; b=duRVotKvH/hjHPDF9wvuaWr3GRUZpOd+6dpaTjPU38+v2e3FddizaNVNdPUkqwqXza QtCMqmGwipbkP9w18kjES6MJX8dO3e5o9hC0OyjaqFlT6o0H+xZ9yvvHAgFPmQF86v1j e96HZUTbk7AA9o//PqiRWl4turXzDJgUhdeF4xoB9YliQzl6SV95dsZIiTWzPJM9PMBN RlyykXQXF73dk15tTtyCmnGsbhNMkrfNjTBukbvPlu9h2iB2n7uQdu5Fftz+p7J8burG Ehtti/f+qdp2flp1KUgu5pJWBgB94YHb2CZ1nrg/ux3ttBdglcMrRjjwMtguNkHuMS1B 8ZRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@misterjones.org header.s=dkim20211231 header.b=tUdS10g3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=misterjones.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s5-20020a170906284500b006cd308755besi9525769ejc.249.2022.03.14.23.10.24; Mon, 14 Mar 2022 23:10:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@misterjones.org header.s=dkim20211231 header.b=tUdS10g3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=misterjones.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237251AbiCNJkX (ORCPT + 99 others); Mon, 14 Mar 2022 05:40:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232717AbiCNJkV (ORCPT ); Mon, 14 Mar 2022 05:40:21 -0400 X-Greylist: delayed 1823 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 14 Mar 2022 02:39:10 PDT Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A42F81CFC4; Mon, 14 Mar 2022 02:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=misterjones.org; s=dkim20211231; h=Content-Transfer-Encoding:Content-Type: Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date:MIME-Version:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=W6hA5uboJeNKWm9S/YhbgP1yFsg53zZeeTZz0HBXZ24=; b=tUdS10g3hHpgWYXp6qMtkuqPC9 4b8Mt9MqhqXEfDHG5LlDtoPXsF/vwfCpj6zJGriJY0/jlMATm3ERM0hZj/b5if5/hOOgcEcUkSecv PfrhOw45Xq2EcyzGoRnrfSzTrFxORQ5jFJV639NZM/0xAGloxOZv2Oww5ZN+z6zPIeSsYCOYwVlgK W09wC7HrqT85hr1jM9Irwn3+HvQDrMnsfXIKnzz7HxYLRArahrY36ukeJevs/tILQjNjTjDjc9oN7 0TwHqX6JEPtzHyaGZVgNPxJu6LbFIWub2aHe9/2mKxfxkQNUD2Cf4AP2HPQAYqDb87maABqFuLkQN GFIKtw8Q==; Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) 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 1nTgh0-00EIQa-Ux; Mon, 14 Mar 2022 09:08:43 +0000 MIME-Version: 1.0 Date: Mon, 14 Mar 2022 09:08:42 +0000 From: Marc Zyngier To: Greg KH , "A. Wilcox" Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [BUG] arm64/m1: Accessing SYS_ID_AA64ISAR2_EL1 causes early boot failure on 5.15.28, 5.16.14, 5.17 In-Reply-To: References: <32EA0FE1-5254-4A41-B684-AA2DEC021110@adelielinux.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <1f0b74caa45a1d73af68eab8dcc15485@misterjones.org> X-Sender: maz@misterjones.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: gregkh@linuxfoundation.org, awilfox@adelielinux.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org X-SA-Exim-Mail-From: maz@misterjones.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-03-14 06:35, Greg KH wrote: > On Sun, Mar 13, 2022 at 10:59:01PM -0500, A. Wilcox wrote: >> Hello, >> >> I’ve been testing kernel updates for the Adélie Linux distribution’s >> ARM64 port using a Parallels VM on a MacBook Pro (13-inch, M1, 2020). >> When the kernel attempts to access SYS_ID_AA64ISAR2_EL1, it causes a >> fault as seen here booting 5.17.0-rc8: [...] >> This is because detection of the clearbhb instruction support requires >> accessing SYS_ID_AA64ISAR2_EL1. Commenting out the two uses of >> supports_clearbhb in the kernel now yields a successful boot. >> >> Qemu developers seem to have found this issue as well[1] when trying >> to boot 5.17 using HVF, the Apple Hypervisor Framework. This seems to >> be some sort of platform quirk on M1, or at least in HVF on M1. I’m >> not sure what the best workaround would be for this. >> SYS_ID_AA64ISAR2_EL1 seems to be something added in ARMv8.7, so >> perhaps access to it could be gated on that. >> >> Unfortunately, this code was just added to 5.15.28 and 5.16.14, so >> stable no longer boots on Parallels VM on M1. I am unsure if this >> affects physical boot on Apple M1 or not. > > What commit causes this problem? It sounds like you narrowed this down > already, right? This really is a Parallels bug. These kernels run fine on bare metal M1 and in KVM. QEMU was affected as well, and that was fixed in their HVF handling. HVF itself is fine. So this should be punted back to the hypervisor vendor for not properly implementing the architecture (no ID register is allowed to UNDEF). M. -- Who you jivin' with that Cosmik Debris?