From nobody Thu Apr 9 23:26:09 2026 Received: from canpmsgout05.his.huawei.com (canpmsgout05.his.huawei.com [113.46.200.220]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CEBE51DF27D; Thu, 5 Mar 2026 01:37:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.220 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772674626; cv=none; b=PzRl48Khx1aVLofuV7brBAiKBdPwbtFHenMw36G6qzRG/hrkRV6PMOWX5qg2gLC6BoUU475Rs5H8TDPp6FatnyWexuh8G9lZxdaa/K+y+MguSghMEgvcPWk0ltEUlJ3nSFctDCDM/CQIpg6ADJg/McF6WHB5AG0f8nczpSB5Dgw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772674626; c=relaxed/simple; bh=26J2nqaFmbrah2PKXmDudLqALIgu2GaOUWVywwY8teU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kJm9kzEM81eBEGG/6tIFuVSvqmmJK0Q8Nw0267cqzEmynVr5DbMFEAzIKNWxXkaG10yYjStOKvjI4tqAxCR0nPebqhj9WlLbl6C6MI+w4KF0VuyWF8Ds01zA5mi35Fx482OM8i7isUSKF8fwS9ubEqDeYgpsE5psgcIeAmmBoxM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=G79Eu5nq; arc=none smtp.client-ip=113.46.200.220 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="G79Eu5nq" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=Nrn7dhxHopK9fUC/zHXWFahWmOlp1m/cTtjL8628MMI=; b=G79Eu5nqSquaqCpwbtHF19hIncxdaY2ImMju64HKIxgyjHAmCKJXn8Ina10S3JhteiB/M9Q93 sipw1D1n5XqsgmTZzm/sXj3aJ9lxBldpgH/qeoA4zuxgvrZanK5g0hruK1Ycyxp3PJqXEif9xgc fD+hwbM+TqZrWLxd72aYDSA= Received: from mail.maildlp.com (unknown [172.19.162.140]) by canpmsgout05.his.huawei.com (SkyGuard) with ESMTPS id 4fRBqG2q0Wz12LHt; Thu, 5 Mar 2026 09:32:26 +0800 (CST) Received: from kwepemk500005.china.huawei.com (unknown [7.202.194.90]) by mail.maildlp.com (Postfix) with ESMTPS id 7B9E5202D7; Thu, 5 Mar 2026 09:37:02 +0800 (CST) Received: from huawei.com (10.50.163.32) by kwepemk500005.china.huawei.com (7.202.194.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 5 Mar 2026 09:37:01 +0800 From: Yifan Wu To: , , , , , , , , , , CC: , , , , , Subject: [PATCH v2 1/2] selftest/arm64: Fix sve2p1_sigill() to hwcap test Date: Thu, 5 Mar 2026 09:36:37 +0800 Message-ID: <20260305013638.992301-2-wuyifan50@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20260305013638.992301-1-wuyifan50@huawei.com> References: <20260305013638.992301-1-wuyifan50@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems200002.china.huawei.com (7.221.188.68) To kwepemk500005.china.huawei.com (7.202.194.90) Content-Type: text/plain; charset="utf-8" The FEAT_SVE2p1 is indicated by ID_AA64ZFR0_EL1.SVEver. However, the BFADD requires the FEAT_SVE_B16B16, which is indicated by ID_AA64ZFR0_EL1.B16B16. This could cause the test to incorrectly fail on a CPU that supports FEAT_SVE2.1 but not FEAT_SVE_B16B16. LD1Q Gather load quadwords which is decoded from SVE encodings and implied by FEAT_SVE2p1. Fixes: c5195b027d29 ("kselftest/arm64: Add SVE 2.1 to hwcap test") Signed-off-by: Yifan Wu Reviewed-by: Mark Brown --- tools/testing/selftests/arm64/abi/hwcap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/self= tests/arm64/abi/hwcap.c index 9d2df1f3e6bb..c2661a312fc9 100644 --- a/tools/testing/selftests/arm64/abi/hwcap.c +++ b/tools/testing/selftests/arm64/abi/hwcap.c @@ -475,8 +475,8 @@ static void sve2_sigill(void) =20 static void sve2p1_sigill(void) { - /* BFADD Z0.H, Z0.H, Z0.H */ - asm volatile(".inst 0x65000000" : : : "z0"); + /* LD1Q {Z0.Q}, P0/Z, [Z0.D, X0] */ + asm volatile(".inst 0xC400A000" : : : "z0"); } =20 static void sve2p2_sigill(void) --=20 2.33.0 From nobody Thu Apr 9 23:26:09 2026 Received: from canpmsgout06.his.huawei.com (canpmsgout06.his.huawei.com [113.46.200.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 044A519E98D; Thu, 5 Mar 2026 01:37:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.221 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772674626; cv=none; b=XKvVHCi40B3o7eQ3W5H81n46IWrrsHcwfzpYzI4RmAZRlEU+A46BEoQljGSvPNToJy+v3sdV8u8TAs4NlQnhxuqAPP8r+5ARV7zBcKhFLytq4NKzDP3I2zdrwzubLOcpMMM9snzv/8B49oBBxnp+pMTrRsD7qmWnZElL1mKUXEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772674626; c=relaxed/simple; bh=Uevk0GB5nabvrKrs0N2S+u91XxJSaz29sUMiVgSAUnc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=S+o0zh+GUCBsVNGMntgjAQuB1g2oCSa2/b6bUzV9/EuvBHt5KRmLMPUtIDqAy0iPiAg4yPHYYd1Q4wLzbt5pWRKoWRL9pnl30Te80DfsOXKpiJiNf8iN/TjiAiLMTafDZDyL67byPyjC6kdEpZxgw1w2MdygozC9H4RhnMa2Om4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=DvCG0FyU; arc=none smtp.client-ip=113.46.200.221 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="DvCG0FyU" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=OfW3VplqAwqPnYpDi9Xi2kjGv6UcJGL67/vONLonH0k=; b=DvCG0FyUOHOUTxq1Ky6Vqx/hHHDjVHJ1DiomkbGf127J7h2OSB/q4jJYeB3hz7onFDsoSuKec pI9PfXuJu6AEZ4O3TBBe3xzPWUnDrtmVS+o32kiOjk+aveJqUQxxWKky0t3SNto05J29PTJOW0p s6Fx/cc3+uQ9UPp0u32TbLM= Received: from mail.maildlp.com (unknown [172.19.163.0]) by canpmsgout06.his.huawei.com (SkyGuard) with ESMTPS id 4fRBq01VLjzRhTj; Thu, 5 Mar 2026 09:32:12 +0800 (CST) Received: from kwepemk500005.china.huawei.com (unknown [7.202.194.90]) by mail.maildlp.com (Postfix) with ESMTPS id 02EC54056B; Thu, 5 Mar 2026 09:37:03 +0800 (CST) Received: from huawei.com (10.50.163.32) by kwepemk500005.china.huawei.com (7.202.194.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 5 Mar 2026 09:37:02 +0800 From: Yifan Wu To: , , , , , , , , , , CC: , , , , , Subject: [PATCH v2 2/2] selftests/arm64: Implement cmpbr_sigill() to hwcap test Date: Thu, 5 Mar 2026 09:36:38 +0800 Message-ID: <20260305013638.992301-3-wuyifan50@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20260305013638.992301-1-wuyifan50@huawei.com> References: <20260305013638.992301-1-wuyifan50@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems200002.china.huawei.com (7.221.188.68) To kwepemk500005.china.huawei.com (7.202.194.90) Content-Type: text/plain; charset="utf-8" The function executes a CBEQ instruction which is valid if the CPU supports the CMPBR extension. The CBEQ branches to skip the following UDF instruction, and no SIGILL is generated. Otherwise, it will generate a SIGILL. Signed-off-by: Yifan Wu Reviewed-by: Mark Brown --- tools/testing/selftests/arm64/abi/hwcap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/self= tests/arm64/abi/hwcap.c index c2661a312fc9..e22703d6b97c 100644 --- a/tools/testing/selftests/arm64/abi/hwcap.c +++ b/tools/testing/selftests/arm64/abi/hwcap.c @@ -56,7 +56,8 @@ static void atomics_sigill(void) =20 static void cmpbr_sigill(void) { - /* Not implemented, too complicated and unreliable anyway */ + asm volatile(".inst 0x74C00040\n" /* CBEQ w0, w0, +8 */ + "udf #0" : : : "cc"); /* UDF #0 */ } =20 static void crc32_sigill(void) --=20 2.33.0