From nobody Thu May 2 22:06:48 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=1598371627; cv=pass; d=zohomail.com; s=zohoarc; b=ZwMFQOBoZA3xgGUwwDEP0HYx9oO9ESZfZ8UkGBZlLAX2mP1NiCNmzvkUNvaHr/o+vz/fmd4bUxzs19PeiWK0dv234ErFqiXeZMpg7d6hoP0J2pV2WEVDpOrZAzHREUAtrJtRXJWX7sOj4/p5TNR2WN7n9Cm42lrS+qkA+dTwk1w= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598371627; 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=EYmo6+sFRNF9O5BQxGrBM/A30j8ixmYu0Z5cWsTRf5PnS0HsKeImxkKjG/EgyGI0hGFPK0g4t50yENhkJ8mqHWwRzFLCHNgnpYpwOspue++kVVCUHGfYhwL4J2OnSSGlaoftsnkj9TJfx6HA3IkLrAuk4wVGSK98wxaMzmJw7gM= 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 1598371626234467.8960518152709; Tue, 25 Aug 2020 09:07:06 -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 1kAbTC-00043z-Bj; Tue, 25 Aug 2020 16:06:46 +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 1kAbTB-00043e-0q for xen-devel@lists.xenproject.org; Tue, 25 Aug 2020 16:06:45 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (unknown [40.107.8.78]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 96917e6f-fc4d-4c40-86e1-5cb998a496bd; Tue, 25 Aug 2020 16:06:38 +0000 (UTC) Received: from AM7PR04CA0013.eurprd04.prod.outlook.com (2603:10a6:20b:110::23) by VE1PR08MB4879.eurprd08.prod.outlook.com (2603:10a6:802:b0::16) 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 16:06:35 +0000 Received: from VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:110:cafe::8f) by AM7PR04CA0013.outlook.office365.com (2603:10a6:20b:110::23) 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 16:06:35 +0000 Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT034.mail.protection.outlook.com (10.152.18.85) 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 16:06:35 +0000 Received: ("Tessian outbound 34b830c8a0ef:v64"); Tue, 25 Aug 2020 16:06:35 +0000 Received: from 14d743066a72.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7D628D81-D674-434E-A3E7-254F09BA3B56.1; Tue, 25 Aug 2020 16:06:29 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 14d743066a72.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 25 Aug 2020 16:06:29 +0000 Received: from AM7PR04CA0024.eurprd04.prod.outlook.com (2603:10a6:20b:110::34) by VI1PR08MB3566.eurprd08.prod.outlook.com (2603:10a6:803:81::15) 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 16:06:24 +0000 Received: from VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:110:cafe::5a) by AM7PR04CA0024.outlook.office365.com (2603:10a6:20b:110::34) 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 16:06:24 +0000 Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT034.mail.protection.outlook.com (10.152.18.85) 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 16:06:24 +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 16:06:15 +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 16:06:15 +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 16:06:12 +0000 X-Inumbo-ID: 96917e6f-fc4d-4c40-86e1-5cb998a496bd 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=tW81WUtcEey1DpjyEhpr2GFfkUviVChHK/eux5PxKh2OO+bGhH61lIOt3TCMkNwuxGDkh9iQ4+EJ+rlF/5C3TOKhS4rYYfG9/xg/tEeee5T1T2Uq95Q0BXw/iGYYqbG0lYfWRG/T8ja7TdplSSD2Af+j2AtSlOIqA3ndkTFNi6U= 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: 0bc93683b30ee6c0 X-CR-MTA-TID: 64aa7808 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aBfwO9ZqbE8APr7/ki+POnZC5X2JppDb4ErRrRv/weKMco+qfiaROWErmh2IrNufDrFLYseQJb8+YN0eJn2/++YjPj1QmkZC95LgFaVk2Bb9Eqv60O2CgqShWsdDXY/NPcG64W3k4ZZgc1p+dg7E4fhOXPOxfvFEvGws+lYYIGQp4uklU8R6zfmbH5dWW1oJ5bBqayD9KOGGs/biXgKfZwlv5NJhn/N86I4oI/r5guk7Mh0qrMq3QsOrkkbq7oQns2OvA/yj38/pI9Vk7ynogogU3pqx8fCTz3g3cpQKlHl0pEQiqss4bhZ8kWR9c9MTn7X+f7h7jT5nES7EHBG9BA== 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=liPaN9Fa/GpS3U9xGmG5evn+1I3XVlcqX1nUt5wq5pdZhQOX82rrgIE7DIx+EXucCZ5AybLyO2Ktebpda6pSGGsg5Bw8z96gxDc6bWD7LyxtDpA9Jm5cxr+Ui24p6wQ4FN3mn7BVEPMJaUTRTyYZt9dRfr6xdrjUMPc8gDLavKax1XCb+Ba6vmLvqMqzIvicWrNh2jNFkXApNKIDcGrCZlXJPNbvYLGMmrGaKTqGnfnFtTF1iQy2W9ippKSh3voQz5KugWiuftQjxfzPt3xfGLVOWIxdDbTfPUxmKtOiqXS6RfxDZDSyEx4F5HdYg5TLJejQE8X/ZHu1WRLEVlQwgQ== 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=tW81WUtcEey1DpjyEhpr2GFfkUviVChHK/eux5PxKh2OO+bGhH61lIOt3TCMkNwuxGDkh9iQ4+EJ+rlF/5C3TOKhS4rYYfG9/xg/tEeee5T1T2Uq95Q0BXw/iGYYqbG0lYfWRG/T8ja7TdplSSD2Af+j2AtSlOIqA3ndkTFNi6U= 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 v4 1/2] xen/arm: Missing N1/A76/A75 FP registers in vCPU context switch Date: Tue, 25 Aug 2020 16:06:02 +0000 Message-ID: <20200825160603.32388-2-wei.chen@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200825160603.32388-1-wei.chen@arm.com> References: <20200825160603.32388-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: a5a3d10f-1eb8-4f47-92d2-08d84910d76c X-MS-TrafficTypeDiagnostic: VI1PR08MB3566:|VE1PR08MB4879: 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: DChIpTwLyBfb5rP/RKHNBE5mV9VO2fi239U0Vz8aILgdbu37VxxmlFVy+M1IOyDN4NVKceO9JQR0SodCNPB0tpceahykqQID/r4slHBou5cE2vVGyjd9Sp3ZonLY6MnvwM3ivIO1jtYUxpdOG8w7jrmaOPI5l4mPCZr/PSnHqBgYfUq369/g+LjPNTX9ribFKlbfKVL53Tp4RSc+8dh2xG7zyL6LGf5rd9mXb8DQ/B/0MEFLjRheL5XoGK7sXDJejBdpKUsG5j5IKDWBRZrFKGoGrtYaxMIw8dBNJeCB/oRhXNtTSJk/lLT+l+Zb6jEZlHGst3EgQyxBDZ1QUHytm67CxlHVjbbsQ6hjP6vZhwIFJI5LUmdyLNuDB2wZB6hUvIlL/vhAKD3VA8ieuH75CQ== 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)(39850400004)(396003)(376002)(136003)(346002)(46966005)(82310400002)(70586007)(4326008)(2906002)(70206006)(316002)(8676002)(426003)(478600001)(44832011)(36756003)(356005)(54906003)(6666004)(47076004)(82740400003)(8936002)(2616005)(86362001)(336012)(26005)(186003)(81166007)(110136005)(83380400001)(1076003)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3566 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: c6b0ce40-7d83-495a-380d-08d84910d09b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rX7BQlb/0ngAHKEOn5UqbXSRMlLrRg0/VYb9TZ88ARf2BabXGyRdVDjfRQGI3AqQ2hiYgjwrk5cvBHWy41EKtM+Ud2feAtHR0mmUl+T0kapamr/9v0sKv3ULU8/eiyyMRexpLFuRMGnYNhaZ4FDjt/R0FCHOVrq2XZGCEN6YSMImNAsfjWDKHvZW2r0HS8FHnv7FAuJ8llvRzSuWbvE31vlcSJoqmHLHrABSf6gCGppsREvqBQkttDx2Iaj5/CoB9FbL5WbbTLOfRUH9idgIdqk4sguQLG9K+NfcaEJEvc5DpNNVeLpDrwtgJd23eXIYfrQ4dP+tEGcuDqJbla+9caTHKrsNqWc8mLM6yq985Gt8MPzxgdS2Jng9vPbZwr+W5u1AukE6k7G5nXOnblNTFQ== 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)(39860400002)(346002)(376002)(396003)(136003)(46966005)(36906005)(44832011)(316002)(86362001)(1076003)(4326008)(336012)(478600001)(5660300002)(8936002)(8676002)(82310400002)(82740400003)(70206006)(70586007)(83380400001)(186003)(47076004)(426003)(6666004)(36756003)(81166007)(26005)(2616005)(2906002)(54906003)(110136005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2020 16:06:35.4317 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a5a3d10f-1eb8-4f47-92d2-08d84910d76c 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: VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4879 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 Thu May 2 22:06:48 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=1598371625; cv=pass; d=zohomail.com; s=zohoarc; b=iY3lD5yqjJFJzz0eLr+r6O4Pyhg0bhqmKAKosu5lZQnzEtz+d5GjucDuvdSa6Ll7M6IjcZve3EfBrytaoq05wzBQVAaSMk7LcJDM/TY8t2UTmTw7DKTV7ZteWinQ7FYYIrHQ8pG4bfInLFhIActaBx82vPqN805CPd+2Jy3PnAg= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598371625; 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=aCjAyeO+A0m1bPfAQWavgSmS0fm4D7iWs1wOM2Rmzno=; b=UDBsmOsUx1wljXA7Os59iyueCl+5y7FVMYPtoyPlEkVkouJU8+OI/Kja8cq99KuyxZN/JVDrXvXWMTRGpaIsIz7/KmOYozDS3ok+wqfCZD2JIprTsH3so4BrQCrsLmeg84qeQf/+CjZZ6lLJ5U5XocM0ZiARSHlysECbdvY3DqA= 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 1598371625695409.03070131652055; Tue, 25 Aug 2020 09:07:05 -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 1kAbT7-00043j-34; Tue, 25 Aug 2020 16:06:41 +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 1kAbT6-00043e-28 for xen-devel@lists.xenproject.org; Tue, 25 Aug 2020 16:06:40 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (unknown [40.107.20.79]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 87713346-2cfa-49be-8575-1d6654c04978; Tue, 25 Aug 2020 16:06:39 +0000 (UTC) Received: from DBBPR09CA0015.eurprd09.prod.outlook.com (2603:10a6:10:c0::27) by VE1PR08MB4928.eurprd08.prod.outlook.com (2603:10a6:802:aa::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16; Tue, 25 Aug 2020 16:06:36 +0000 Received: from DB5EUR03FT038.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:c0:cafe::1e) by DBBPR09CA0015.outlook.office365.com (2603:10a6:10:c0::27) 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 16:06:36 +0000 Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT038.mail.protection.outlook.com (10.152.21.84) 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 16:06:36 +0000 Received: ("Tessian outbound 7fc8f57bdedc:v64"); Tue, 25 Aug 2020 16:06:36 +0000 Received: from 1e3c6d0327bb.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 89073625-0FA7-49D8-988D-85A4C80EF3B1.1; Tue, 25 Aug 2020 16:06:31 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1e3c6d0327bb.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 25 Aug 2020 16:06:31 +0000 Received: from AM7PR04CA0022.eurprd04.prod.outlook.com (2603:10a6:20b:110::32) by PR3PR08MB5786.eurprd08.prod.outlook.com (2603:10a6:102:85::9) 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 16:06:30 +0000 Received: from VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:110:cafe::13) by AM7PR04CA0022.outlook.office365.com (2603:10a6:20b:110::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19 via Frontend Transport; Tue, 25 Aug 2020 16:06:30 +0000 Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT034.mail.protection.outlook.com (10.152.18.85) 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 16:06:29 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) 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 16:06:18 +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 16:06:15 +0000 X-Inumbo-ID: 87713346-2cfa-49be-8575-1d6654c04978 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=aCjAyeO+A0m1bPfAQWavgSmS0fm4D7iWs1wOM2Rmzno=; b=K0Th03ax0qMnWI1ODBLtvRuXwEwXk/oiD3BO71vuJ3LPun5LPz6UO5ANzjySt8kVRRJPJ/AUlRPPTQ/Ruuc8+foEoCpkMGhrAuMYNsk79A82e9jUjgWBgpFsycnXj42WyYTMueJ5ayYHr2d6RQf25ONcEB4HrCJRt8rjaMpEFi0= 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: 319a6b4152799937 X-CR-MTA-TID: 64aa7808 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eLn49CFaDW8eHvjfpEJ/YMeRgXOQAjt4jRbs02QUzhBv/76zYNrbcxMvAueECIntHPFvuNSj5PYOMOheAUOErEFJGlkcC1wSEuatSXVeUwCgywqACCfuqa88qlbpw1QKtBkB7AYVFPgtWLISo/hiq43kKtaXYihr29znk9JWakjRAHF/hac2uoHqyF8yaZmhecRABah+ZaUk6WE82Tmiithzw/1fRaUyNUuRr754Z2zgiNx3jZyncvosOjv9+NwhBRB8ZfukEiAg4ldDI/EuPL0xUE8zVr/5V/dOJcKcE67bunci7Em+hk16wENgWXdZZdXPQOnslAPYT49vaQUKdQ== 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=aCjAyeO+A0m1bPfAQWavgSmS0fm4D7iWs1wOM2Rmzno=; b=b8wg/E0HyFXblY4Mxff+Y7PvLGzUN4v30vWLj9EdItyp+A4NP5SKH8kHnDIDEjP2wwrdlnNp2r3hKSJmWxq1BggrSfY3ERdG/J6EULPHTwKeoGwVqF0BarDxOS3Ww6Z4Kl1/INC2v8O/c69dHszUXEyazwDkXvg71LLJE5354wQ/EgJaEA/gVb9KIXenI8KmdxiuPlwJ592zhzaamLwecDqvzVfxEO1ZUOOwyJXIyElYRMPXO4TiLl8kMw/CVIKTuyHY8mW9nzwWl1IebYgf57hkJor6r5APu89E9511kplTzViph/SwYTlXEq/SqOui0KZFVSKcHFOZnRMvyYxI9Q== 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=aCjAyeO+A0m1bPfAQWavgSmS0fm4D7iWs1wOM2Rmzno=; b=K0Th03ax0qMnWI1ODBLtvRuXwEwXk/oiD3BO71vuJ3LPun5LPz6UO5ANzjySt8kVRRJPJ/AUlRPPTQ/Ruuc8+foEoCpkMGhrAuMYNsk79A82e9jUjgWBgpFsycnXj42WyYTMueJ5ayYHr2d6RQf25ONcEB4HrCJRt8rjaMpEFi0= 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 v4 2/2] xen/arm: Throw messages for unknown FP/SIMD implement ID Date: Tue, 25 Aug 2020 16:06:03 +0000 Message-ID: <20200825160603.32388-3-wei.chen@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200825160603.32388-1-wei.chen@arm.com> References: <20200825160603.32388-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: 026d899e-faf5-4516-244f-08d84910d80d X-MS-TrafficTypeDiagnostic: PR3PR08MB5786:|VE1PR08MB4928: 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: 8XuaOSnvuNiVdu4lThM5VeXiBwp61ABM6nLkiJCx0fLJ6FfMcAzu9Gd9D2KSN171KDp8uXrY1VwZ43QT4/SXpO+QFpJ8gO7NwhQLRXYNemPkkFPraZq0IO76sAillmTpx/5w/1Xsm/YovASZe5IEtTbOsJXsli3hQm0TWjWnsQEYpC2ykL4gy7O3hT6eoS9ENkxTp6dB08sEfh9WRZzFcD+NkNFzhtIwdcTC+Tu6BMV79pWGG+DGKxryDht2zvnhbJXRzkr7UTHFj5ZNBghEOoBIAU/Qmc/we5eyqRAYOXRBBegy5KStIOPx2HklKFDPmVnTwnG0aMJSK4ExS/oE6ktegCnC4oohRbYzzdVuK5vmdChGiSRVaGZLdclq+bdAme7LDq0UgWiRB1/7fSccGQ== 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)(346002)(136003)(39860400002)(376002)(46966005)(70586007)(356005)(82740400003)(47076004)(81166007)(426003)(478600001)(26005)(186003)(336012)(5660300002)(2906002)(82310400002)(15650500001)(83380400001)(8676002)(8936002)(4326008)(36756003)(316002)(110136005)(70206006)(54906003)(1076003)(6666004)(2616005)(44832011)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5786 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT038.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: b854f8ea-902f-4b66-a34f-08d84910d418 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dhJDy3PVxrQRY0am3VFrxYQp+t14+BWwcaqHC0AnRPeZL4vzNPhNoUEp6Ne+31yxZD13Tdxgov1xbubAhUxgE39ChFxfkuPb/kkZEw41AkVRjKZoCb/g/ZN2fDs61R2Y+0kzf0wRecfe0WNck0MX/ynd6/Dd7rsKr8jpi+yc5vTtLOvolObR7ryX5lejcs3RiT01kepnK0a+XgFgCrK9CLKh4W5Jyk6OZPVodPd4hOCG0gPsWK9/8XiO2iJ35Idw0YE3UFJLcBknqprj16sNtfP3d3/WPRnmzDtZs+pANmVpzUHOqmnGES35VdAZatKJ+QHDBkApOxYERNYfTIkAoQc31avxCNE8QxfaGpNMh3MGlcYImV4G6h7z2MqbOy2LUTkBiLCKLFjr7UlxqfO8kg== 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)(346002)(136003)(376002)(396003)(39860400002)(46966005)(5660300002)(6666004)(4326008)(15650500001)(110136005)(478600001)(8676002)(426003)(8936002)(86362001)(1076003)(83380400001)(82310400002)(47076004)(44832011)(186003)(82740400003)(70206006)(54906003)(2906002)(26005)(336012)(70586007)(36756003)(2616005)(81166007)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2020 16:06:36.5894 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 026d899e-faf5-4516-244f-08d84910d80d 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: DB5EUR03FT038.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4928 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 Acked-by: Julien Grall Reviewed-by: Bertrand Marquis --- xen/arch/arm/setup.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 7968cee47d..6a31eca984 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_fp && (boot_cpu_feature64(fp) >=3D 2) ) + 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_simd && (boot_cpu_feature64(simd) >=3D 2) ) + 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", --=20 2.17.1