From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 01 Mar 2023 20:24:49 +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 1pXS4G-005rrX-7z for lore@lore.pengutronix.de; Wed, 01 Mar 2023 20:24:49 +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 1pXS4F-0007Wl-Qy; Wed, 01 Mar 2023 20:24:47 +0100 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXS4B-0007WR-2b; Wed, 01 Mar 2023 20:24:43 +0100 Received: from mgr by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1pXS4A-0002vG-S9; Wed, 01 Mar 2023 20:24:42 +0100 Date: Wed, 1 Mar 2023 20:24:42 +0100 From: Michael Grzeschik To: Robert Schwebel Message-ID: <20230301192442.GH6678@pengutronix.de> References: <20230130220323.408947-1-m.grzeschik@pengutronix.de> <58a8bd3808670b3c84573b404992a60371c3e5b7.camel@pengutronix.de> <20230301155534.GH17576@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gKijDXBCEH69PxaN" Content-Disposition: inline In-Reply-To: <20230301155534.GH17576@pengutronix.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) 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, Jan =?iso-8859-15?Q?L=FCbbe?= 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 --gKijDXBCEH69PxaN Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=FCbbe 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 >> > >> > Signed-off-by: Michael Grzeschik >> > --- >> > configs/platform-x86_64/run | 23 ++++++++++++++++++++++- >> > 1 file changed, 22 insertions(+), 1 deletion(-) >> > >> > 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 >> > >> > BASE_CMDLINE=3D"console=3DttyS0,115200 loglevel=3D5 systemd.log_level= =3Dwarning systemd.show_status=3Dauto" >> > >> > +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/ -mac= hine 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_CMDLINE}" >> > } >> > >> > -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,securit= y_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=3Dvi= rtio ${BASE_CMDLINE}" >> >> You should set msize explicitly do make it less likely that some userspa= ce tools >> are confused by short reads from 9pfs (nginx for example). > >Care to re-send? Sure! But: @jluebbe: I found your discussion about setting explicit msize in the qemu virtio parameters. https://gitlab.com/qemu-project/qemu/-/issues/409 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. Would msize=3D104857600 be something to work with? I also found some patches that are there to solve the issue probably, but they got not mainlined yet. https://lore.kernel.org/netdev/cover.1640870037.git.linux_oss@crudebyte.com/ mgr >> > +} >> > + >> > +target=3D"${1:-9p}" >> > >> > #set -x >> > run_qemu_${target} > >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 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 | --gKijDXBCEH69PxaN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEElXvEUs6VPX6mDPT8C+njFXoeLGQFAmP/pnUACgkQC+njFXoe LGQolQ//ZJ+ljo7omerbovodEns806+AU5yhQRATwH/Tw3siaRx55/xixzOP190B d43zM5CWecoWLXsfJ4DGrvBD9WSC/NKc1yCYdV3Q2i/45NxoCfga+rsKVnQgSTd+ w0MyWXiA6YYqoJfxWuCIKqwYFtL05bdb033L1rHe08zrC87nAS1X/vSyWW8A5djG zP2+b05oB+ETE+eCuR+iq8EtgfjvJaZ01+L/EuLGAj3ZwIkEmQNrgQS+kPBRDNRx Sq24PlEXaWCNcF7iJt2BZtd2Lf/9i6e37qs4QCqnxdlcCqJ8U6EQY+xK3ertuv9d PxAdZx8GVKMEIV6TjQeQhxzAuSpeh1WtS2RB+hFEXfwOD/RNocepyUtV4HWDvwUm k6rNbJoYcWYObJu+K3PoS/jwW+VutlWeGdAPcKE5LlcAr0fKeFlV7bp1P04c0HG4 s+JL+bHrcI6kNWS9gP/UeEM+3r944QESGxcbR/ohqZHzflnMIy2uCdhjWu6N2/Va aIbTRR98iBJuzUMdZEbJuuPaygNr8sp0Eljtn8p8ZpzXA0cvIql05EH3SMpAjXr/ ft5HMHVCNxHiCDZS1uHjEtr9a0HWeAAdLOr6wMm3O6fmMsiVcjKRAnChlO2D4CPS CK7ZgH+RxyxaOys7nUkFBM12wAl2+/g87bM+sTh9/oN/x6AmXrM= =uaEs -----END PGP SIGNATURE----- --gKijDXBCEH69PxaN--