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 68F8E7F for ; Wed, 14 Jun 2023 16:58:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFBC3C433C8; Wed, 14 Jun 2023 16:58:52 +0000 (UTC) Date: Wed, 14 Jun 2023 17:58:50 +0100 From: Catalin Marinas To: Oliver Upton Cc: kvmarm@lists.linux.dev, Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Will Deacon , linux-arm-kernel@lists.infradead.org, Darren Hart , D Scott Phillips , stable@vger.kernel.org Subject: Re: [PATCH 1/3] arm64: errata: Mitigate Ampere1 erratum AC03_CPU_38 at stage-2 Message-ID: References: <20230609220104.1836988-1-oliver.upton@linux.dev> <20230609220104.1836988-2-oliver.upton@linux.dev> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230609220104.1836988-2-oliver.upton@linux.dev> On Fri, Jun 09, 2023 at 10:01:02PM +0000, Oliver Upton wrote: > AmpereOne has an erratum in its implementation of FEAT_HAFDBS that > required disabling the feature on the design. This was done by reporting > the feature as not implemented in the ID register, although the > corresponding control bits were not actually RES0. This does not align > well with the requirements of the architecture, which mandates these > bits be RES0 if HAFDBS isn't implemented. > > The kernel's use of stage-1 is unaffected, as the HA and HD bits are > only set if HAFDBS is detected in the ID register. KVM, on the other > hand, relies on the RES0 behavior at stage-2 to use the same value for > VTCR_EL2 on any cpu in the system. Mitigate the non-RES0 behavior by > leaving VTCR_EL2.HA clear on affected systems. > > Cc: stable@vger.kernel.org > Cc: D Scott Phillips > Cc: Darren Hart > Signed-off-by: Oliver Upton For the non-KVM bits in here: Acked-by: Catalin Marinas 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 7F83FEB64D9 for ; Wed, 14 Jun 2023 16:59:19 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fYrb6WcnNODZg5NfjFhITq0fuTQupx7uwVdlIRd3aWg=; b=q8DHmy3AEtgBZP W2iVNW5trID18T9JMGs/taqCggRZeBE7Ul2tHvFr/HVIoTsi3ymHzU1wzkELlSsuXDHure2S1ufLv 2qr/NdLNlWIgPhbN8+d9Cf487P5hyBvlWG/tenGl7HNC8/amrfDIaiQnl6ZJuw3UN2+Hv2X0geWzx NA8xvX840+4jEdGUvg+QfDeIu5IkFafjYcRVSNmBDkITPyzfBuRlR/at9SkurgbWz4YCHYapCieN4 NOnrlCcI40YktSgRUa/jV8Zahrke5/4BjBU8KD+I4iAdpVP8XKTgV2Yh/vMrz3RE3BzSiFLYlBGu+ yBd9/ZuDY7IE/NglhRjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9Tpi-00CHfX-1m; Wed, 14 Jun 2023 16:58:58 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9Tpf-00CHeo-33 for linux-arm-kernel@lists.infradead.org; Wed, 14 Jun 2023 16:58:57 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 70A1160A52; Wed, 14 Jun 2023 16:58:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFBC3C433C8; Wed, 14 Jun 2023 16:58:52 +0000 (UTC) Date: Wed, 14 Jun 2023 17:58:50 +0100 From: Catalin Marinas To: Oliver Upton Cc: kvmarm@lists.linux.dev, Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Will Deacon , linux-arm-kernel@lists.infradead.org, Darren Hart , D Scott Phillips , stable@vger.kernel.org Subject: Re: [PATCH 1/3] arm64: errata: Mitigate Ampere1 erratum AC03_CPU_38 at stage-2 Message-ID: References: <20230609220104.1836988-1-oliver.upton@linux.dev> <20230609220104.1836988-2-oliver.upton@linux.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230609220104.1836988-2-oliver.upton@linux.dev> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230614_095856_021334_6FF4DE26 X-CRM114-Status: GOOD ( 13.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: , 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 On Fri, Jun 09, 2023 at 10:01:02PM +0000, Oliver Upton wrote: > AmpereOne has an erratum in its implementation of FEAT_HAFDBS that > required disabling the feature on the design. This was done by reporting > the feature as not implemented in the ID register, although the > corresponding control bits were not actually RES0. This does not align > well with the requirements of the architecture, which mandates these > bits be RES0 if HAFDBS isn't implemented. > > The kernel's use of stage-1 is unaffected, as the HA and HD bits are > only set if HAFDBS is detected in the ID register. KVM, on the other > hand, relies on the RES0 behavior at stage-2 to use the same value for > VTCR_EL2 on any cpu in the system. Mitigate the non-RES0 behavior by > leaving VTCR_EL2.HA clear on affected systems. > > Cc: stable@vger.kernel.org > Cc: D Scott Phillips > Cc: Darren Hart > Signed-off-by: Oliver Upton For the non-KVM bits in here: Acked-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel