From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B33DC433FE for ; Tue, 1 Feb 2022 07:45:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235180AbiBAHpC (ORCPT ); Tue, 1 Feb 2022 02:45:02 -0500 Received: from verein.lst.de ([213.95.11.211]:57800 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229975AbiBAHpC (ORCPT ); Tue, 1 Feb 2022 02:45:02 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 6C0AE68AA6; Tue, 1 Feb 2022 08:44:57 +0100 (CET) Date: Tue, 1 Feb 2022 08:44:57 +0100 From: Christoph Hellwig To: Guo Ren Cc: Christoph Hellwig , Palmer Dabbelt , Arnd Bergmann , Anup Patel , Greg Kroah-Hartman , liush , Wei Fu , Drew Fustini , Wang Junqiang , Christoph Hellwig , linux-arch , Linux Kernel Mailing List , linux-riscv , linux-csky@vger.kernel.org, linux-s390 , sparclinux , linuxppc-dev , Parisc List , "open list:BROADCOM NVRAM DRIVER" , Linux ARM , the arch/x86 maintainers , Guo Ren Subject: Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support Message-ID: <20220201074457.GC29119@lst.de> References: <20220129121728.1079364-1-guoren@kernel.org> <20220129121728.1079364-17-guoren@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org On Mon, Jan 31, 2022 at 09:50:58PM +0800, Guo Ren wrote: > On Mon, Jan 31, 2022 at 8:26 PM Christoph Hellwig wrote: > > > > Given that most rv64 implementations can't run in rv32 mode, what is the > > failure mode if someone tries it with the compat mode enabled? > A static linked simple hello_world could still run on a non-compat > support hardware. But most rv32 apps would meet different userspace > segment faults. > > Current code would let the machine try the rv32 apps without detecting > whether hw support or not. Hmm, we probably want some kind of check for not even offer running rv32 binaries. I guess trying to write UXL some time during early boot and catching the resulting exception would be the way to go? > > > -- > Best Regards > Guo Ren > > ML: https://lore.kernel.org/linux-csky/ ---end quoted text--- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07978C433EF for ; Tue, 1 Feb 2022 07:45:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GYcG/4pxIg0JbiUp8X7+UXqeE1C+Eeqn4B43wqy32kg=; b=gXW11l9aGybnZd qo2AK63ncryeR2yjn9mFPxyE0satOpSR02moLVaaxJehV3+HT5tZ7//Uv1MmRe9ufcNKV8/RkJ/c8 IAGukW8548PidauBz+bW8cbAaqIm+vAfZ+ZbdrG+TdeBFdqgJHKfuRKRTiaI3d284bxQTzKAfPy60 RifCzgEHE5PuHBIuHBUaGjEmch3Roe9fiB8udW+1LBMpE94mQQANh/381mKDIqYNukG2PzizlU08C jtb8GhFBCdvuLltgiNkrfmznv0srM01MKUbde+UwdsuNXjN6hbw7ggdHJqUmfBeco6l92jHIL8a8m nD3f6sZruf/z27nNU4LA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEnr0-00BPC8-4e; Tue, 01 Feb 2022 07:45:30 +0000 Received: from verein.lst.de ([213.95.11.211]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEnqX-00BP2X-K4; Tue, 01 Feb 2022 07:45:03 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id 6C0AE68AA6; Tue, 1 Feb 2022 08:44:57 +0100 (CET) Date: Tue, 1 Feb 2022 08:44:57 +0100 From: Christoph Hellwig To: Guo Ren Cc: Christoph Hellwig , Palmer Dabbelt , Arnd Bergmann , Anup Patel , Greg Kroah-Hartman , liush , Wei Fu , Drew Fustini , Wang Junqiang , Christoph Hellwig , linux-arch , Linux Kernel Mailing List , linux-riscv , linux-csky@vger.kernel.org, linux-s390 , sparclinux , linuxppc-dev , Parisc List , "open list:BROADCOM NVRAM DRIVER" , Linux ARM , the arch/x86 maintainers , Guo Ren Subject: Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support Message-ID: <20220201074457.GC29119@lst.de> References: <20220129121728.1079364-1-guoren@kernel.org> <20220129121728.1079364-17-guoren@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220131_234501_868538_FF803C59 X-CRM114-Status: GOOD ( 17.53 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Mon, Jan 31, 2022 at 09:50:58PM +0800, Guo Ren wrote: > On Mon, Jan 31, 2022 at 8:26 PM Christoph Hellwig wrote: > > > > Given that most rv64 implementations can't run in rv32 mode, what is the > > failure mode if someone tries it with the compat mode enabled? > A static linked simple hello_world could still run on a non-compat > support hardware. But most rv32 apps would meet different userspace > segment faults. > > Current code would let the machine try the rv32 apps without detecting > whether hw support or not. Hmm, we probably want some kind of check for not even offer running rv32 binaries. I guess trying to write UXL some time during early boot and catching the resulting exception would be the way to go? > > > -- > Best Regards > Guo Ren > > ML: https://lore.kernel.org/linux-csky/ ---end quoted text--- _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D106BC433F5 for ; Tue, 1 Feb 2022 07:45:28 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Jnxml1TV8z3bZT for ; Tue, 1 Feb 2022 18:45:27 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lst.de (client-ip=213.95.11.211; helo=verein.lst.de; envelope-from=hch@lst.de; receiver=) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JnxmH1RYZz2x9G for ; Tue, 1 Feb 2022 18:45:03 +1100 (AEDT) Received: by verein.lst.de (Postfix, from userid 2407) id 6C0AE68AA6; Tue, 1 Feb 2022 08:44:57 +0100 (CET) Date: Tue, 1 Feb 2022 08:44:57 +0100 From: Christoph Hellwig To: Guo Ren Subject: Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support Message-ID: <20220201074457.GC29119@lst.de> References: <20220129121728.1079364-1-guoren@kernel.org> <20220129121728.1079364-17-guoren@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guo Ren , "open list:BROADCOM NVRAM DRIVER" , sparclinux , linux-riscv , Christoph Hellwig , linux-arch , linux-s390 , Anup Patel , the arch/x86 maintainers , linux-csky@vger.kernel.org, Christoph Hellwig , Arnd Bergmann , Linux ARM , Parisc List , Drew Fustini , Greg Kroah-Hartman , Wang Junqiang , Linux Kernel Mailing List , Palmer Dabbelt , liush , linuxppc-dev , Wei Fu Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Jan 31, 2022 at 09:50:58PM +0800, Guo Ren wrote: > On Mon, Jan 31, 2022 at 8:26 PM Christoph Hellwig wrote: > > > > Given that most rv64 implementations can't run in rv32 mode, what is the > > failure mode if someone tries it with the compat mode enabled? > A static linked simple hello_world could still run on a non-compat > support hardware. But most rv32 apps would meet different userspace > segment faults. > > Current code would let the machine try the rv32 apps without detecting > whether hw support or not. Hmm, we probably want some kind of check for not even offer running rv32 binaries. I guess trying to write UXL some time during early boot and catching the resulting exception would be the way to go? > > > -- > Best Regards > Guo Ren > > ML: https://lore.kernel.org/linux-csky/ ---end quoted text--- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4ADEEC433EF for ; Tue, 1 Feb 2022 07:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=O5nLkCBHuBqdDLKEf1noH1f0sbEOctziJbIXtcCUfbI=; b=MF78ciZuUcS2N4 2fytP/NCrH+HLCuyZqA+f00Y3qs8I9/vx/kz16Cox11u2xDbHyH7q6vmvVf8JjIiHjkrLc+OUpzIj MrxB5amWbYFCf6VChqm4inMmuzhsfUTOlxYsg/66j5PBrix3uG4kjv1MSWKcrVX/PnrGLBXWZ6QbH YeF2q2VSNfzAZKEdWIoiG/EzdpdrcoqgP1U/lFMgAfrKu69iMq1vZKO9OzSLGS7j6OpbfPXswg19e IpU+M9tZObIJr83wwjQGunlM1vp6qypoDme6nDFoeCk+2eN049NZMcnK4TvVenspPfDz7zJsuFL4j 8wKhsM4UWJ30OKzQYboQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEnqf-00BP4d-K6; Tue, 01 Feb 2022 07:45:09 +0000 Received: from verein.lst.de ([213.95.11.211]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEnqX-00BP2X-K4; Tue, 01 Feb 2022 07:45:03 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id 6C0AE68AA6; Tue, 1 Feb 2022 08:44:57 +0100 (CET) Date: Tue, 1 Feb 2022 08:44:57 +0100 From: Christoph Hellwig To: Guo Ren Cc: Christoph Hellwig , Palmer Dabbelt , Arnd Bergmann , Anup Patel , Greg Kroah-Hartman , liush , Wei Fu , Drew Fustini , Wang Junqiang , Christoph Hellwig , linux-arch , Linux Kernel Mailing List , linux-riscv , linux-csky@vger.kernel.org, linux-s390 , sparclinux , linuxppc-dev , Parisc List , "open list:BROADCOM NVRAM DRIVER" , Linux ARM , the arch/x86 maintainers , Guo Ren Subject: Re: [PATCH V4 16/17] riscv: compat: Add COMPAT Kbuild skeletal support Message-ID: <20220201074457.GC29119@lst.de> References: <20220129121728.1079364-1-guoren@kernel.org> <20220129121728.1079364-17-guoren@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220131_234501_868538_FF803C59 X-CRM114-Status: GOOD ( 17.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jan 31, 2022 at 09:50:58PM +0800, Guo Ren wrote: > On Mon, Jan 31, 2022 at 8:26 PM Christoph Hellwig wrote: > > > > Given that most rv64 implementations can't run in rv32 mode, what is the > > failure mode if someone tries it with the compat mode enabled? > A static linked simple hello_world could still run on a non-compat > support hardware. But most rv32 apps would meet different userspace > segment faults. > > Current code would let the machine try the rv32 apps without detecting > whether hw support or not. Hmm, we probably want some kind of check for not even offer running rv32 binaries. I guess trying to write UXL some time during early boot and catching the resulting exception would be the way to go? > > > -- > Best Regards > Guo Ren > > ML: https://lore.kernel.org/linux-csky/ ---end quoted text--- _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel