From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 02 Mar 2023 08:48:53 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pXdgK-006Lp7-MB for lore@lore.pengutronix.de; Thu, 02 Mar 2023 08:48:53 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pXdgK-0004q0-Bb; Thu, 02 Mar 2023 08:48:52 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXdgB-0004pY-OA; Thu, 02 Mar 2023 08:48:43 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pXdgB-001HLR-3o; Thu, 02 Mar 2023 08:48:43 +0100 Received: from localhost ([127.0.0.1]) by ptz.office.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pXdgA-001UdA-Ei; Thu, 02 Mar 2023 08:48:42 +0100 Message-ID: <789b2ce216f3f6daff09efcd17b41cda7cec1ec4.camel@pengutronix.de> From: Jan =?ISO-8859-1?Q?L=FCbbe?= To: Michael Grzeschik , Robert Schwebel Date: Thu, 02 Mar 2023 08:48:42 +0100 In-Reply-To: <20230301192442.GH6678@pengutronix.de> References: <20230130220323.408947-1-m.grzeschik@pengutronix.de> <58a8bd3808670b3c84573b404992a60371c3e5b7.camel@pengutronix.de> <20230301155534.GH17576@pengutronix.de> <20230301192442.GH6678@pengutronix.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (by Flathub.org) MIME-Version: 1.0 Subject: Re: [DistroKit] [PATCH] x86_64: run: add 9p support X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: distrokit@pengutronix.de Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false On Wed, 2023-03-01 at 20:24 +0100, Michael Grzeschik wrote: > On Wed, Mar 01, 2023 at 04:55:34PM +0100, Robert Schwebel wrote: > > On Tue, Jan 31, 2023 at 07:50:40AM +0100, Jan L=C3=BCbbe wrote: > > > On Mon, 2023-01-30 at 23:03 +0100, Michael Grzeschik wrote: > > > > copy the qemu 9p rule from platform v7a and make 9p the default > > > >=20 > > > > Signed-off-by: Michael Grzeschik > > > > --- > > > > configs/platform-x86_64/run | 23 ++++++++++++++++++++++- > > > > 1 file changed, 22 insertions(+), 1 deletion(-) > > > >=20 > > > > diff --git a/configs/platform-x86_64/run b/configs/platform-x86_64/= run > > > > index c39d5a7b..96322292 100755 > > > > --- a/configs/platform-x86_64/run > > > > +++ b/configs/platform-x86_64/run > > > > @@ -67,6 +67,12 @@ fi > > > >=20 > > > > BASE_CMDLINE=3D"console=3DttyS0,115200 loglevel=3D5 systemd.log_le= vel=3Dwarning systemd.show_status=3Dauto" > > > >=20 > > > > +if [ -d "${PTXDIST_PLATFORMDIR}/root/.virtfs_metadata" ]; then > > > > + security_model=3D"mapped-file" > > > > +else > > > > + security_model=3D"none" > > > > +fi > > > > + > > > > # Machine to emulate > > > > QEMU_ARGS=3D( -L ${PTXDIST_PLATFORMDIR}/sysroot-host/share/qemu/ -= machine pc-q35-2.12 -smp 2 -cpu host -accel kvm -m 1G -s ) > > > > # disable graphics output > > > > @@ -97,7 +103,22 @@ run_qemu_hda() { > > > > -append "root=3D/dev/vda console=3DttyS0,115200 rw ${BASE_CMDLIN= E}" > > > > } > > > >=20 > > > > -target=3D"${1:-hda}" > > > > +# > > > > +# This needs: > > > > +# CONFIG_NET_9P_VIRTIO=3Dy > > > > +# CONFIG_9P_FS=3Dy > > > > +# > > > > +run_qemu_9p() { > > > > + exec ${QEMU_EXEC} \ > > > > + "${QEMU_ARGS[@]}" \ > > > > + -fsdev local,id=3Drootfs,path=3D${PTXDIST_PLATFORMDIR}/root,secu= rity_model=3D"${security_model}" \ > > > > + -device virtio-9p-pci,fsdev=3Drootfs,mount_tag=3D/dev/root \ > > > > + "${QEMU_EXTRA_ARGS[@]}" \ > > > > + "${QEMU_LINUX_ARGS[@]}" \ > > > > + -append "root=3D/dev/root rw rootfstype=3D9p rootflags=3Dtrans= =3Dvirtio ${BASE_CMDLINE}" > > >=20 > > > You should set msize explicitly do make it less likely that some user= space tools > > > are confused by short reads from 9pfs (nginx for example). > >=20 > > Care to re-send? >=20 > Sure! But: >=20 > @jluebbe: I found your discussion about setting explicit msize in the > qemu virtio parameters. >=20 > https://gitlab.com/qemu-project/qemu/-/issues/409 >=20 > However I did not find out which reasonable value to set from the > thread, since the discussion is talking about different causes to > trigger the issues. e.g. tar without O_PARTIAL in the kernel headers. >=20 > Would msize=3D104857600 be something to work with? We use 16777216 in RAUC testing to fix issues with nginx, which seems to be= the maximum in the kernel. That has been working fine for two years. Jan > I also found some patches that are there to solve the issue probably, > but they got not mainlined yet. >=20 > https://lore.kernel.org/netdev/cover.1640870037.git.linux_oss@crudebyte.c= om/ >=20 > mgr >=20 > > > > +} > > > > + > > > > +target=3D"${1:-9p}" > > > >=20 > > > > #set -x > > > > run_qemu_${target} > >=20 > > rsc > > --=20 > > Pengutronix e.K. | Dipl.-Ing. Robert Schwebel= | > > Steuerwalder Str. 21 | https://www.pengutronix.de= / | > > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 = | > > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 = | > >=20 >=20 --=20 Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |