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

[PATCH v4 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: Tue, 25 Aug 2020 16:06:03 +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=aCjAyeO+A0m1bPfAQWavgSmS0fm4D7iWs1wOM2Rmzno=; b=b8wg/E0HyFXblY4Mxff+Y7PvLGzUN4v30vWLj9EdItyp+A4NP5SKH8kHnDIDEjP2wwrdlnNp2r3hKSJmWxq1BggrSfY3ERdG/J6EULPHTwKeoGwVqF0BarDxOS3Ww6Z4Kl1/INC2v8O/c69dHszUXEyazwDkXvg71LLJE5354wQ/EgJaEA/gVb9KIXenI8KmdxiuPlwJ592zhzaamLwecDqvzVfxEO1ZUOOwyJXIyElYRMPXO4TiLl8kMw/CVIKTuyHY8mW9nzwWl1IebYgf57hkJor6r5APu89E9511kplTzViph/SwYTlXEq/SqOui0KZFVSKcHFOZnRMvyYxI9Q==
  • 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==
  • Cc: <Andre.Przywara@xxxxxxx>, <Bertrand.Marquis@xxxxxxx>, <Penny.Zheng@xxxxxxx>, <Kaly.Xin@xxxxxxx>, <nd@xxxxxxx>
  • Delivery-date: Tue, 25 Aug 2020 16:06:48 +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 | 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" : "");
 
+    /* Warn user if we find unknown floating-point features */
+    if ( cpu_has_fp && (boot_cpu_feature64(fp) >= 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) >= 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",
-- 
2.17.1




 


Rackspace

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