Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2937078pxb; Fri, 12 Feb 2021 05:30:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJzORWywrupPVryK12UAw5JpCfeiasR5JEsSKbUNgLTyRMW6pFJFYtJJAm1bl2xmKmDMkVNX X-Received: by 2002:aa7:ce15:: with SMTP id d21mr3465568edv.246.1613136616902; Fri, 12 Feb 2021 05:30:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613136616; cv=none; d=google.com; s=arc-20160816; b=GMdjT9bNp4O3dsB+/CeHVJ/J5JoWOxHhCizI39Q/BAUSjmTlacAxepyiu+D9eEpkZt 7EI5ekJQoEVcq5uz59erl12adeOpyH2NrmmK9WXvoFcIpRczv5kkDEfHwVujq3wlsW0p HyHVE/I262oBMLN5phMpX6c8+xGCnhtp4XYXrln2Sn/0tGLk/z+T0lJcpc7oRummj/v/ HRpIPwTOBzAvVxsuUMeJhuOQXqxsmggFkLHAJitqvKL9nlU+m80m81pyEQzmCDVTjFU6 rmeb37G/ilGeEgJPMYw1lpLuDV8ZcQc71fBUDq7heBLcm5DzgyCuOg9H4+/TTgdvBuSO X3qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=zjpAFHw+DWzfkPEAx5i89vmlnJP+s5QseZzTANJVdZE=; b=bZN4wGoq/yGrj4q2wXQXG+302HIyv/7d/mfVuBf0QbF6Iqh6yPlPfjbeDU9DluNfyp rPIuAE2VL0eBcd/hVqKuF3lFQ1yFlR6Nj3EJ+3zsEf6p1NHIuY/DJ99KvQ+xCt6McF+N RIT8ZWW8lyWPNRxImLmRmNhJ1ds2BGviFT0Z8dDdfFvFUkEdmqFqfJVXWN5a2/P+vq9a 4o87lSxLw0ZWjYqzDZq9jZa6OPwV557Joro7kg31JvccRClJytSaNUthi+0uNEmHmvqc SuXnNgXTrY/PZLdZvufVUV7FmjpiLyDaRpyvr82OtU8brZfNs1XbOwIx0CqG/XakyrIm PuCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si6076223edt.282.2021.02.12.05.29.54; Fri, 12 Feb 2021 05:30:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231311AbhBLN3L (ORCPT + 99 others); Fri, 12 Feb 2021 08:29:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:35970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230249AbhBLN24 (ORCPT ); Fri, 12 Feb 2021 08:28:56 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DEB7D64E35; Fri, 12 Feb 2021 13:28:10 +0000 (UTC) Date: Fri, 12 Feb 2021 13:28:08 +0000 From: Catalin Marinas To: Mark Brown Cc: Steven Price , sonicadvance1@gmail.com, amanieu@gmail.com, Will Deacon , Mark Rutland , Oleg Nesterov , Al Viro , Dave Martin , Amit Daniel Kachhap , Marc Zyngier , David Brazdil , Jean-Philippe Brucker , Andrew Morton , Anshuman Khandual , Gavin Shan , Mike Rapoport , Vincenzo Frascino , Kristina Martsenko , Kees Cook , Sami Tolvanen , Frederic Weisbecker , Kevin Hao , Jason Yan , Andrey Ignatov , Peter Collingbourne , Julien Grall , Tian Tao , Qais Yousef , Jens Axboe , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RESEND RFC PATCH v2] arm64: Exposes support for 32-bit syscalls Message-ID: <20210212132807.GC7718@arm.com> References: <20210211202208.31555-1-Sonicadvance1@gmail.com> <58b03e17-3729-99ea-8691-0d735a53b9bc@arm.com> <20210212123515.GC6057@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210212123515.GC6057@sirena.org.uk> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 12, 2021 at 12:35:15PM +0000, Mark Brown wrote: > On Fri, Feb 12, 2021 at 11:30:41AM +0000, Steven Price wrote: > > On 11/02/2021 20:21, sonicadvance1@gmail.com wrote: > > > Why do we need compatibility layers? > > > There are ARMv8 CPUs that only support AArch64 but still need to run > > > AArch32 applications. > > > Cortex-A34/R82 and other cores are prime examples of this. > > > Additionally if a user is needing to run legacy 32-bit x86 software, it > > > needs the same compatibility layer. > > > Unless I'm much mistaken QEMU's user mode already does this - admittedly I > > don't tend to run "legacy 32-bit x86 software". > > Yes, this has been deployed on Debian for a long time - you can install > any combination of Debian architectures on a single system and it will > use qemu to run binaries that can't be supported natively by the > hardware. The only downside I think is that for some syscalls it's not that efficient. Those using struct iovec come to mind, qemu probably duplicates the user structures, having to copy them in both directions (well, the kernel compat layer does something similar). Anyway, I'm not in favour of this patch. Those binary translation tools need to explore the user-only options first and come up with some perf numbers to justify the proposal. -- Catalin