From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 01 Mar 2023 16:55:42 +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 1pXOnu-005knD-1I for lore@lore.pengutronix.de; Wed, 01 Mar 2023 16:55:42 +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 1pXOnt-0008OK-QM; Wed, 01 Mar 2023 16:55:41 +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 1pXOnm-0008No-Dm; Wed, 01 Mar 2023 16:55:34 +0100 Received: from rsc by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1pXOnm-0003dj-6Y; Wed, 01 Mar 2023 16:55:34 +0100 Date: Wed, 1 Mar 2023 16:55:34 +0100 From: Robert Schwebel To: Michael Grzeschik Message-ID: <20230301155534.GH17576@pengutronix.de> References: <20230130220323.408947-1-m.grzeschik@pengutronix.de> <58a8bd3808670b3c84573b404992a60371c3e5b7.camel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <58a8bd3808670b3c84573b404992a60371c3e5b7.camel@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 =?utf-8?B?TMO8YmJl?= 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 Tue, Jan 31, 2023 at 07:50:40AM +0100, Jan Lübbe 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="console=ttyS0,115200 loglevel=5 systemd.log_level=warning systemd.show_status=auto" > > > > +if [ -d "${PTXDIST_PLATFORMDIR}/root/.virtfs_metadata" ]; then > > + security_model="mapped-file" > > +else > > + security_model="none" > > +fi > > + > > # Machine to emulate > > QEMU_ARGS=( -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=/dev/vda console=ttyS0,115200 rw ${BASE_CMDLINE}" > > } > > > > -target="${1:-hda}" > > +# > > +# This needs: > > +# CONFIG_NET_9P_VIRTIO=y > > +# CONFIG_9P_FS=y > > +# > > +run_qemu_9p() { > > + exec ${QEMU_EXEC} \ > > + "${QEMU_ARGS[@]}" \ > > + -fsdev local,id=rootfs,path=${PTXDIST_PLATFORMDIR}/root,security_model="${security_model}" \ > > + -device virtio-9p-pci,fsdev=rootfs,mount_tag=/dev/root \ > > + "${QEMU_EXTRA_ARGS[@]}" \ > > + "${QEMU_LINUX_ARGS[@]}" \ > > + -append "root=/dev/root rw rootfstype=9p rootflags=trans=virtio ${BASE_CMDLINE}" > > You should set msize explicitly do make it less likely that some userspace tools > are confused by short reads from 9pfs (nginx for example). Care to re-send? > > +} > > + > > +target="${1:-9p}" > > > > #set -x > > run_qemu_${target} rsc -- 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 |