Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp999080lqo; Thu, 9 May 2024 01:26:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUFtrIn3+9hFaQWdTCl+eGMUZHlSyNVQHSt33olRJz7mAX9H5WvAJrQjOhPkzBW2yHDAhbYX77Pa8JFfQoLY0lmWMPkkomfZ648HyriJg== X-Google-Smtp-Source: AGHT+IHcrIsGwdbNLzs770ckbSfmGUT8O4Vp3h8QCTfUQasnEAxOB34O2Dc7EO6tt7JMQHaMZX+b X-Received: by 2002:a05:6122:208d:b0:4da:9aa1:dd5e with SMTP id 71dfb90a1353d-4df693608e1mr5632286e0c.10.1715243186356; Thu, 09 May 2024 01:26:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715243186; cv=pass; d=google.com; s=arc-20160816; b=Q+QLT4/SV0Pv8aotH7AHHY2E7ZoDE//FQHB2AVPMF+JwBVD68FbGcgNVqx/Oko/iQa 8iTftBLl1rY+X9g4tB0FLm3EVxZ5kMHVGNQdvbxGpikYYnEFY7kwn7F4TrhxsgAJ+SAX aILR0wuHL/WNyFW5PPUrPI5ZDcmJmEYWSX0yIL60rB8CAodycUVM0L3MtVBlt8qNx8sd uggLZkAVqfc1geMBULaTB1WhDTdtAqrKujL3aUxJu7zQUIIy/oj4fCpgxFbKGFvW4GeO VBEOhxy0+ZQ2Yv/zpFAqPXIPvij8OOw7YZVe7YMsdqnUdw7d2sKuK+bx29ogqO0CUHuI kXLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lizFEMoTEBeHtyz3VDJYwUzuXXkaTL9FurOp+03QTdM=; fh=NTDwbQR1+YYxY7uj71slzRStiVTx5176TxnBN0QOCes=; b=bWZGcmLhuTkwzTz2pdH4NvSMtodCHQHsvC81l2qZpLg4YbU8gfsGp4xuSD3fqODOBI c21jnQJoPVVCsEjbOcWKv1UgEIKADXvngRNyxHGhlXyyO8RlurHvv6Tfwlo4b171rv9y eFG489sfwoDHuNLKOvqjkiQq6XKGM3FZGGccZBuLbKz400Da8mIyv9ZxWGcgKmAwCbXn I9Y+h3Yb4HzKzWuBXfMj2KDMrclIAguQt+tcRI/e7oU2ChWO6oP6GPANnvs0NGzS2VBf TM4VCO6hZODlrZArrz//a0qptahhl8RZe17imbhyUZBTSGv7kGrhcKbVs/o9njq1L2fj mU+A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=AMdu3RDe; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-174285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174285-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f29a490si9418396d6.301.2024.05.09.01.26.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 01:26:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=AMdu3RDe; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-174285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174285-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 09AFC1C20825 for ; Thu, 9 May 2024 08:26:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 36C2C149E08; Thu, 9 May 2024 08:26:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="AMdu3RDe" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 9A8BFD528; Thu, 9 May 2024 08:26:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715243177; cv=none; b=d9t1mRc5bDJ5I+S5uWcxTBgDITUhq/9ud20dY/JjTBwYHYzqbwFZL9j9GTWy84ws4vIxUGr3COEXvzyIUEy2qFTdQo9JCNWak3em7TpgC1L7ZM1Zz4vb2YS3YGbPlaZSNsig4VvbxGXzFqXrLpyQSTFuVdPMaEwQLnC7wjqaJdQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715243177; c=relaxed/simple; bh=lizFEMoTEBeHtyz3VDJYwUzuXXkaTL9FurOp+03QTdM=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=M6zyTHweQXswqt/IWs1Ni92YunSqjRQNt2aRaBOeXbUKyONjwFji6gksBmUtMIqiCGjDXP55gA7M3XzZBC2JkH+p5VwtQ5CYtiL0MHPbrcPFrvaqs5qUN0aIZCelGFs3bfD1qpa87qCuLwrbIB2upzGlPh2Sx4douTFw8Q+ax7s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=AMdu3RDe; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1715243175; x=1746779175; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=lizFEMoTEBeHtyz3VDJYwUzuXXkaTL9FurOp+03QTdM=; b=AMdu3RDe+AmTMkyfebgdHaPS9XG7SfMJ6/8mJwE/sYMHcF3N/0YOLPMZ mACW8uk0IWCIw3TDzVQk8A6fcnwlbNYtgamafNQNY3QFwgRgqVRwHtNNL 5zYUVQDxedhpYmOYJW9Bjzqk5hnfDudsDQWdBFJ2Iwh+q2vPyeTNEhh5S UOYa2yqX+bVtUzhTV4ZWUEbw/9QD+knUQBhs5nEuL0SgNkvc/VuCij+Fa YlTVj599GoWj9O0RDKQcM7V4Zt/Z55eo8quc5e62qf2FXXwx9OnBYiPD0 GT2HfuEerLhuFxHK8MeuuILea4camUgbNN75FsJ+YSmL967U/KllWaKuf A==; X-CSE-ConnectionGUID: jv5JI/A3QPCNVsdCd9Mb+g== X-CSE-MsgGUID: UDMgsYuwTqGWVx95aCyr1w== X-IronPort-AV: E=Sophos;i="6.08,147,1712646000"; d="asc'?scan'208";a="191613156" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 09 May 2024 01:26:14 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 9 May 2024 01:25:39 -0700 Received: from wendy (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 9 May 2024 01:25:35 -0700 Date: Thu, 9 May 2024 09:25:25 +0100 From: Conor Dooley To: Andy Chiu CC: Conor Dooley , Eric Biggers , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Stuebner , Guo Ren , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Evan Green , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Shuah Khan , , , Palmer Dabbelt , Vincent Chen , Greentime Hu , , , , Joel Granados , Jerry Shih Subject: Re: [PATCH v4 7/9] riscv: vector: adjust minimum Vector requirement to ZVE32X Message-ID: <20240509-habitable-unrefined-02322f228d5a@wendy> References: <20240412-zve-detection-v4-0-e0c45bb6b253@sifive.com> <20240412-zve-detection-v4-7-e0c45bb6b253@sifive.com> <20240418-brook-chili-4d3e61d1a55c@wendy> <20240418155256.GA2410@sol.localdomain> <20240418-ultimatum-yam-11de4b063b83@spud> <20240418173203.GA1081@sol.localdomain> <20240418173946.GB1081@sol.localdomain> <20240418-sterling-sanding-d59c3b0a2aaa@spud> <20240509-mandatory-monsieur-dfa4d7881fa9@wendy> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fd9CceYogHrFCPUX" Content-Disposition: inline In-Reply-To: <20240509-mandatory-monsieur-dfa4d7881fa9@wendy> --fd9CceYogHrFCPUX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 09, 2024 at 08:48:09AM +0100, Conor Dooley wrote: > On Thu, May 09, 2024 at 02:56:30PM +0800, Andy Chiu wrote: > > Hi Conor, > >=20 > > Should we check if "v" presents for vector crypto extensions in > > riscv_isa_extension_check()? We are not checking this for now. So a > > kernel compiled with RISCV_ISA_V still has a problem if its isa-string > > includes any of vector crypto ("zvbb, zvkg, etc") but not "v". >=20 >=20 > Yeah, one of the things I took away from this discussion is that we need > to improve the implementation of both the methods we have at the moment > for drivers etc to check if extensions are present and usable. > In general, I don't think checks like that are "safe" to do in > riscv_isa_extension_check(), because the dependencies may not all have > been resolved when we probe an extension (Clement's current Zca etc > series improves the situation though by only calling the checks after > we probe all extensions). >=20 > The simple V cases are all fine though - the DT binding and ACPI rules > for compatible strings all mandate that single-letter extensions must > come before multi-letter ones. For riscv,isa-extensions we control the > probe ordering and probe V before any multi-letter stuff. Additionally, > we should make it a requirement for V to be present if things that > depend on it are. >=20 > That said, is it permitted by the specs to have any of the extensions > you mention without the full V extension, but with one of the cut-down > variants you mention here? If not, I'd be more interested in figuring > out the non-extension dependencies: whether or not the kernel itself > supports vector and if the kernel has opted to disable vector due to > detecting that harts have mismatching vector lengths. >=20 > TL;DR: I think we should add some checks in riscv_isa_extension_check(). Also, unless this only becomes a problem with this series that adds the cut-down forms of vector, I think this is a separate problem to solve and I can send some patches for it (along with some other cleanup I'd like to do as a result of Eric's comments) and you can just submit the v2 you were planning to without it. I can't, off the top of my head, think of why this particular series would break the vector crypto stuff though, the problems with enabling extensions seem underlying. Thanks, Conor. --fd9CceYogHrFCPUX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZjyIdQAKCRB4tDGHoIJi 0hcBAQCRofWX8dSzuxqpA0rVYBNGm8WInygUT4+nUrHkr+BHaAEAhVPTVOy9BnkO 2PVLOWUyKNOC8CVZCq9rs7skTcEbaAI= =w/06 -----END PGP SIGNATURE----- --fd9CceYogHrFCPUX--