Received: by 2002:a05:7208:13c3:b0:82:bbfa:f723 with SMTP id r3csp42675rbe; Thu, 9 May 2024 09:29:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7j+p/30ea/d/bkIuYIxdbUl9Jf0WV6nLI3WdGtTD44hkvEQJULQG4KZpil/TPLVMAZiR+z7rZHQdNCSgOZolNKev+l6PPVKcCAB29/A== X-Google-Smtp-Source: AGHT+IGSm8iuDLqHWmboZ2lYMpPhHXCnvVFdTEfGxkiJ9UKRI5JtrBos4p4aq0pu1WgmlnVCwJGM X-Received: by 2002:a17:907:1b17:b0:a59:aa69:9791 with SMTP id a640c23a62f3a-a5a2d5eeb92mr10692066b.34.1715272188859; Thu, 09 May 2024 09:29:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715272188; cv=pass; d=google.com; s=arc-20160816; b=1KivCFl510+4fpRFdTMFUag1QSYc0AwMXQeXzg4ls0/m7CCClddz/vuAi6UytrVk+t ilamNedsxW769kevvbK80rsGvu+610NX2ZsAM3Abaqbxx8VehCcsJo8b2CTO9JC3Um3P pB0YQCdoQOFeDqBgRZfv/W0iaizz9kzmGcLAY9bWR9TpxObupCEi5uAZTuZuEYBDhH9t /HCcBebRa8lw3R/iOrtgEZuFoY4IRXSmbs8+AJr4praeiRzR/b6C3bDBwL5MbLkyrUEG kbSJLK5B44ZqAh68U9Y1Er4slMS+iEeevbL5FM0V9v140ucrP1pYvN2sDnc/PB5Bkamy zn/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=v6E6ZusRhlxuRh8LTz85NPr0A8l1rMIJWkDOWsfceGk=; fh=SLEIga5bPkfwcMNRjHyODwkKvoLyMgoZtJucDqqKMHY=; b=S04ujrCkzUq9Kxr2eFa0aUmZFgjKqiyMQyxzjmkmI25g/BZIx7+lVKk5uhpSROpeFe UXbfcfz/2RFJmEenhSJrb1KAocMHqFpUFeLmfJS5IdFO4BLHt0CkBYlG0jNafaCejcUB ocyiAytiPDMuqGcjAtWKsq/WKZ9Uv9i2U2LiorfsIx015tvTatZLmjEceSF/nYwmpi46 G8H031IhEJplZZgfeIdPMGXu5EWG9O/ufoeH9r3xWsb3rTdbJQZOH2rfwh4bSqeD8Y7Q 24LL/3rFMb74KDrOIsq24g3ScpfaFDvDLDxPKNC0Na1ruNIWagESOK+N0ErtDZ8B3M/q +NhQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=PkueXnTt; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-174683-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174683-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17c2cbdesi91565266b.1039.2024.05.09.09.29.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 09:29:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174683-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=PkueXnTt; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-174683-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174683-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9B8421F21CB4 for ; Thu, 9 May 2024 16:29:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3C35170839; Thu, 9 May 2024 16:27:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="PkueXnTt" Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77290171E4B for ; Thu, 9 May 2024 16:27:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715272075; cv=none; b=Xftj5ipfzCzfLxUodUOjHzwpeYM0ykKD3F0uXnQps2bJFnSuwQvjdVPSpMMdZp3Kg5y/qHmgxnf2wl/SaU3dkzcWB7pzUFHVy61Wuus29wYtjRaMGmVS8j6P7riQdS7b7k5Bmn2wEG/UuhnX5yEu2b8mHA4OOnkKb1cRNjpc9SY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715272075; c=relaxed/simple; bh=HTwXq4dfdPMm84nIH+ARCZR286B+TcB5da8GClM6ty0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UyhAdmy67dHIw6wDAw5/KRNSBc8QMSNA7CIFKtR7zReUHCRGDUAG8pqQuedBZb07h/cbDcbOIHzb03Kpt1QS8mzkTi6fpvGIDDybuPVn/x22BaS+EFaT2h0dR5iIjl0zWp5FD7D0FjNYnP65USLVeDwZk8e3MHzfp3ndvZHV9cI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=PkueXnTt; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1ecd9a81966so15650545ad.0 for ; Thu, 09 May 2024 09:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1715272073; x=1715876873; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=v6E6ZusRhlxuRh8LTz85NPr0A8l1rMIJWkDOWsfceGk=; b=PkueXnTtm40OBoZIeBuLVdEIXpBbAURfIsmrhwk1q1lNml4u0vSdJixASTgFqkW35d nRFySHk+EfISxgffazee+bex3NptjMArrgRSITxcmOiyX97SwBMW31bfEltSL+VE4CHd RU+TGy3fMQHVhmDeTT6mxXjsg4i+e2IZctDgCLtKRwNZzSexxdn2EPmfD8+4R6Pm7rje vuObQvQt9kMSJfdeY3vUpbl1JpjNSsMDaLCK7S1MxUHa/7Aq/oLFk8IG41VmspxbejnF 2oBI0dTJyFtLOGB4vQh/pdyacLhytWyGNSRmmg9Yfwut71Av0e7a2N4WUKzOcR3Yuugv GgkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715272073; x=1715876873; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v6E6ZusRhlxuRh8LTz85NPr0A8l1rMIJWkDOWsfceGk=; b=CsDba5q7zjna43a5NZEO653YopCG+1Amk4ZZvW+Q9o/Dcgc3Cn73aAWFGyOvMb1B8/ p8JZy85nDl5Nxglbo56j/iW6a/lcQ65uBoqp6miVWUIvdrdTCbm+fSrNanGJ5qrGeThh Tb5dCwfufBrhn9WOhyc2nbCZTzhHXYqToX/e6CA6wV9YMI9CLaB9uLFa/XaRIddN4JFa 2DJbQY9PHnG5Kss/7/9us8KdReJRV13162ixccE71DxOZEFLLD7Mq43x6FWdmsbUWvMT hShLbmFJHzh2yc12N15Q60ORn4Yu7UJJ9WE5ro+6qile3fFsrceAtDZUJYyVFUxt9vL0 niYg== X-Forwarded-Encrypted: i=1; AJvYcCUVk4krdZkAvYEwnDfrp6Gdvemauy4JDD9wVjYY3tbqaWs9ji4xQAOcXV8EHKgfdpbSz8cRwEpIqRu3HW64IzAMKhXlYhnEzv4c8dlY X-Gm-Message-State: AOJu0Yzfue9SsA9Gg2r6p+RDV6OzU5nMXb5HwPgQAcRpR1ww2xTxDxbN LsVQw1/JfAnUfuZEFM1HPZVjTWCBU8c48yEeJJNBgCYMP+jQTC6rYbioNy/0jYA= X-Received: by 2002:a17:903:2301:b0:1e4:6253:2f15 with SMTP id d9443c01a7336-1ef42f74cfdmr2685595ad.16.1715272072597; Thu, 09 May 2024 09:27:52 -0700 (PDT) Received: from [127.0.1.1] (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0c13805asm16210285ad.264.2024.05.09.09.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 09:27:51 -0700 (PDT) From: Andy Chiu Date: Fri, 10 May 2024 00:26:58 +0800 Subject: [PATCH v5 8/8] selftest: run vector prctl test for ZVE32X Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240510-zve-detection-v5-8-0711bdd26c12@sifive.com> References: <20240510-zve-detection-v5-0-0711bdd26c12@sifive.com> In-Reply-To: <20240510-zve-detection-v5-0-0711bdd26c12@sifive.com> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Heiko Stuebner , Andy Chiu , Guo Ren , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Evan Green , =?utf-8?q?Cl=C3=A9ment_L=C3=A9ger?= , Shuah Khan Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , Vincent Chen , Greentime Hu , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org X-Mailer: b4 0.13-dev-a684c The minimal requirement for running Vector subextension on Linux is ZVE32X. So change the test accordingly to run prctl as long as it find it. Signed-off-by: Andy Chiu --- Changelog v4: - new patch since v4 --- tools/testing/selftests/riscv/vector/vstate_prctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/riscv/vector/vstate_prctl.c b/tools/testing/selftests/riscv/vector/vstate_prctl.c index 27668fb3b6d0..895177f6bf4c 100644 --- a/tools/testing/selftests/riscv/vector/vstate_prctl.c +++ b/tools/testing/selftests/riscv/vector/vstate_prctl.c @@ -88,16 +88,16 @@ int main(void) return -2; } - if (!(pair.value & RISCV_HWPROBE_IMA_V)) { + if (!(pair.value & RISCV_HWPROBE_EXT_ZVE32X)) { rc = prctl(PR_RISCV_V_GET_CONTROL); if (rc != -1 || errno != EINVAL) { - ksft_test_result_fail("GET_CONTROL should fail on kernel/hw without V\n"); + ksft_test_result_fail("GET_CONTROL should fail on kernel/hw without ZVE32X\n"); return -3; } rc = prctl(PR_RISCV_V_SET_CONTROL, PR_RISCV_V_VSTATE_CTRL_ON); if (rc != -1 || errno != EINVAL) { - ksft_test_result_fail("GET_CONTROL should fail on kernel/hw without V\n"); + ksft_test_result_fail("SET_CONTROL should fail on kernel/hw without ZVE32X\n"); return -4; } -- 2.44.0.rc2