Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4614328ybh; Tue, 6 Aug 2019 14:55:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzS7No03mzPW/najF+Obg5/CRnoWb8XDZblsU8kcBSbvDJgGYsj7ER2rbzxjCMeTraE7LdI X-Received: by 2002:a17:902:f204:: with SMTP id gn4mr5203660plb.3.1565128551074; Tue, 06 Aug 2019 14:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565128551; cv=none; d=google.com; s=arc-20160816; b=zV7v28cblVPeNQrFkRczwt+aCAixQbveStCcIJ9+12+mPWudqazXhBrsniE6rDv7Q/ /vpnM1/WtArB3QGA7tJjPR77SrzpeEk2s6IgncGozdArEn8B5IC4UEKHw/+KLVdThE9t qgXaFeB/JutFyUGRMAlamn8z3CGrdS7IYHs8Bkw9uJO1xGyG+A0T4/U9amavfoFo2Ktj s73lRY4CvF7jr3AR23FBhcuwlsZnkkaMrZTOxmOudpe2dzwM+NhOQaBALn7mg96f0mrF Q9+oGkcI5vEMmWxB2PjfLtAHQR7bABWGLjHtQ9yiMzDoy5sPT9RIB0vRhWUDmLXTFzt0 eNHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=e0N0ZZ7gbRhdL+UK8EX1dMgG/3bO/cb7jXRFzExUL4k=; b=Dm1tQEWG9BnYifp5KZV/uYwd4ckgMjBVgUPCLtROqltc2/er+p2W9ZPZWglZf7mzz+ 2H0rL4EX1ruLvNKIPEo9iac8vXtqR/3o9B8BkFU2kgOpV0KOq/EX5ZORYFnGW1iwqUYd bB6yTqIWrlYWI5+2gAIsRdDBQ0PogJO2bNG/yeS8qaUm+8aA6g90gYPU2+PiNW1DNYke GbKitqouZMbNeDxoK+tpyghW7CNnmKYsmLorSvOd3xeVKJgrslhttW8FPw/P2SFSNC1d Udof5ZkF/MgFNz/XGp48KDLVUzNzG2FdRPSyYKMBLKc027kDkBbLiI4uRe08tUbJiZKR gnjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=nC2RK+wj; 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 z186si47141612pgd.162.2019.08.06.14.55.35; Tue, 06 Aug 2019 14:55:51 -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=pass header.i=@sifive.com header.s=google header.b=nC2RK+wj; 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 S1726968AbfHFVyv (ORCPT + 99 others); Tue, 6 Aug 2019 17:54:51 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:46265 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726381AbfHFVyv (ORCPT ); Tue, 6 Aug 2019 17:54:51 -0400 Received: by mail-ot1-f66.google.com with SMTP id z23so68048247ote.13 for ; Tue, 06 Aug 2019 14:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=e0N0ZZ7gbRhdL+UK8EX1dMgG/3bO/cb7jXRFzExUL4k=; b=nC2RK+wjbSKbABdylLiYJMYOsFyEaY+iXsRPvSPywyopW3IGcH2lgAojRCNmpiStVL zZYaAtNAnpiMxnK1MpKnaUChgb3VqZ5jtmBfmbv6GIQXd4RHouKZ1RwGKGSFTwENK2Gu CdYxLb5F44BiYphtIhsfrdBL/XR3rPypAqjPWi4GEwj8Ql8mYTJvQFS/5l82Xbp2sQNU IJfybu+HiA8Rzx1717EYb+nbJVTaOUTfNhq4nq4vsiwoLg/bcTL6duKfQwWMfvzOxFzJ gC6aZfHv2hwKrTzOH0+vWrpHBmFbcJylo+X4DmM0Gl7/X40VjmJfhWM9fhWbHYSpk2XK crzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=e0N0ZZ7gbRhdL+UK8EX1dMgG/3bO/cb7jXRFzExUL4k=; b=lKVvP9Yc9zNopq4huZi0JNskQY/8gbHtsswtCWzwVfHxb5kPQuP2N/SDE8OKGSwaOG PMbeiMcMke46+1BMPrgP3qoK1wmSUzkrDjFjWmfLiLu5Hzh3ug6TcDbPfAmC8/HExD/3 TUGNltqqrOT32lKcIYaERZ+rOVFx3RfIB7IYrSczYQofwUPEuz/pF1YbcAD5p7B16cCG OfaM5ZDUEVrQpSb62YhKuOhOjAmfv9fl88ziQ6aa9qaN/yFtr9WET3in0+J3eFq+ZqeY IEqFBeAOxcLjXOxBHLmTS+NHKnwyIGFdpTSMlbmGsENmiOwLJiSENlEkzwE5IpHcKgvo pzKw== X-Gm-Message-State: APjAAAW1TQsUkx1VPZonwxXNwfMv7UPMEfR1YM08rpDSghYSUUyxoVcg IZlocfXSGa96iIXZitR+dwap6Q== X-Received: by 2002:a6b:1ca:: with SMTP id 193mr6162600iob.264.1565128490422; Tue, 06 Aug 2019 14:54:50 -0700 (PDT) Received: from localhost (c-73-95-159-87.hsd1.co.comcast.net. [73.95.159.87]) by smtp.gmail.com with ESMTPSA id e26sm71330428iod.10.2019.08.06.14.54.49 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 06 Aug 2019 14:54:50 -0700 (PDT) Date: Tue, 6 Aug 2019 14:54:49 -0700 (PDT) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Atish Patra , Anup Patel cc: linux-kernel@vger.kernel.org, Alan Kao , Albert Ou , Daniel Lezcano , devicetree@vger.kernel.org, Enrico Weigelt , Greg Kroah-Hartman , Johan Hovold , linux-riscv@lists.infradead.org, Mark Rutland , Palmer Dabbelt , Rob Herring , Thomas Gleixner Subject: Re: [PATCH v4 2/4] RISC-V: Add riscv_isa reprensenting ISA features common across CPUs In-Reply-To: <20190803042723.7163-3-atish.patra@wdc.com> Message-ID: References: <20190803042723.7163-1-atish.patra@wdc.com> <20190803042723.7163-3-atish.patra@wdc.com> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anup, Atish, On Fri, 2 Aug 2019, Atish Patra wrote: > From: Anup Patel > > This patch adds riscv_isa integer to represent ISA features common > across all CPUs. The riscv_isa is not same as elf_hwcap because > elf_hwcap will only have ISA features relevant for user-space apps > whereas riscv_isa will have ISA features relevant to both kernel > and user-space apps. > > One of the use case is KVM hypervisor where riscv_isa will be used > to do following operations: > > 1. Check whether hypervisor extension is available > 2. Find ISA features that need to be virtualized (e.g. floating > point support, vector extension, etc.) > > Signed-off-by: Anup Patel > Signed-off-by: Atish Patra Do you have any opinions on how this patch might change for the Z-prefix extensions? This bitfield approach probably won't scale, and with the EXPORT_SYMBOL(), it might be worth trying to put together a approach that would work over the long term? - Paul