From nobody Wed Apr 24 10:10:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1602672159; cv=none; d=zohomail.com; s=zohoarc; b=GbVIoFx9xmRh47Hgrmg5oCIhVBfWaNx98rt6pJsjZpGXgvg9RFdh3H5NWUKWpJNczkBM7dG+EYXD0oEJZ0tYsjwgkPgkIQdwQQkou3thiN+Bbneq9km03mGNMTIq/PhoQgXyrsWoydhVcHGiwl/RX8RSUfbgoTNhGbnCpTxNEks= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602672159; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=5gGD78GliYppZKBHT6xLVeo3RWyPwGaLUJyNDfIp1/4=; b=ToRJHU2UT9rwfQYMq5POeyHLNPvIWOMe8zl2HRDiZaXTJ0GLDkuU2rWaE4I+vfXMFPKcN13eP+n4m2YheTDEkXQjSHr0axmM4L7s9EXwvY2e89Ew18r7NGVnGu+TcbT7QDLYUNujLG/RmObfRvh3e8quOx07McNpJ5Jds79/ukY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1602672159441420.7410562773031; Wed, 14 Oct 2020 03:42:39 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.6525.17403 (Exim 4.92) (envelope-from ) id 1kSeEi-0003xB-K3; Wed, 14 Oct 2020 10:42:24 +0000 Received: by outflank-mailman (output) from mailman id 6525.17403; Wed, 14 Oct 2020 10:42:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kSeEi-0003x4-Ge; Wed, 14 Oct 2020 10:42:24 +0000 Received: by outflank-mailman (input) for mailman id 6525; Wed, 14 Oct 2020 10:42:23 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kSeEh-0003wz-Jy for xen-devel@lists.xenproject.org; Wed, 14 Oct 2020 10:42:23 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 3613910b-71e1-4446-9ad1-422dd94331a1; Wed, 14 Oct 2020 10:42:23 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C46541FB; Wed, 14 Oct 2020 03:42:22 -0700 (PDT) Received: from e109506-lin.cambridge.arm.com (e109506-lin.cambridge.arm.com [10.1.198.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1F7643F73C; Wed, 14 Oct 2020 03:42:22 -0700 (PDT) Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kSeEh-0003wz-Jy for xen-devel@lists.xenproject.org; Wed, 14 Oct 2020 10:42:23 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 3613910b-71e1-4446-9ad1-422dd94331a1; Wed, 14 Oct 2020 10:42:23 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C46541FB; Wed, 14 Oct 2020 03:42:22 -0700 (PDT) Received: from e109506-lin.cambridge.arm.com (e109506-lin.cambridge.arm.com [10.1.198.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1F7643F73C; Wed, 14 Oct 2020 03:42:22 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3613910b-71e1-4446-9ad1-422dd94331a1 From: Bertrand Marquis To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [PATCH] xen/arm: Warn user on cpu errata 832075 Date: Wed, 14 Oct 2020 11:41:51 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" When a Cortex A57 processor is affected by CPU errata 832075, a guest not implementing the workaround for it could deadlock the system. Add a warning during boot informing the user that only trusted guests should be executed on the system. An equivalent warning is already given to the user by KVM on cores affected by this errata. Signed-off-by: Bertrand Marquis --- xen/arch/arm/cpuerrata.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c index 6c09017515..8f9ab6dde1 100644 --- a/xen/arch/arm/cpuerrata.c +++ b/xen/arch/arm/cpuerrata.c @@ -240,6 +240,26 @@ static int enable_ic_inv_hardening(void *data) =20 #endif =20 +#ifdef CONFIG_ARM64_ERRATUM_832075 + +static int warn_device_load_acquire_errata(void *data) +{ + static bool warned =3D false; + + if ( !warned ) + { + warning_add("This CPU is affected by the errata 832075.\n" + "Guests without required CPU erratum workarounds\n" + "can deadlock the system!\n" + "Only trusted guests should be used on this system.\n"= ); + warned =3D true; + } + + return 0; +} + +#endif + #ifdef CONFIG_ARM_SSBD =20 enum ssbd_state ssbd_state =3D ARM_SSBD_RUNTIME; @@ -419,6 +439,7 @@ static const struct arm_cpu_capabilities arm_errata[] = =3D { .capability =3D ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE, MIDR_RANGE(MIDR_CORTEX_A57, 0x00, (1 << MIDR_VARIANT_SHIFT) | 2), + .enable =3D warn_device_load_acquire_errata, }, #endif #ifdef CONFIG_ARM64_ERRATUM_834220 --=20 2.17.1