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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 ABC6AC61DA3 for ; Fri, 24 Feb 2023 14:32:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DFB1310EA59; Fri, 24 Feb 2023 14:32:50 +0000 (UTC) Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD24410EA59 for ; Fri, 24 Feb 2023 14:32:49 +0000 (UTC) Received: from hamburger.collabora.co.uk (hamburger.collabora.co.uk [IPv6:2a01:4f8:1c1c:f269::1]) by madras.collabora.co.uk (Postfix) with ESMTP id 06CB26602FBB; Fri, 24 Feb 2023 14:32:47 +0000 (GMT) From: "Helen Mae Koike Fornazier" In-Reply-To: <20230224140421.29774-1-david@ixit.cz> Content-Type: text/plain; charset="utf-8" X-Forward: 127.0.0.1 Date: Fri, 24 Feb 2023 14:32:47 +0000 To: "David Heidelberg" MIME-Version: 1.0 Message-ID: <2466-63f8ca80-15-200c5ec0@118513565> Subject: =?utf-8?q?Re=3A?= [RESEND PATCH] =?utf-8?q?init/do=5Fmounts=2Ec=3A?= add virtiofs root fs support User-Agent: SOGoMail 5.8.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wsa+renesas@sang-engineering.com, akpm@linux-foundation.org, Stefan Hajnoczi , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" (from get=5Fmaintainers.pl script) +cc Wolfram Sang, Andrew Morton On Friday, February 24, 2023 11:04 -03, David Heidelberg wrote: > From: Stefan Hajnoczi >=20 > Make it possible to boot directly from a virtiofs file system with ta= g > 'myfs' using the following kernel parameters: >=20 > rootfstype=3Dvirtiofs root=3Dmyfs rw >=20 > Booting directly from virtiofs makes it possible to use a directory o= n > the host as the root file system. This is convenient for testing and > situations where manipulating disk image files is cumbersome. >=20 > Signed-off-by: Stefan Hajnoczi > Signed-off-by: David Heidelberg Reviewed-by: Helen Koike > --- > We have used this option in Mesa3D CI for testing crosvm for > more than one years and it's proven to work reliably. >=20 > We are working on effort to removing custom patches to be able to do=20 > automated apply and test of patches from any tree. Thanks David for this work, it would be awesome to have more automated = tests, and if we can do more towards this goal, making the whole process more fluid, I would go= for it. =20 >=20 > https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/.gitlab-ci/crosv= m-runner.sh#L85 >=20 > init/do=5Fmounts.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) >=20 > diff --git a/init/do=5Fmounts.c b/init/do=5Fmounts.c > index 811e94daf0a8..11c11abe23d7 100644 > --- a/init/do=5Fmounts.c > +++ b/init/do=5Fmounts.c > @@ -578,6 +578,16 @@ void =5F=5Finit mount=5Froot(void) > printk(KERN=5FERR "VFS: Unable to mount root fs via SMB.\n"); > return; > } > +#endif > +#ifdef CONFIG=5FVIRTIO=5FFS > + if (root=5Ffs=5Fnames && !strcmp(root=5Ffs=5Fnames, "virtiofs")) { > + if (!do=5Fmount=5Froot(root=5Fdevice=5Fname, "virtiofs", > + root=5Fmountflags, root=5Fmount=5Fdata)) > + return; > + > + panic("VFS: Unable to mount root fs \"%s\" from virtiofs", > + root=5Fdevice=5Fname); > + } > #endif > if (ROOT=5FDEV =3D=3D 0 && root=5Fdevice=5Fname && root=5Ffs=5Fname= s) { > if (mount=5Fnodev=5Froot() =3D=3D 0) > --=20 > 2.39.1 >=20 Regards, Helen