From patchwork Tue Oct 27 21:51:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 11861953 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E67A1C4363A for ; Tue, 27 Oct 2020 21:52:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6F871207E8 for ; Tue, 27 Oct 2020 21:52:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="1Z9rwaVE"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Gso25ail" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F871207E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=qiAjh1VCv+X1Vn3+8ai89tEtSITYEJ7CqIuFf/BvgIY=; b=1Z9rwaVEwNTKUjHkl4ViTnyagX Ro0gco7viVWTvohDTnSd3ElfsOI/wdHSxq7drYmHXWfomz2hmoNihvN3y1CPLntmLGtZSJzjpA+0Y nu6UVnKlbdAh6vuPb4CeC5qdAkzbzlvuF1pOgSs8NRWvgTi6il9+hykaa+CnvJ/qdEDSNa1VUGhVd 0ySjWvkOkp+1JN40tUknYItnk2RNjHcnY1l/sHLvOuhA8QDImrQJMEIDnZ6hlIaasl/W9I0zfYOje aQMOUnxS3anrj0CHaysBQiaXgAkYOAirA5vxO4QJ/1nq9HIiFexzKrdIWEtbTt5hVmPWXuYvR347j UNmkP4hw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXWsK-0002Mp-M0; Tue, 27 Oct 2020 21:51:28 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXWsH-0002LY-UY for linux-arm-kernel@lists.infradead.org; Tue, 27 Oct 2020 21:51:26 +0000 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 500D4207E8; Tue, 27 Oct 2020 21:51:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603835484; bh=O5D4goy0vhumRnvIluG5lcRDisgHq+OWV12M5HePYx4=; h=From:To:Cc:Subject:Date:From; b=Gso25ailQocviYmbXrC14bnc56r2ElzaO1xHi3uSlPtTpocOBtrqkLfZ/VSQFGRXs fuVK0S8kL5jsKNwOOtNKEaqv12tqcxg74fpbTPGkHlQ/7Uxg8BAtrtPd7rIXuqiM/z KHulAmPCNlwCX3BgBjgi9UmtLPaU+nhMj7CeNry0= From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/6] An alternative series for asymmetric AArch32 systems Date: Tue, 27 Oct 2020 21:51:12 +0000 Message-Id: <20201027215118.27003-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201027_175126_075367_BA9258C1 X-CRM114-Status: GOOD ( 13.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Marc Zyngier , kernel-team@android.com, Peter Zijlstra , Catalin Marinas , Qais Yousef , Suren Baghdasaryan , Greg Kroah-Hartman , Will Deacon , Morten Rasmussen Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi all, I was playing around with the asymmetric AArch32 RFCv2 from Qais: https://lore.kernel.org/r/20201021104611.2744565-1-qais.yousef@arm.com and ended up writing my own implementation this afternoon. I think it's smaller, simpler and easier to work with. In particular: * I got rid of the sysctl in favour of a plain cmdline parameter * I don't have a new CPU capability * I don't have a new thread flag * I expose a cpumask to userspace via sysfs to identify the 32-bit CPUs Anyway, I don't think we should merge this stuff (other than the first patch) until we've figured out what's going on in Android, but I wanted to get this out as something which we might be able to build on. Cheers, Will Cc: Catalin Marinas Cc: Marc Zyngier Cc: Greg Kroah-Hartman Cc: Peter Zijlstra Cc: Morten Rasmussen Cc: Qais Yousef Cc: Suren Baghdasaryan Cc: kernel-team@android.com --->8 Qais Yousef (1): KVM: arm64: Handle Asymmetric AArch32 systems Will Deacon (5): arm64: Allow mismatched 32-bit EL0 support KVM: arm64: Kill 32-bit vCPUs on systems with mismatched EL0 support arm64: Kill 32-bit applications scheduled on 64-bit-only CPUs arm64: Advertise CPUs capable of running 32-bit applcations in sysfs arm64: Hook up cmdline parameter to allow mismatched 32-bit EL0 .../ABI/testing/sysfs-devices-system-cpu | 8 ++ .../admin-guide/kernel-parameters.txt | 7 ++ arch/arm64/include/asm/cpufeature.h | 3 + arch/arm64/kernel/cpufeature.c | 80 ++++++++++++++++++- arch/arm64/kernel/process.c | 21 ++++- arch/arm64/kernel/signal.c | 26 ++++++ arch/arm64/kvm/arm.c | 27 +++++++ 7 files changed, 168 insertions(+), 4 deletions(-)