[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 2/2] xen/arm: Throw messages for unknown FP/SIMD implement ID


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <julien@xxxxxxx>
  • From: Wei Chen <wei.chen@xxxxxxx>
  • Date: Mon, 24 Aug 2020 03:28:25 +0000
  • 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
  • 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=dCRNMai18oICp1g78MOkm0i99zbDOHtAX7WyMRefru4=; b=j2V/2ZTz2JiSDou4owMmkZVYkUH8JPtcOvY0IwD6pWGS04Bg9iGdTFLE0aeNwXPwLJR+pRzXtezRaySG7MLg7+KjWo86yOhTHbVT44CjnOk99vI903eltTg4gDXsLNhPkXP+5P/ZrjLJ3GD8k6TWzuTbmBZZl4q63I90su4LVjGU1dN2n7J4g0017Kp/Ky7A6Rpk08Eax7rEDj6BBw5fgRWkFfWvqTTdT+F5iW37xg9pBETevfnxGP3hVlBJQjbTyJcqvFPkOyDKBKcLwKEobh4RNCUJCPfl4z1mOGNUaXcGS5Mfu/9+nI81ChGNcsE3l0TNJZe2mvHntWCiLSLNeA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mrtt4Uk+uc3P6Lg9tUAwWkOJJgA+20/ShJCsdB1tzA2zN9TAQSbx1/lnxBKlv1aWMpxLJ/5MWLc8araoNwH7/fnPDsBu11NMHM0o2d3keNyvMBJWWdqkPFkhkM4C0yDNg6HbJEV/srIAqSQy4M9v7Lv1hlz4AO72YNh5cqfFdC7EQzglm2VpuAbsWMAWwY9z33jqfhL8dvKpIsEox4CXxMXXCXattSGMVdW9B284kbgkAOV4Hi2syikMKsUv7yJMbhYNTsf9KhShZNzzhv+h/TDIxADAkBix6F1tr8YVrz4rBM+n8lr85jmWWb2D5oQqYFaktIIB/po/A8Tl7YgarQ==
  • Cc: <Andre.Przywara@xxxxxxx>, <Bertrand.Marquis@xxxxxxx>, <Penny.Zheng@xxxxxxx>, <Kaly.Xin@xxxxxxx>, <nd@xxxxxxx>
  • Delivery-date: Mon, 24 Aug 2020 03:29:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true

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 <= 0x1 can also take effect. But what Xen
done for value <= 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 <wei.chen@xxxxxxx>
---
 xen/arch/arm/setup.c | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 7968cee47d..c7802d0e49 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -99,6 +99,28 @@ static const char * __initdata processor_implementers[] = {
     ['i'] = "Intel Corporation",
 };
 
+static const char * __initdata fp_implements[] = {
+    "Floating-point",
+    "Floating-point + half-precision floating-point arithmetic",
+    "Floating-point Unknown ID 0x2",
+    "Floating-point Unknown ID 0x3",
+    "Floating-point Unknown ID 0x4",
+    "Floating-point Unknown ID 0x5",
+    "Floating-point Unknown ID 0x6",
+    "Floating-point Unknown ID 0x7",
+};
+
+static const char * __initdata advsimd_implements[] = {
+    "AdvancedSIMD",
+    "AdvancedSIMD + half-precision floating-point arithmetic",
+    "AdvancedSIMD Unknown ID 0x2",
+    "AdvancedSIMD Unknown ID 0x3",
+    "AdvancedSIMD Unknown ID 0x4",
+    "AdvancedSIMD Unknown ID 0x5",
+    "AdvancedSIMD Unknown ID 0x6",
+    "AdvancedSIMD Unknown ID 0x7",
+};
+
 static void __init processor_id(void)
 {
     const char *implementer = "Unknown";
@@ -129,8 +151,8 @@ static void __init processor_id(void)
            cpu_has_el1_32 ? "64+32" : cpu_has_el1_64 ? "64" : "No",
            cpu_has_el0_32 ? "64+32" : cpu_has_el0_64 ? "64" : "No");
     printk("    Extensions:%s%s%s\n",
-           cpu_has_fp ? " FloatingPoint" : "",
-           cpu_has_simd ? " AdvancedSIMD" : "",
+           cpu_has_fp ? fp_implements[boot_cpu_feature64(fp)] : "",
+           cpu_has_simd ? advsimd_implements[boot_cpu_feature64(simd)] : "",
            cpu_has_gicv3 ? " GICv3-SysReg" : "");
 
     printk("  Debug Features: %016"PRIx64" %016"PRIx64"\n",
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.