I built app-emulation/virtiofsd-1.8.0 with FEATURES=test on ppc64le and have done a basic smoke test (started a VM with a virtiofs filesystem, mounted the filesystem in the VM, wrote some files, checked that they appeared on the host). Reproducible: Always
Also I guess virtiofsd should be a dependency of app-emulation/libvirt (conditional on a USE flag).
Yeah, there is not really anything arch specific in virtiofsd. It can have the same set of KEYWORDS like app-emulation/qemu or app-emulation/libvirt. And for the dependency of libvirt - technically, virtiofsd can be use with plain qemu, without libvirt. But we can start with libvirt and refine later.
Created attachment 881435 [details] viritiofsd-1.9.0.ebuild
Sorry to chime in here, but you simply cannot assume for viritofsd to work properly across all arches. For example, the seccomp filters in virtiofsd are arch specific. Versions prior to 1.9.0 don't work properly on ppc64le (host/guest), because of the 'fstatfs64' syscall not beeing allowed. How to reproduce: 1. export directory via virtiofsd (start the daemon with '--seccomp log') 2. mount the the filesystem in the VM 3. issue the i.e. the 'df' command in the VM 4. observe the audit messages in your kernel log regarding syscall=253 This Problem goes away when using at least version 1.9.0 (you can try the attached ebuild) See https://gitlab.com/virtio-fs/virtiofsd/-/tags Additionally, virtiofsd doesn't seem to properly handle cross endian environments: When running a big endian guest on a little endian host, the virtiofs filesystems get mounted but are not accessible. I have, for instance '/var/cache/distiles' exported to a VM: within the VM i get: $ mount|grep distfiles 'vfsd-distfiles on /var/cache/distfiles type virtiofs (rw,relatime)' $ df 'df: /var/cache/distfiles: Connection refused' $ ls -l /var/cache 'd????????? ? ? ? ? ? distfiles' As you can see, the permissions / ownerships are completely messed up and they cannot be altered via chmod / chown. If both guest and host are little endian this problem doesn't occur. So far, I haven't tested a big endian host since I don't have access to one.
(In reply to zin0 from comment #4) > Sorry to chime in here, but you simply cannot assume for viritofsd to work > properly across all arches. > Thank for your investigation. I thought that if Fedora builds virtiofsd for other arches, then it works: https://koji.fedoraproject.org/koji/buildinfo?buildID=2299016 If it isn't so, let me bump the version and add ~ppc64 just to he new version then. Thanks for chiming in!
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8817d8c3301e3a2e25c272685944d06e8a5ca2a5 commit 8817d8c3301e3a2e25c272685944d06e8a5ca2a5 Author: Michal Privoznik <michal.privoznik@gmail.com> AuthorDate: 2023-12-17 18:46:26 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-01-26 07:49:33 +0000 app-emulation/virtiofsd: Add ~ppc64 KEYWORD Linked bug shows that virtiofsd works on ppc64 (tested version was 1.8.0). Add ~ppc64 keyword to corresponding ebuild and live ebuild. Bug: https://bugs.gentoo.org/920194 Signed-off-by: Michal Privoznik <michal.privoznik@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> app-emulation/virtiofsd/virtiofsd-1.8.0.ebuild | 2 +- app-emulation/virtiofsd/virtiofsd-9999.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
(In reply to Larry the Git Cow from comment #6) > [..] > app-emulation/virtiofsd: Add ~ppc64 KEYWORD > [..] > app-emulation/virtiofsd/virtiofsd-1.8.0.ebuild | 2 +- > app-emulation/virtiofsd/virtiofsd-9999.ebuild | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) The comment above says it only works for >=1.9.0, so I'll fix that now.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6baed7c7d796891eade62be8f42a509a8132bbb commit e6baed7c7d796891eade62be8f42a509a8132bbb Author: Sam James <sam@gentoo.org> AuthorDate: 2024-01-26 08:56:34 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-01-26 08:56:52 +0000 app-emulation/virtiofsd: fix ~ppc64 kw <1.9.0 doesn't work. Bug: https://bugs.gentoo.org/920194 Signed-off-by: Sam James <sam@gentoo.org> app-emulation/virtiofsd/virtiofsd-1.8.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
zin0, could you report the cross-endian issues upstream please (and ideally link it here)? thank you
Here's the link to the upstream issue: https://gitlab.com/virtio-fs/virtiofsd/-/issues/145 Thanks