Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1987205lqa; Tue, 30 Apr 2024 05:34:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXatnb8JfvVek6AaSkxajGYXENCbkttZF512h46Fl6vtc95O9/tURjaaNyrNq5k0ekHgTw1Z60cePC5qQgzXRKF362aMD2V2cze2mlOUw== X-Google-Smtp-Source: AGHT+IF/uUriXPsePLtvXFGVN8HgqWPK8paUXWXe30/GPeEq88jwwcYVvqQHl9pv+CGJW3KPglnK X-Received: by 2002:a17:906:1388:b0:a55:61cc:7337 with SMTP id f8-20020a170906138800b00a5561cc7337mr7224028ejc.43.1714480450919; Tue, 30 Apr 2024 05:34:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714480450; cv=pass; d=google.com; s=arc-20160816; b=QrsHbj/KPnGS5tIEfgx5R8EmJQe5Q++fxngETuxz76xlFe14Gw9BFZ4JpI4kJSZlYt mXODxbLcyZWQ5LGu6OvHuhHcS4icrKBE1Pcy9Fx6BovncksiNBtK5acnywBWtsXlrHJO 11F2fzcl3Vedkb5FMiJYETmxILQ3jbjgIseuGxYsN0WCqiN7HOgGpDSsDJdeRY9oXB0m GzLJ9I4lXJMzi9zlPVr0cGHrrvdGHkAMB2WPoG9vG65tlNs0cMdLmE5uztTibIjXlC4m e1bM1Pm0OyJl3ZSGCIPBxikNARcHeeJVz7lcno+F/Bh9I2G/h+Ut7mdf5kjxB5KhxkiK jMxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=8JYnpful/x3DE6HE/Q8pSIRWAs5wjh2Z17X6El2O6XQ=; fh=96X0eFz7EMXKb+cKWldPg18m/TJKR37lLWZwdnAH42Q=; b=gCsy1JGz5Cs2zkMnKwNRKXFtXxPEkGvFz/oUviwwn2IkWzB3BiWRXuXKfyIA2D6jGT yASGP9sxoGtal02+hzHeM1fbPddPt/F/j/OB3PsAt4uleegr11Vb1wpG4vVaBT8IAFAS 8nZRtQe1VCFbl+Bm+g10ZpBYOWJi/2QzSVH+MV/IhtH8XoBuamyjy+q2RNoK0i5mGPLw 2G1PntqqFdE6kablGjg6RnLe5lrmnxhvQoRZCkrNbwtbG7Zgey6iZameK904EQVcqTmy bo8y7TMgB9pRTjWq3SNFY2rx9LVWEN1ZYSY7y5/RBMqAc9+oUhkMYncrMZ2hPQdTeJ9Q V25Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="Bg/I1oz7"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-163916-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163916-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g22-20020a170906349600b00a58b15f0d7bsi6458824ejb.178.2024.04.30.05.34.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:34:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163916-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="Bg/I1oz7"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-163916-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163916-linux.lists.archive=gmail.com@vger.kernel.org" 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 A52FB1F22E48 for ; Tue, 30 Apr 2024 12:34:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5850217164B; Tue, 30 Apr 2024 12:33:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="Bg/I1oz7" Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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 F16D617107C for ; Tue, 30 Apr 2024 12:33:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714480431; cv=none; b=Ul3akM2CTumHzQfRSktPrJmyDumpPJ776eTnnbGJSgIW1GL+ChoPUrlhURtr3Za01tH2CffCWVpX/Ylxqu4ES6M+FryASRic3qBIQmXnA+Nr3Cbj/dnQeKJpPUSsq7N8nMr78/5qgazVfRShbqW2ooImIYOnkfuNKqZDHGIJZPA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714480431; c=relaxed/simple; bh=8qRGv9BUyqVd6XtlXFdWfT5zPzODEmCn5lc+lyDQMQk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jDvfOXB4FduKq0/iwT3ASqTn/fOO1cAmzESOPenOkWr3jR0Mvywlh4NpgIJjKQ1MiABc5/oribYHRH4wRME09gl0V6iRmeU4cnaLOCG45IX4SSwbkVGvkRR7HY/JVZUXYuB+YDBw9vnK5DNE8qC0kF+ot/SedrJZ56yq+VnnkbM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=Bg/I1oz7; arc=none smtp.client-ip=209.85.167.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-51d9d8c2c3dso415625e87.0 for ; Tue, 30 Apr 2024 05:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714480428; x=1715085228; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=8JYnpful/x3DE6HE/Q8pSIRWAs5wjh2Z17X6El2O6XQ=; b=Bg/I1oz7Fb9DgA6vYFCZ/Y5HynGpEMOEpF5OzKXbUCynjMGP7QoDW3mpSl+/W3fH0V +al2uHC0RAAeo4MDgAjuPeEdsiBxvYu494vHrrL/nGpYJB5y28YRPWxvov6tCwYbOwAM /p4pwYuV2diJZ7QTBRVvfuzuyI/yjymKAELkrrKbDbh2l/O3vmxz2q0v1RnI3I5puG3G PQtwA2oznCVbXeUO4vxD7MDN1pLnp/O/2rF6rSk5mT+bmNgZTy3RrgjUVQYwkKnLsGN/ 8Q65S69a6A+lu5ZOP80/p9axP13UgzOR/8a3MJjERrXVWYLaASsDZdHx5SqZYrOnf150 7L6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714480428; x=1715085228; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8JYnpful/x3DE6HE/Q8pSIRWAs5wjh2Z17X6El2O6XQ=; b=ntRKBU2FUyqPi4E10nw7ApA1arqCr/dtHIWYMmnnThJM4/ydUTBuMfZXwYvhvzqekJ U4EwSekzPynY9BCD+A+S1R4Yx3E3Ipky2LfIADCYkTh56qbUUeh6iFvkqw67muOHVyNv BLqtONHaUTPwxDwqKThZC+nmVSk/xjXVynhJ+7S8CMn3hZddOYSuVl77EHwchokvBKZm dXU3tCZeiu5B6qv1mz2fjH91LfAWnTPbMVhVftVK7BVAjUfg9UAnMJ2113o/2P5DEXcd jZQCskSnzUs0v8Ei97CFteHbTBxvDeEHli5pFUAUsXClXES306xZPSKqvt/2rnIf/iV8 bSnw== X-Forwarded-Encrypted: i=1; AJvYcCUD2lViTy6MwuR0JE9kBFBQMWkww2hW4Xxq63kWbPFTwbn8y9U5SLh//hiDM6QAUqy7pmjFGqsg9CBasigLcnpxxddBryRw0WlCvRG/ X-Gm-Message-State: AOJu0YzpWtsoiW2gU4MxpsjQ0azpwstLvti+j6WesCro+rFS8UUoldJw Ks9BtDGxb7ENXJlyMOhqceQSHW3L8uBMfyCw8xdOrCGWxK4nw+zLAY+1/Lf+9oI= X-Received: by 2002:a2e:910a:0:b0:2dd:60d3:7664 with SMTP id m10-20020a2e910a000000b002dd60d37664mr8644774ljg.5.1714480428077; Tue, 30 Apr 2024 05:33:48 -0700 (PDT) Received: from ?IPV6:2a01:e0a:999:a3a0:c21b:67fd:90ab:9053? ([2a01:e0a:999:a3a0:c21b:67fd:90ab:9053]) by smtp.gmail.com with ESMTPSA id c1-20020a5d4141000000b003436cb45f7esm550771wrq.90.2024.04.30.05.33.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Apr 2024 05:33:47 -0700 (PDT) Message-ID: <770710b3-2495-41a6-9822-d9af9b13cef5@rivosinc.com> Date: Tue, 30 Apr 2024 14:33:46 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 02/11] riscv: add ISA extensions validation To: Conor Dooley Cc: Conor Dooley , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Rob Herring , Krzysztof Kozlowski , Anup Patel , Shuah Khan , Atish Patra , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org References: <20240429150553.625165-1-cleger@rivosinc.com> <20240429150553.625165-3-cleger@rivosinc.com> <20240429-subtext-tabby-3a1532f058a5@spud> <5d5febd5-d113-4e8c-9535-9e75acf23398@rivosinc.com> <20240430-payable-famished-6711765d5ca4@wendy> <20240430-gratuity-refinish-29abb136c958@wendy> Content-Language: en-US From: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= In-Reply-To: <20240430-gratuity-refinish-29abb136c958@wendy> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 30/04/2024 14:12, Conor Dooley wrote: > On Tue, Apr 30, 2024 at 01:58:11PM +0200, Clément Léger wrote: >> Yeah, see what you mean. I think we also need to define if we want to >> expose all the ISA extensions in /proc/cpuinfo (ie no matter the config >> of the kernel) or not. If so, additional validate() callback would make >> sense. If we want to keep the full ISA string in /proc/info, then we >> will need another way of doing so. > > If extensions aren't usable, they shouldn't be in /proc/cpuinfo either > as there's programs that parse that to figure out what they can use, > possibly even only checking a single cpu and using that as gospel. > That's why there's that per-hart-isa thing that was added by one of your > colleagues last year. Acked. So indeed, validate() callback for F/V dependent extensions makes sense. Clément