From nobody Sun May 5 16:53:23 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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; arc=pass (i=1dmarc=pass fromdomain=arm.com) ARC-Seal: i=2; a=rsa-sha256; t=1598350201; cv=pass; d=zohomail.com; s=zohoarc; b=A7FK1kLhVF6dFwHbRu+TU6m0Q3TxMK/TAqEKtpBrF2cdVqPRpO9STuSxRjqdyZ9aXe4QxmTVeE6e1qRWv6Jy+gq/fo4Z6cc3nGoYbQcv9zOBL/xK3XdT51JLwLuAGQE7prx+t3obSOj6pg0fORCEiqR9svbz3RXH1Nvjqi526y8= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598350201; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LxjuW76QYQnnm39E3PPg+txyPyA7XTzDaE5mmk/F3KI=; b=AunvlwT7rQlGij+gMMjcHq7T6gxh65sVd1NAbBc0VWF+/qCRVhStkEcDuuvavRHjDaDH+SGP5LPd7f+3+rDzlGWQSODlKf7wkEBcCmWxifHNLGqwg5kcxrgTIcB36TMWl8u5wPenRMehaKLWEn2xM1Q4fKgq/Cms8AzvFNX4h/k= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; 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; arc=pass (i=1dmarc=pass fromdomain=arm.com) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1598350201836907.4326659874381; Tue, 25 Aug 2020 03:10:01 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kAVtj-0001gS-CQ; Tue, 25 Aug 2020 10:09:47 +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 1kAVti-0001gE-4u for xen-devel@lists.xenproject.org; Tue, 25 Aug 2020 10:09:46 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com (unknown [40.107.5.41]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id a973ef30-4ac3-483a-9fc1-fe0aef4acb1c; Tue, 25 Aug 2020 10:09:44 +0000 (UTC) Received: from AM7PR02CA0005.eurprd02.prod.outlook.com (2603:10a6:20b:100::15) by DBBPR08MB4363.eurprd08.prod.outlook.com (2603:10a6:10:ce::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.24; Tue, 25 Aug 2020 10:09:40 +0000 Received: from AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:100:cafe::36) by AM7PR02CA0005.outlook.office365.com (2603:10a6:20b:100::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.24 via Frontend Transport; Tue, 25 Aug 2020 10:09:40 +0000 Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT039.mail.protection.outlook.com (10.152.17.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.24 via Frontend Transport; Tue, 25 Aug 2020 10:09:38 +0000 Received: ("Tessian outbound 34b830c8a0ef:v64"); Tue, 25 Aug 2020 10:09:37 +0000 Received: from 0a8093308491.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 989A7C9B-B79C-40C5-9858-E5E6D649604F.1; Tue, 25 Aug 2020 10:09:13 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0a8093308491.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 25 Aug 2020 10:09:13 +0000 Received: from AM6PR0202CA0064.eurprd02.prod.outlook.com (2603:10a6:20b:3a::41) by AM6PR08MB4327.eurprd08.prod.outlook.com (2603:10a6:20b:ba::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.26; Tue, 25 Aug 2020 10:09:12 +0000 Received: from AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:3a:cafe::55) by AM6PR0202CA0064.outlook.office365.com (2603:10a6:20b:3a::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25 via Frontend Transport; Tue, 25 Aug 2020 10:09:12 +0000 Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT011.mail.protection.outlook.com (10.152.16.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3305.24 via Frontend Transport; Tue, 25 Aug 2020 10:09:11 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Tue, 25 Aug 2020 10:09:06 +0000 Received: from localhost.localdomain (10.169.214.112) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Tue, 25 Aug 2020 10:09:03 +0000 X-Inumbo-ID: a973ef30-4ac3-483a-9fc1-fe0aef4acb1c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LxjuW76QYQnnm39E3PPg+txyPyA7XTzDaE5mmk/F3KI=; b=YEoZqNxS3TQv6zi6fPu3EK5SAATiKSYv3Kad/zCOzZ+0EX/1lFH8TV2Im9MV5ZlkJ4nPJ4OAJCpT+lFuF0twUhGEIyG6mDV4FfOEtnsgS9W4wnlePDlvBODSIBrvM62nKg4dNsEm4y3PHcpyULBJf37wwcA+4+H9DaAi/5kb6KU= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.xenproject.org; dmarc=bestguesspass action=none header.from=arm.com; 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; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; X-CheckRecipientChecked: true X-CR-MTA-CID: 10f20ec28e4e27b8 X-CR-MTA-TID: 64aa7808 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LFqhG7GNGxZ96egT2V0d2I2JgPl22YmZIXYdr/f5U1gnF8DDoKHs14QMNu8ndFJ06kRldqsiqeOLPditMbrIgb6WUM8Fxz0X/N4qBtRlUFSN0LooQciMR5E38HMOWrf7qSMJmAROanxZbmSlzcy/d1e/IJ76CEPsap/ltY7Eso35z8M4ixDbJqBHqErAHnWnFTCfImAGdhoZkIzoX1JfmkI1n1i+x5d9iVuZQ/foT+7dPsLI4geyRvFdrcsd+Vy9n0XUf46biHtpJahRDOTnH/E5LB0cjet1r/UIA50IUdbCK1Lb/rmV7XYrvvPHwDDFy3wXZS/CJnkzbmZBIVir7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LxjuW76QYQnnm39E3PPg+txyPyA7XTzDaE5mmk/F3KI=; b=Csc0nWR+0pBPBaA8+XFsHLuLyEG9661lvUiskxAq0Lve6BxC3OFkGJ6ASNc+PWhp7l0YDRT5KaYyNCFH9KXhFU/MW6qcjdSqoI2wyXhgqj1P8QoP6CTQFpxJFnnwnFsLk2OITmogEfXnbACK8ZXpFTfi535k8OSMgQnOiNA2Zro9NRMzm43DbzBJs13i+jR5L0OpTpvcKLT75mn6czWAc+oAY6bEhA7y1gmwWQpyuHKARYce4YP1MeeeO7O2sqyRHysOO7ONhfI+t94E76xrhupdWnonHcpF4QGB7RblN2g5f6JDthgU62+t3TrwRo8u17U5ENbZ05BUTByVBG178w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LxjuW76QYQnnm39E3PPg+txyPyA7XTzDaE5mmk/F3KI=; b=YEoZqNxS3TQv6zi6fPu3EK5SAATiKSYv3Kad/zCOzZ+0EX/1lFH8TV2Im9MV5ZlkJ4nPJ4OAJCpT+lFuF0twUhGEIyG6mDV4FfOEtnsgS9W4wnlePDlvBODSIBrvM62nKg4dNsEm4y3PHcpyULBJf37wwcA+4+H9DaAi/5kb6KU= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; From: Wei Chen To: , , CC: , , , , Subject: [PATCH v3 1/2] xen/arm: Missing N1/A76/A75 FP registers in vCPU context switch Date: Tue, 25 Aug 2020 10:08:46 +0000 Message-ID: <20200825100847.27988-2-wei.chen@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200825100847.27988-1-wei.chen@arm.com> References: <20200825100847.27988-1-wei.chen@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 813b3cc1-4f1f-4ce0-35b4-08d848defa22 X-MS-TrafficTypeDiagnostic: AM6PR08MB4327:|DBBPR08MB4363: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7691;OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 9JsKiqe1qBsHSKO6DCaw4dUvl+Ldn+p3nBBr3WEkpAgyfBH6neaEVpzv7Psg38V7EpAo6HfyZW7eyL5a0zCqTgmrVGYtuumXbTFMhv8z+THwty936/OjJflUL0kFOSrsLGrfUqlUnG7fKRCF5uTmARKBPQfQk3KXS/VNYAUwh0ilQl9UNw4p8wdMFe0A7+JC+S1SpEQOKvdGnajJl75lUuwjGtbfTz78O1PySebDCyJCeOB8lx0UuafbOSp9BMz+W7WKsatZQdMw0MiqVWpBn+hu1A5dHjGyh/3ZxdDF6orTDXNeTwmQrFE3HQy4E+J+8SI261/iSA22CJspcVC42wF0D6/R08StjzTcKMIDwTn7UEUtal+4vcH4ZHJZhHRKHf3hko3f8lRX2utpU6GuPw== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(396003)(39860400002)(376002)(346002)(136003)(46966005)(336012)(8936002)(83380400001)(1076003)(44832011)(70206006)(6666004)(5660300002)(316002)(70586007)(26005)(186003)(82310400002)(426003)(36756003)(478600001)(54906003)(110136005)(47076004)(356005)(2906002)(81166007)(86362001)(82740400003)(8676002)(4326008)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4327 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 57cb4991-894a-4045-2560-08d848deea12 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1CeOokTAH0/Ifgwqxnurfn5UDL8yp5bWiqP35USQs4ELpgcwO1WRiNqFoQiRFv2ffigkH6iSRCPtOi7AAabBern+JjZqS7Zp83skePQh/gK8CKhmqBvJTOCLkBENoQyWTM+tvGhjBH7LEUqvXsNEqIACz5ZKSOKWG/eWPxXEMu3+6D1T/hdcgiZt2STazozWVzh7H3auYS/AsdJmNYhiHEIzop+pY3uw+oFjjEgf7wDGteNBdiCv31B9Yb2kLZdLMOyNTM9Ju7aWXAvoTkWE2x6b1KQ2xOZQIiFwk9Vl3/TYHD/CsDa+uQO7oYrMrBwyB5IIqFtlszmNAKYp4LNyUqDxUCccbcYdhb9uXu6dWlOdkpPNAMWxzsp919dSxWfWrQQuNizWaCXiwCUXw7RPig== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(136003)(376002)(346002)(396003)(39860400002)(46966005)(82740400003)(26005)(44832011)(81166007)(82310400002)(2616005)(47076004)(316002)(426003)(36906005)(8936002)(110136005)(4326008)(5660300002)(54906003)(186003)(478600001)(1076003)(86362001)(6666004)(8676002)(70206006)(36756003)(83380400001)(336012)(2906002)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2020 10:09:38.8391 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 813b3cc1-4f1f-4ce0-35b4-08d848defa22 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4363 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: pass (identity @armh.onmicrosoft.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Xen has cpu_has_fp/cpu_has_simd to detect whether the CPU supports FP/SIMD or not. But currently, these two MACROs only consider value 0 of ID_AA64PFR0_EL1.FP/SIMD as FP/SIMD features enabled. But for CPUs that support FP/SIMD and half-precision floating-point arithmetic, the ID_AA64PFR0_EL1.FP/SIMD are 1 (see Arm ARM DDI0487F.b, D13.2.64). For these CPUs, xen will treat them as no FP/SIMD support, the vfp_save/restore_state will not take effect. From the TRM documents of Cortex-A75/A76/N1, we know these CPUs support basic Advanced SIMD/FP and half-precision floating-point arithmetic. In this case, on N1/A76/A75 platforms, Xen will always miss the floating pointer registers save/restore. If different vCPUs are running on the same pCPU, the floating pointer registers will be corrupted randomly. This patch fixes Xen on these new cores. Signed-off-by: Wei Chen Reviewed-by: Bertrand Marquis Reviewed-by: Julien Grall --- xen/include/asm-arm/cpufeature.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/include/asm-arm/cpufeature.h b/xen/include/asm-arm/cpufeat= ure.h index 674beb0353..10878ead8a 100644 --- a/xen/include/asm-arm/cpufeature.h +++ b/xen/include/asm-arm/cpufeature.h @@ -13,8 +13,8 @@ #define cpu_has_el2_64 (boot_cpu_feature64(el2) >=3D 1) #define cpu_has_el3_32 (boot_cpu_feature64(el3) =3D=3D 2) #define cpu_has_el3_64 (boot_cpu_feature64(el3) >=3D 1) -#define cpu_has_fp (boot_cpu_feature64(fp) =3D=3D 0) -#define cpu_has_simd (boot_cpu_feature64(simd) =3D=3D 0) +#define cpu_has_fp (boot_cpu_feature64(fp) < 8) +#define cpu_has_simd (boot_cpu_feature64(simd) < 8) #define cpu_has_gicv3 (boot_cpu_feature64(gic) =3D=3D 1) #endif =20 --=20 2.17.1 From nobody Sun May 5 16:53:23 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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; arc=pass (i=1dmarc=pass fromdomain=arm.com) ARC-Seal: i=2; a=rsa-sha256; t=1598350195; cv=pass; d=zohomail.com; s=zohoarc; b=WWl8VIMwOtK4N9qih3P0IGdMp8u24nQQryxCYag1vaAHglu1FxXqMRfiS37sSSPrYfAoNvczwRPBhlw3H2YcnkF9+ndHAVvTetD9K0U0TXidJv6VfJz8PRE7U2LMoSEragXqSMzM+ZykL/lN0O/dr7AjePg8M8vznjh6vTEtGTA= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598350195; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=M2/X1lxOqtNOoaoNqkOIqK3fV/KCVSJ8dBxu2KBfPFQ=; b=Q2Nq0pTVCm/aJax9HaO8HD3b281BHPLqOlbBbgi2KjBbwU9lm+/vCQ6LhLvGUZIomsRbt8gwJtMEQIVLSNQVrRuNCa6lWJg+jQYIykiVvAv9fHViyCNX++yj5XfhbmmI9rAkx9rIuveeBPznje9XnslEXT01DR0JCKG9j8rdRRI= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; 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; arc=pass (i=1dmarc=pass fromdomain=arm.com) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1598350195228674.9478679743303; Tue, 25 Aug 2020 03:09:55 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kAVtX-0001eB-1T; Tue, 25 Aug 2020 10:09:35 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kAVtV-0001dt-Sw for xen-devel@lists.xenproject.org; Tue, 25 Aug 2020 10:09:33 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (unknown [40.107.21.61]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id dbbdd7bd-e0d3-4ca1-9b38-30e9d55da82b; Tue, 25 Aug 2020 10:09:32 +0000 (UTC) Received: from DB6PR0301CA0008.eurprd03.prod.outlook.com (2603:10a6:4:3e::18) by AM5PR0801MB1985.eurprd08.prod.outlook.com (2603:10a6:203:4b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19; Tue, 25 Aug 2020 10:09:29 +0000 Received: from DB5EUR03FT063.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3e:cafe::9a) by DB6PR0301CA0008.outlook.office365.com (2603:10a6:4:3e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.24 via Frontend Transport; Tue, 25 Aug 2020 10:09:29 +0000 Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT063.mail.protection.outlook.com (10.152.20.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.24 via Frontend Transport; Tue, 25 Aug 2020 10:09:28 +0000 Received: ("Tessian outbound e8cdb8c6f386:v64"); Tue, 25 Aug 2020 10:09:28 +0000 Received: from 6f3eabee282e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EF79E2F0-4405-4FB8-B210-24DE6C410DA9.1; Tue, 25 Aug 2020 10:09:22 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6f3eabee282e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 25 Aug 2020 10:09:22 +0000 Received: from MR2P264CA0105.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:33::21) by PR3PR08MB5804.eurprd08.prod.outlook.com (2603:10a6:102:83::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.25; Tue, 25 Aug 2020 10:09:21 +0000 Received: from VE1EUR03FT047.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:33:cafe::58) by MR2P264CA0105.outlook.office365.com (2603:10a6:500:33::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3305.24 via Frontend Transport; Tue, 25 Aug 2020 10:09:21 +0000 Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT047.mail.protection.outlook.com (10.152.19.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3305.24 via Frontend Transport; Tue, 25 Aug 2020 10:09:20 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2044.4; Tue, 25 Aug 2020 10:09:11 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1779.2; Tue, 25 Aug 2020 10:09:11 +0000 Received: from localhost.localdomain (10.169.214.112) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Tue, 25 Aug 2020 10:09:06 +0000 X-Inumbo-ID: dbbdd7bd-e0d3-4ca1-9b38-30e9d55da82b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M2/X1lxOqtNOoaoNqkOIqK3fV/KCVSJ8dBxu2KBfPFQ=; b=W88BlXob1pBoJSUcZgF2t9nuz6aW1XiychpUiMtHpDaTa5ZAfqIY3D8tOYHlIkf7wZN4k8i6juoTP+3u4TpBjxRp0eMxHHTwieFi/jCR3mKHDK8vq9s1ZdsIxkg2JQbAPBIiITUef+f0AI/kYdDDJKFQ0T9qpwNgxGst9oR1iuM= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.xenproject.org; dmarc=bestguesspass action=none header.from=arm.com; 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; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; X-CheckRecipientChecked: true X-CR-MTA-CID: 4892738f9bc7c9f1 X-CR-MTA-TID: 64aa7808 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JiBVjyYRsfYl81A3dFIoGZRoMCoCu/pQBE0Fxt2iswRd+92uMUJsHn77rmnAN1/0jV+5dcEt/WHQJ2xVnFbAGfeRzjJ5QyJQxL2UFu6c3L2G2e9Xcf48Q+N+WHT40iK2pjYFs+HMvukQKvjUgoiyxoMLpy8A1nN3k+lz6tLBGu1+/17IG7YtsinVgMkrmo2Yt97MO2vG51d47D5/ZKKi/mQBuZsHXDILzPIINaK2MGkQhP75RfFRcrWCRijjVGiJoqVMrhOVWOMVOghxIRreVn2kHugilQc2S57oiyxbhGfHNw0+k0YDTNfmGhaqucqJywNizoFgevvEfSls0DfOog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M2/X1lxOqtNOoaoNqkOIqK3fV/KCVSJ8dBxu2KBfPFQ=; b=SyqouUFC0lcNAImEr8SJOI0M94/SAAw+R3C0DGcZFdQeVQ2FPv09N2IGNrURHXqu0FhY0ktixUwirZrmto7ILYld2a8YUQLhDMtPue9cPYD0rFYrvzkiGlZWWslANuZj6QY5ZlXa8+jjkUlz2iquwbEaiEt7HXglppsfNsmHUI1FOhGC3/mBUjQoSRPRUrYx1ugo7rIjNiXG/qFiLopqpQtoNLxZ219HhtCnZ8otXvjytM3UCb+YawIP6NyjYCPNkwawZeH2+nwWlSaWlbbVtddDkY76CzshpVaTvCyrjb+juN/YiskeLFCRWdb1cKjr6Q4Fv51K2spgmlGDDVPH3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M2/X1lxOqtNOoaoNqkOIqK3fV/KCVSJ8dBxu2KBfPFQ=; b=W88BlXob1pBoJSUcZgF2t9nuz6aW1XiychpUiMtHpDaTa5ZAfqIY3D8tOYHlIkf7wZN4k8i6juoTP+3u4TpBjxRp0eMxHHTwieFi/jCR3mKHDK8vq9s1ZdsIxkg2JQbAPBIiITUef+f0AI/kYdDDJKFQ0T9qpwNgxGst9oR1iuM= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; From: Wei Chen To: , , CC: , , , , Subject: [PATCH v3 2/2] xen/arm: Throw messages for unknown FP/SIMD implement ID Date: Tue, 25 Aug 2020 10:08:47 +0000 Message-ID: <20200825100847.27988-3-wei.chen@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200825100847.27988-1-wei.chen@arm.com> References: <20200825100847.27988-1-wei.chen@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8ba8c812-c575-4d4d-8746-08d848def3c4 X-MS-TrafficTypeDiagnostic: PR3PR08MB5804:|AM5PR0801MB1985: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: N6tawul2ZwRrBAN1EAou4pTE4zLJ63PkNEF1HAPg1oipTEymKC3wjx6UVYAX53zFjSryXDBbFlwnpjTKvekYYfLZoKUw/v+4f+XfJFSyQ1cTQtSbvwkl8Bx/+NgM70OCk8iTjhQlB8/A3obuDErssHATDkIYE59sUa8xXW/LpoxrVLbz/LxX2vRbx+Q8wg4D2t4LP39CkDP3MBe/s0uIVxinoydC9Oyw2ybjmWwdKbqdbIPUMt7Tx2hpjf4qd1TiTBZvOaH22WuQhz6wn2y920FLnfiTQNK6V6agscFScXHJzRgWWBKhQnaBbpl4BwhQXsrDm8rwUKIUJQk8D5wYSb0u4ZjAD5vDfDZvyHglUT4YGo+kihDlY6J6XqxrRju0qJCHgMMkRgWyRMF/TDfYYQ== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(396003)(136003)(39860400002)(376002)(346002)(46966005)(83380400001)(26005)(2616005)(186003)(44832011)(336012)(81166007)(82740400003)(15650500001)(5660300002)(426003)(47076004)(356005)(54906003)(1076003)(4326008)(70206006)(110136005)(36756003)(316002)(478600001)(6666004)(82310400002)(86362001)(8676002)(2906002)(8936002)(70586007); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5804 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 1c0eb9e5-b1f6-4673-94b3-08d848deef60 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DZrvFk/DUI1rx3gCt95Fvm3uD1lcLoXq9kWYQq6OrJM4wQVUa/DhSZanTerGwdGSIol8e4bVWZYPNg/dkC454GVaT6RT4Oamdwrc1dldx/6OnTEr2xnn6Z7BCQKvgSjjnxERTuc+Lhb8O/kSWpCLGEYZ/BQPXFhBDnyfDaZku8ZkES+BsKCTwRXuHeaYmXlEKXFupOQ/E0iNpkQoD/SGsFzUc8A1l9JlQEvbGMWji7L2L7fFuUM3kl844GINqU5V9DCOq54aQj+txP5E4dZuPuIlwaF7FiBKDKl5gedK4Gfdm5zZdcSa9t2d7UcYAsnPB+TUFMlCe6LTXBJvXHZAT+hnT+mwqXyYGhpoUkk+pBcDX3LI9tYouAQgZ4N2kzzv1KwnbIxC69DKsbYD28gELQ== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(136003)(346002)(376002)(39860400002)(396003)(46966005)(54906003)(44832011)(2906002)(336012)(186003)(26005)(2616005)(5660300002)(426003)(316002)(110136005)(81166007)(82740400003)(47076004)(36756003)(70206006)(15650500001)(70586007)(478600001)(4326008)(83380400001)(1076003)(8676002)(8936002)(6666004)(82310400002)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2020 10:09:28.2537 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8ba8c812-c575-4d4d-8746-08d848def3c4 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1985 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: pass (identity @armh.onmicrosoft.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Arm ID_AA64PFR0_EL1 register provides two fields to describe CPU FP/SIMD implementations. Currently, we exactly know the meaning of 0x0, 0x1 and 0xf of these fields. Xen treats value < 8 as FP/SIMD features presented. If there is a value 0x2 bumped in the future, Xen behaviors for value <=3D 0x1 can also take effect. But what Xen done for value <=3D 0x1 may not always cover new value 0x2 required. We throw these messages to break the silence when Xen detected unknown FP/SIMD IDs to notice user to check. Signed-off-by: Wei Chen Reviewed-by: Bertrand Marquis --- xen/arch/arm/setup.c | 12 ++++++++++++ xen/include/asm-arm/cpufeature.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 7968cee47d..ef39ce1ec6 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -133,6 +133,18 @@ static void __init processor_id(void) cpu_has_simd ? " AdvancedSIMD" : "", cpu_has_gicv3 ? " GICv3-SysReg" : ""); =20 + /* Warn user if we find unknown floating-point features */ + if ( cpu_has_unknown_fp ) + printk(XENLOG_WARNING "WARNING: Unknown Floating-point ID:%d, " + "this may result to corruption on the platform\n", + boot_cpu_feature64(fp)); + + /* Warn user if we find unknown AdvancedSIMD features */ + if ( cpu_has_unknown_simd ) + printk(XENLOG_WARNING "WARNING: Unknown AdvancedSIMD ID:%d, " + "this may result to corruption on the platform\n", + boot_cpu_feature64(simd)); + printk(" Debug Features: %016"PRIx64" %016"PRIx64"\n", boot_cpu_data.dbg64.bits[0], boot_cpu_data.dbg64.bits[1]); printk(" Auxiliary Features: %016"PRIx64" %016"PRIx64"\n", diff --git a/xen/include/asm-arm/cpufeature.h b/xen/include/asm-arm/cpufeat= ure.h index 10878ead8a..a32309986e 100644 --- a/xen/include/asm-arm/cpufeature.h +++ b/xen/include/asm-arm/cpufeature.h @@ -16,6 +16,8 @@ #define cpu_has_fp (boot_cpu_feature64(fp) < 8) #define cpu_has_simd (boot_cpu_feature64(simd) < 8) #define cpu_has_gicv3 (boot_cpu_feature64(gic) =3D=3D 1) +#define cpu_has_unknown_fp (cpu_has_fp && (boot_cpu_feature64(fp) >=3D 2= )) +#define cpu_has_unknown_simd (cpu_has_simd && (boot_cpu_feature64(simd) >= =3D 2)) #endif =20 #define cpu_feature32(c, feat) ((c)->pfr32.feat) --=20 2.17.1