Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1824979ybl; Sun, 18 Aug 2019 11:17:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwt9DjNh7vAKt5pqDHbpnpFH7A1WpP4047bOvCA+TM8q+FMAjaUL0P/OF+/thirFd5fUv1S X-Received: by 2002:aa7:9735:: with SMTP id k21mr20380555pfg.116.1566152268387; Sun, 18 Aug 2019 11:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566152268; cv=none; d=google.com; s=arc-20160816; b=Gmt19CD6rG8dK7TRCaB0iFubSk+hk34ZpgkQrpEyor51NuLsGXX2wF5TWeUYY0NKcO J+zs9l946wJqGGEuJm6PMkGyXmPKFoHce4hyFVrql76V1A4PO2s1r1bfLnXAhEVYpuUi zbfosJOVwD1QCrFXHY3fkFE4mnqgW/piBlFIPKAXdeyj6BaO30rCY15//EREuCjD5b+v uBRbeJpBVUsSphTOcO/AqKlVx1zZlxesKltoVkLVyHY5Orfs3A2FZRgIeFtZo0EADPT3 taea+ucaQmBiCA/GoAqtvI8e1Gec76RJvDmo1O6uQd0BOlrxTL24an1IdbmFc79NRGeO QQSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wAtvIQm+9fZorihibCedTR8npfvGof1HohdZn5ZFmRA=; b=xWcgI2kPCL20+o56jyYboktBDITREJm7iJA2MhvbT7y2XeipFCWyR+9Fhoz7uvOeyk gozgCfv4dzgAS8rQZwa1QwK9S5N+gsRPY5MRrN0fBv1hfIICAlIJNVW3ga8POfcOoE2P utIoiyzdP6xVFdGnHUIbYQjV+LiOzM4ZpJJS9jy6Enw0LM5L86r65PFS2XBlGEe/VJeB zYMQmB4sOfscLjKxtnjfgSi14W9fK3Clum5bRRZ098sljQ5rs2NvTy0nR48R+6WjzcP9 4X+r8zNnRniDNlwMemKgm7HE9MdAUH2+3wJZZ11wC1jBEF6IbKLOBXqsKuhh7CV91ecT 67RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ElJUEGwh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x22si2930869pgi.227.2019.08.18.11.17.31; Sun, 18 Aug 2019 11:17:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ElJUEGwh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726952AbfHRSQe (ORCPT + 99 others); Sun, 18 Aug 2019 14:16:34 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:52124 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726089AbfHRSQe (ORCPT ); Sun, 18 Aug 2019 14:16:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wAtvIQm+9fZorihibCedTR8npfvGof1HohdZn5ZFmRA=; b=ElJUEGwhVp3PVLmYwUkCYcqpF WPblB8Qo7jtF5ARfK27csiFKD3wil62EUoaYzpbF8l52OD3MM40CMzBso5NiiHjksdp5wGNAGmgvv z1oBMqyunuPu4Wxhq1p7xzJfS4euqEfHtLleCqA+VUICayy+O1eG1hoAbFnXzUgyDsyQ29VHrFwhq 4JIgiBBzitjMV4l2xoVI4KD0N9sgz6B4RQpcEQ4j+HiVjEYSJhzQJn1dhY8BPLlRaQKucAvFXkla1 fsiCDObT30RbWQedhV2IlRYdEMINpocLlW05CM7NbOg1UGk/f6H389Y/gsUtjw24nWfEo9/TUz5xf LZI65Idow==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hzPjC-0006UO-Bi; Sun, 18 Aug 2019 18:16:30 +0000 Date: Sun, 18 Aug 2019 11:16:30 -0700 From: "hch@infradead.org" To: Atish Patra Cc: "hch@infradead.org" , "aou@eecs.berkeley.edu" , "anup@brainfault.org" , "palmer@sifive.com" , "linux-kernel@vger.kernel.org" , "johan@kernel.org" , "paul.walmsley@sifive.com" , "linux-riscv@lists.infradead.org" Subject: Re: [v5 PATCH] RISC-V: Fix unsupported isa string info. Message-ID: <20190818181630.GA20217@infradead.org> References: <20190807182316.28013-1-atish.patra@wdc.com> <20190812150215.GF26897@infradead.org> <3fb8d4f0383b005ecd932a69c4dd295a79b6fb1a.camel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3fb8d4f0383b005ecd932a69c4dd295a79b6fb1a.camel@wdc.com> User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 16, 2019 at 07:21:52PM +0000, Atish Patra wrote: > > > + if (isa[0] != '\0') { > > > + /* Add remainging isa strings */ > > > + for (e = isa; *e != '\0'; ++e) { > > > +#if !defined(CONFIG_VIRTUALIZATION) > > > + if (e[0] != 'h') > > > +#endif > > > + seq_write(f, e, 1); > > > + } > > > + } > > > > This one I don't get. Why do we want to check CONFIG_VIRTUALIZATION? > > > > If CONFIG_VIRTUALIZATION is not enabled, it shouldn't print that > hypervisor extension "h" in isa extensions. CONFIG_VIRTUALIZATION doesn't change anything in the kernels capabilities, it just enables other config options. But more importantly the 'h' extension is only relevant for S-mode software anyway. > This is just an information to the userspace that some of the mandatory > ISA extensions ("mafdcsu") are not supported in kernel which may lead > to undesirable results. I think we need to sit down decide what the purpose of /proc/cpuinfo is. IIRC on other architectures is just prints what the hardware supports, not what you can actually make use of. How else would you find out that you'd need to enable more kernel options to fully utilize the hardware? Also printing this warning to the kernel log when someone reads the procfs file is very strange.