Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1631657rbb; Mon, 26 Feb 2024 16:36:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWCRxs4tQgOYzllO8paX9WRJEVKPiCjr7bdL7/J1eRj8p+ZljfN6dOPjmJzshij+8UWaOU0+WqReVlzDGAzaez3gmkCd5DFLXzHQuUmzA== X-Google-Smtp-Source: AGHT+IEZYyhu5Rg61uiJPMK3Zov/b11NNYafsCxW+UjiYp8jiAvlU00wci6Cf2w7UzRUv9ji0eaL X-Received: by 2002:a17:90a:fd0f:b0:299:1d33:846c with SMTP id cv15-20020a17090afd0f00b002991d33846cmr6074818pjb.39.1708994208989; Mon, 26 Feb 2024 16:36:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708994208; cv=pass; d=google.com; s=arc-20160816; b=u1/w2i0x2OO5U+D+oLpqsPPReqCtIHDYRRrQURNF/BM+VRrD197E4hVdbyUuKVthX3 OlEn9pjkBS83g+4hWz4xpBPhcPtgC2Sb1OhmOmCkVyJFslsNFV79W2Rs0E15Ro1DCnt0 C29zINfj/sQPE25shl0YdHjWfKBevj8+CAEC1zwkB4zbfIbvub3eh42LUQ8NaT8BP8yc mkcZcuwOo067ntLI6qDN3IF9WI8XZ2jnAKseodCPhn7Eg9tOMgWj0/0Kre+zyVnWsPSA Kn0CSKBY9TJ5yGOPcrE9v69PEt8BSMnrOyDyE+6mR4nvLV9INMrorT7oijmb8klpZD7u w79A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=gKpylQvY7fWF0HEhcpoV/u+3QY3QSMz3zE4Q+faMtfw=; fh=qgALqhvBfwh64qlTOA5xcM4euFCRJESH/+60UMp8eRY=; b=nwpzjhn1z1xRfXTTp7NQD7hJrhHqsVptajKJc3V1oJaQkE2QsWG44zp2seLARnh3tX +/OUtqDe2xv2lhUD8J2Jv8Bkdaa+VMa+OjhrtAy0NVv0Cmrn9TnFXFZuVkmzsX6G55/b zM9I7tufYMr+AbjBoSSCSnIhgaUekQUztB7eBDlwMY0req4giNvMRo84rFrdScHblmxP DddPl92x+e8nqx6UkmLi4qCLpAwDy0qplFLpFplrHDfc2VNHQwRcP8IczFFFudToksIR yYACk80USJdG7C5fZRDEzRqlAEkBKnkYND2B1Xk4SQUDOueXiazt+DcyXak7c3oZDoMq 2+Fg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=cYyVNXD1; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-82468-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82468-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id n32-20020a17090a5aa300b00297095561ddsi6380057pji.21.2024.02.26.16.36.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 16:36:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82468-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=cYyVNXD1; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-82468-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82468-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E77B4B233E5 for ; Tue, 27 Feb 2024 00:36:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD55717F8; Tue, 27 Feb 2024 00:36:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="cYyVNXD1" Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76B2437E for ; Tue, 27 Feb 2024 00:36:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708994195; cv=none; b=IzjJnubh0JBNjCyvf0JEyUpYfa9ztvVidgUDibaVNZH5RIdknKCwKDzlQSK8+TN6KydHhIm72S0UvQPy8dgzjlfKgIR5D/pIxX47kjJcj3LtolmKTGjKFR1s4sOcA86Db1ooeUe4/PwuFDii0UEOjr3roH1FQqRf/YDl8ZnPOvk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708994195; c=relaxed/simple; bh=IXjp9ffzWGMlN6IdNxjC/u0dQ4UDT6IPvs9OH9Mcs5o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=s7YLG6cWfuDiqTE8cPQmk+kF9ZqeKWouY/8gwHeZtgBxjVSgbdlU8yuhIbgnC/ckCLC44K9XHsd0cpUcrIPzYOWf3AOY4NwE+0W1J+m2etW0Y6NkQ6SNrjU7pnLIAQx9xr/KFDZ4N8f/HXOb2EdqViWkOWvXnTrE/tYw1r9Gnuw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=cYyVNXD1; arc=none smtp.client-ip=209.85.160.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-22007fe465bso968178fac.1 for ; Mon, 26 Feb 2024 16:36:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1708994192; x=1709598992; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gKpylQvY7fWF0HEhcpoV/u+3QY3QSMz3zE4Q+faMtfw=; b=cYyVNXD1F1RwCDYf8ksuvfh22H6rMhwcFSt6siQlvCq8KDnoZMFXuCtvVE7WJGBxuP ycW1F0vtLleZt4kJj3sdc3XbXht1yAqwXnQ0lZxYt9PDic0vKK/1kjMMiy9Klv9XzSx4 4S1EpgfyE5o09SEVrYaSWbAJt0kag9Ww31zs6zvjgBGaTCuAdwEdY4q1Fu78qvc27H2q Q6gYko3Z9YjtR2S0hLx+ophZkQNx8pwGveJ+cO8/A4Fae5JX18vx61d5Urd/zBBKrKkf xyq/7ztNUFln7j/9Tm4rTqkoOYRG5ebt95zMIaybN/cc+0MkgqsQrTqrotr53kWBqnIH wx/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708994192; x=1709598992; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gKpylQvY7fWF0HEhcpoV/u+3QY3QSMz3zE4Q+faMtfw=; b=LJdCUjb4FjgGgttkn65xTkGDwMbQq3LQB37kLsMKSizfsxGipPKhEnPiCBLcKw760p SSY2lJZdmfGJ7D20VAXaOUVFV3FnYxjTrHTsRykDnpIeVnHDLoxFX1/WX69uskpuKwp+ 1sLN0m0MBmmx2xbaBu5RNAKC54GgwAgfV0Q9VgqY/vs+fHbmlg2wzTXE2MxVBpQPK8r/ qRAAv3wNbz4oYVJ1NJFflbOZCZ+gGis30BJxNu1OgIvhlFmzg81GSQ50uUE6b8yupePP iQPBq5avDpSs+3+oqU5OcGvA2SdlO3iF5MuQ6dPrPAHzcDfrWJ8pOgj30mlySuBybTn3 Cs3Q== X-Gm-Message-State: AOJu0Yw8YJKIZ3ZjLgKYG+Y58UizCqDOFR6Vgl8phdwlzc9TEwLvRs3e 9AqIwTonxrWJ9oDByqhjEsq68iv9HKuIxCkcGMFqe4a0ZIJtGzk6vDmGS13DmuE= X-Received: by 2002:a05:6870:d154:b0:21e:8424:8325 with SMTP id f20-20020a056870d15400b0021e84248325mr9458650oac.18.1708994192531; Mon, 26 Feb 2024 16:36:32 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id z25-20020a631919000000b005dc85821c80sm4504117pgl.12.2024.02.26.16.36.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 16:36:31 -0800 (PST) From: Samuel Holland To: Palmer Dabbelt , linux-riscv@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Samuel Holland Subject: [PATCH 0/4] riscv: 64-bit NOMMU fixes and enhancements Date: Mon, 26 Feb 2024 16:34:45 -0800 Message-ID: <20240227003630.3634533-1-samuel.holland@sifive.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series aims to improve support for NOMMU, specifically by making it easier to test NOMMU kernels in QEMU and on various widely-available hardware (errata permitting). After all, everything supports Svbare... After applying this series, a NOMMU kernel based on defconfig (changing only the three options below*) boots to userspace on QEMU when passed as -kernel. # CONFIG_RISCV_M_MODE is not set # CONFIG_MMU is not set CONFIG_NONPORTABLE=y *if you are using LLD, you must also disable BPF_SYSCALL and KALLSYMS, because LLD bails on out-of-range references to undefined weak symbols. Samuel Holland (4): riscv: Fix TASK_SIZE on 64-bit NOMMU riscv: Fix loading 64-bit NOMMU kernels past the start of RAM riscv: Remove MMU dependency from Zbb and Zicboz riscv: Allow NOMMU kernels to run in S-mode arch/riscv/Kconfig | 17 ++++++++++------- arch/riscv/include/asm/page.h | 2 +- arch/riscv/include/asm/pgtable.h | 2 +- arch/riscv/mm/init.c | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) -- 2.43.0