Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16644777rwd; Mon, 26 Jun 2023 13:01:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4cE/1ihYrTVaiFQZ7RGWIAONWxyxIzjT4aLXi3UZjC90/HZOzshJpWG+2o9OQq6m926Xhp X-Received: by 2002:a17:902:bb89:b0:1ac:7345:f254 with SMTP id m9-20020a170902bb8900b001ac7345f254mr8118560pls.33.1687809666589; Mon, 26 Jun 2023 13:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687809666; cv=none; d=google.com; s=arc-20160816; b=smCYR+N20Jt4oyx2RizFb2b3nvnCNpec+WkIcZOYS58e1IkcHg6PuRJKkXTBhCZtcG 9/y8qB9Wozh1Oh1VDl4zy6mHjXt6P17LJ3IoA647vrdcy2BO2n43D+Gx2kpPPntV+4tU c7Q5tgrzWfDSij//8KveHNqmhnaFcNOyHV8yLMYwsnAUNgassp5HNml0kwu+Dw4Jq558 z+klNCm0LevQE6+zIZmjzPHjYGIg1x4DHyA9lyeYrve/yR+ZgSaXxMK5bbaE1DYvUOTZ MkV1ozQEzJjj9WCZLds0b4y4GR7z4H3eazLmKpVuPTG96yRirScVN/WBPWtD84BjnFqz rSGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=fdhf6AU7xFfNbH+mJiJHsGXbFeFQT625rjZDqqOdH3o=; fh=955Pj/Qp/ehEnloXzZdpKaTC2BNSPpGFi4dqLFeyBQM=; b=JyRH8J5T4gCUAZPtB/KXvj6jmb/qhQfHwsWPKaK8jIbZynNpl32WgWZ/br/gdDAc2R App4l4mJDTaXkey9x/em4jebjjJszbfIiietAdJjZ0Yg2LTkxOBvaAQQK8vtBO8Kpqa+ y9j5pfGoGI14FP8nvR0c370un/MO9pd4wRZ5RY1/mikhPKA2jtE+qVKnPoqAxMSFnHLe bjjBhAmcb6ri8MRitgD81AOTb0DfEsWuS90XxlcMLgaQwaVtg0V0n2S6au6mdKadsX/l qI86rpg8FlGg0w3O91rF2OuR3xKXnJ/LbSiMru0TmjpMzJDo6fLiwUA0rJMU0VwvYg4D bwxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b="bgQhc/tr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d7-20020a170902cec700b001b392bf919bsi5825381plg.407.2023.06.26.13.00.54; Mon, 26 Jun 2023 13:01:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b="bgQhc/tr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230013AbjFZT0W (ORCPT + 99 others); Mon, 26 Jun 2023 15:26:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229779AbjFZT0V (ORCPT ); Mon, 26 Jun 2023 15:26:21 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E606E74 for ; Mon, 26 Jun 2023 12:26:20 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b698937f85so33838891fa.2 for ; Mon, 26 Jun 2023 12:26:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1687807578; x=1690399578; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fdhf6AU7xFfNbH+mJiJHsGXbFeFQT625rjZDqqOdH3o=; b=bgQhc/tr2dOe24OxURwIssbTAW8cinuImIIs4wxHR6Rc7m0aBRrPdrUU7Jb0PV14Of H5LAfIJNZdoqSOzMGajcsDrKQNrrYBZEH8wGxi1sH3WiSkjNlD0/vZHRKhZOB6MLINN3 HiKYxu/V+NkQQNGeIellk1sTw1t4NZp/8z2MRdlaOlzQZDAhYuxh9EnitqS0eQ0dTRuG pbhNH+1jx3H+tdIX8yhkaYetXbqO+GiOAHbpYGmdXkTIacwcyRW3D8hzwpxAf8bPsi+Z OOk9/xOz7ut8bYdvDV8GohEmgVSYbepXzPgadEf37nFtZ+5LrxZavKr+e1X30LyhQlAl hY4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687807578; x=1690399578; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fdhf6AU7xFfNbH+mJiJHsGXbFeFQT625rjZDqqOdH3o=; b=BD5j/PQl/74tmFTtwOFm1SnywNwUnCPRHwcWr7ZYd+ZSb8W4B1vrjTRARN9OIIJsrv tkxxFnjNxrp1tEi/HXRObhsov+WXO+WxUa6QAT39v/Ud/T7Wf+LZ39t8V/juW74snTMP tXgxRwaSr2IMOdff7rC24QIDgjImw+YnQvjZ8ThIbOwoC93OJszUQmc5WICO7lnNlQNZ ZH7JOUiq0/1iN+bE+6FjvlMITfnCsZpSN9+lJ63Wf14etOB6LZy5No9ZxRiGwvsCKopX AjcByaLUQL+EGvxmTpPyKsUYgIKUPOgGR5t1IDBlBuhEuGFX6ACL1ZnB8tXsdoghiuyG Y7mA== X-Gm-Message-State: AC+VfDxbiM6ZoYKpVksEEjRcxDKescuZ8GeyrSzRV61cMGAMIeOgp+aY 5hogDgGPe2qumT0iJXZVLhpLYGxSIMcdVTf7m9aksg== X-Received: by 2002:a05:6512:280b:b0:4fb:2c1e:4e03 with SMTP id cf11-20020a056512280b00b004fb2c1e4e03mr3277813lfb.32.1687807578527; Mon, 26 Jun 2023 12:26:18 -0700 (PDT) MIME-Version: 1.0 References: <20230623222353.3742384-1-evan@rivosinc.com> <20230624-mortally-parking-68f6bc1dd5ee@spud> In-Reply-To: <20230624-mortally-parking-68f6bc1dd5ee@spud> From: Evan Green Date: Mon, 26 Jun 2023 12:25:42 -0700 Message-ID: Subject: Re: [PATCH] RISC-V: Show accurate per-hart isa in /proc/cpuinfo To: Conor Dooley Cc: Palmer Dabbelt , Albert Ou , Andrew Jones , Anup Patel , Conor Dooley , Heiko Stuebner , Palmer Dabbelt , Paul Walmsley , Sunil V L , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 23, 2023 at 5:12=E2=80=AFPM Conor Dooley wro= te: > > Hey Evan, > > On Fri, Jun 23, 2023 at 03:23:53PM -0700, Evan Green wrote: > > In /proc/cpuinfo, most of the information we show for each processor is > > specific to that hart: marchid, mvendorid, mimpid, processor, hart, > > compatible, and the mmu size. But the ISA string gets filtered through = a > > lowest common denominator mask, so that if one CPU is missing an ISA > > extension, no CPUs will show it. > > > > Now that we track the ISA extensions for each hart, let's report ISA > > extension info accurately per-hart in /proc/cpuinfo. > > No, you can't do this as it breaks the assumptions of userspace that > this shows the set supported across all harts. > Sorry, but NAK. My hope was that we were still early enough that no production systems existed (yet) that actually had different ISA extensions in the set we track, and therefore usermode would have been unable to make those assumptions at this point. If such a system exists, and I don't know if it does or not, then I agree it's too late to make a change like this. I thought I'd put this out here and see if someone could point at such a system; but if not it'd be great to keep /proc/cpuinfo accurate and consistent with hwprobe (which does return accurate per-hart ISA extension info). -Evan > > Cheers, > Conor.