All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Schwebel <r.schwebel@pengutronix.de>
To: Christian Schoenebeck <linux_oss@crudebyte.com>
Cc: Latchesar Ionkov <lucho@ionkov.net>,
	Dominique Martinet <asmadeus@codewreck.org>,
	Eric Van Hensbergen <ericvh@kernel.org>,
	v9fs@lists.linux.dev, kernel@pengutronix.de
Subject: Re: mmap on 9p broken in 6.4
Date: Fri, 14 Jul 2023 07:34:19 +0200	[thread overview]
Message-ID: <ZLDeW/5dkFR3crBc@pengutronix.de> (raw)
In-Reply-To: <8322841.litLk3al4c@silver>

Christian,

On Thu, Jul 13, 2023 at 09:50:42AM +0200, Christian Schoenebeck wrote:
> > > Does adding QEMU option "multidevs=remap" [1] resolve it?
> > >
> > > [1] https://wiki.qemu.org/Documentation/9psetup#Starting_the_Guest_directly
> >
> > Unfortunately not:
> >
> > + exec ./platform-v7a/sysroot-host/bin/qemu-system-arm -machine vexpress-a9 -cpu cortex-a9 -smp 4 -m 1024M -nographic -no-reboot -net nic,netdev=net1 -netdev user,id=net1,hostfwd=tcp:127.0.0.1:27737-:22,hostfwd=tcp:127.0.0.1:12345-:12345 -rtc base=2000-01-01 -object rng-random,filename=/dev/random,id=rng0 -device vi
> > rtio-rng-device,rng=rng0 -device virtio-scsi-device,id=scsi -fsdev local,id=rootfs,path=./platform-v7a/root,security_model=mapped-file,multidevs=remap -device virtio-9p-device,fsdev=rootfs,mount_tag=/dev/root -kernel ./platform-v7a/images/linuximage -dtb ./platform-v7a/images/vexpress-v2p-ca9.dtb -append 'root=/dev/
> > root rootfstype=9p rootflags=trans=virtio console=ttyAMA0,115200 loglevel=5 systemd.show_status=auto'
>
> I don't see any cache option here. I would expect at least cache=mmap here:
>
> https://wiki.qemu.org/Documentation/9p_root_fs#Boot_the_9p_Root_FS_System
>
> By default it's cache=none, which means no mmap() would be allowed either.

This does help:

----------8<----------
+ exec ./platform-v7a/sysroot-host/bin/qemu-system-arm -machine vexpress-a9 -cpu cortex-a9 -smp 4 -m 1024M -nographic -no-reboot -net nic,netdev=net1 -netdev user,id=net1,ho
stfwd=tcp:127.0.0.1:27737-:22,hostfwd=tcp:127.0.0.1:12345-:12345 -rtc base=2000-01-01 -object rng-random,filename=/dev/random,id=rng0 -device virtio-rng-device,rng=rng0 -dev
ice virtio-scsi-device,id=scsi -fsdev local,id=rootfs,path=./platform-v7a/root,security_model=mapped-file,multidevs=remap -device virtio-9p-device,fsdev=rootfs,mount_tag=/de
v/root -kernel ./platform-v7a/images/linuximage -dtb ./platform-v7a/images/vexpress-v2p-ca9.dtb -append 'root=/dev/root rootfstype=9p rootflags=trans=virtio,cache=mmap conso
le=ttyAMA0,115200 loglevel=5 systemd.show_status=auto'
[    0.000000] L2C: platform modifies aux control register: 0x02020000 -> 0x02420000
[    0.000000] L2C: DT/platform modifies aux control register: 0x02020000 -> 0x02420000
[    0.004881] smp_twd: clock not found -2
[    0.793281] simple-pm-bus bus@40000000:motherboard-bus@40000000:iofpga@7,00000000: Failed to create device link (0x180) with dcc:tcrefclk
[    0.809253] simple-pm-bus bus@40000000:motherboard-bus@40000000:iofpga@7,00000000: Failed to create device link (0x180) with dcc:tcrefclk
[    0.879343] physmap-flash 48000000.psram: map_probe failed
[    1.267846] 9pnet_virtio: no channels available for device root

 ____                        _                   _
|  _ \ ___ _ __   __ _ _   _| |_ _ __ ___  _ __ (_)_  __
| |_) / _ \ '_ \ / _` | | | | __| '__/ _ \| '_ \| \ \/ /
|  __/  __/ | | | (_| | |_| | |_| | | (_) | | | | |>  <
|_|   \___|_| |_|\__, |\__,_|\__|_|  \___/|_| |_|_/_/\_\
                 |___/

 ____  _     _             _  ___ _
|  _ \(_)___| |_ _ __ ___ | |/ (_) |_
| | | | / __| __| '__/ _ \| ' /| | __|
| |_| | \__ \ |_| | | (_) | . \| | |_
|____/|_|___/\__|_|  \___/|_|\_\_|\__|


OSELAS(R)-DistroKit-2019.12.0-00429-g57ffae760eb9 / v7a-2019.12.0-00429-g57ffae760eb9
ptxdist-2023.07.1/2023-07-11T19:56:50+0200

DistroKit login: root
root@DistroKit:~ mount / -o remount,rw
root@DistroKit:~ ldconfig
root@DistroKit:~
----------8<----------

However, the default behaviour has changed. With 6.3, mmap worked without
cache=mmap.

> Again, effective 9p mount options are always useful, e.g. `mount | grep 9p`

With the change:
/dev/root on / type 9p (rw,relatime,cache=mmap,access=client,trans=virtio)

Without the change:
/dev/root on / type 9p (rw,relatime,access=client,trans=virtio)

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    |

  parent reply	other threads:[~2023-07-14  5:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11 20:19 mmap on 9p broken in 6.4 Robert Schwebel
2023-07-12  9:01 ` Christian Schoenebeck
2023-07-12 14:14   ` Robert Schwebel
2023-07-12 15:57     ` Christian Schoenebeck
2023-07-12 22:15       ` Robert Schwebel
2023-07-13  7:50         ` Christian Schoenebeck
     [not found]           ` <CAFkjPTmrbe9Djs_iYf=vu1xbTLhey0OmePR2Jw=C_dbQVYnAhQ@mail.gmail.com>
2023-07-13 10:54             ` Christian Schoenebeck
2023-07-14  5:36               ` Robert Schwebel
2023-07-16 14:54                 ` Eric Van Hensbergen
2023-07-16 19:48                   ` Eric Van Hensbergen
2023-07-17 11:26                     ` Robert Schwebel
2023-07-17 15:29                       ` Eric Van Hensbergen
2023-07-17 18:11                         ` Eric Van Hensbergen
2023-07-17 18:59                           ` Eric Van Hensbergen
2023-07-14  5:34           ` Robert Schwebel [this message]
2023-07-13 11:22 ` Linux regression tracking #adding (Thorsten Leemhuis)
2023-07-26 14:07   ` Linux regression tracking #update (Thorsten Leemhuis)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZLDeW/5dkFR3crBc@pengutronix.de \
    --to=r.schwebel@pengutronix.de \
    --cc=asmadeus@codewreck.org \
    --cc=ericvh@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux_oss@crudebyte.com \
    --cc=lucho@ionkov.net \
    --cc=v9fs@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.