check_slave_message_entries: Non-multiple VhostUserFSSlaveMsg size, 256 when attempting to enable DAX
I am trying to get DAX working with VirtioFSD (the rust version). I got qemu 7.0.0 compiled from the tag dax-2022-05-17-qemu7.0 The guest kernel is 6.1 (same problem with 5.10 though). The Qemu command line is as follows:
/usr/bin/qemu-system-x86_64 -serial stdio -enable-kvm -name Sample -smp cores=2,threads=1,sockets=1,maxcpus=2 -cpu host -device virtio-balloon,deflate-on-oom=on,free-page-reporting=on,guest-stats-polling-interval=10,id=balloon0 -object memory-backend-memfd,id=ram0,size=2G,share=on -machine memory-backend=ram0 -m 2G -chardev socket,id=char0,path=/srv/vms/sample/vfsd.sock -device vhost-user-fs-pci,chardev=char0,queue-size=1024,tag=rootfs,cache-size=2G -kernel /srv/vms/sample/fs/vmlinuz -initrd /srv/vms/sample/fs/initrd.img -append "root=rootfs rootfstype=virtiofs rw quiet console=ttyS0 debug rootflags=dax" -netdev type=bridge,id=virt0,br=virt0 -device virtio-net-pci,netdev=virt0,host_mtu=9000,mac=52:54:01:00:00:00 -monitor unix:/srv/vms/sample/monitor.sock,server=on,wait=off
The virtiofsd daemon Version is as follows:
virtiofsd -V
virtiofsd backend 1.5.0
The virtiofsd command line is as follows:
/usr/bin/virtiofsd --socket-path=/srv/vms/sample/vfsd.sock --shared-dir=/srv/vms/sample/fs --announce-submounts --inode-file-handles=prefer --seccomp=log --sandbox=namespace --socket-group kvm-instances --xattr --modcaps=+sys_admin
When attempting to boot, I'm getting a strange error from the serial console (part from the serial console boot log):
Feb 02 23:39:58 hetzner1 qemu-system-x86_64[216846]: [ 2.378650] virtiofs virtio1: Cache len: 0x80000000 @ 0x100000000
Feb 02 23:39:58 hetzner1 qemu-system-x86_64[216846]: [ 2.401958] memmap_init_zone_device initialised 524288 pages in 4ms
Feb 02 23:39:58 hetzner1 qemu-system-x86_64[216846]: [ 2.496554] sr 1:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
Feb 02 23:39:58 hetzner1 qemu-system-x86_64[216846]: [ 2.497157] cdrom: Uniform CD-ROM driver Revision: 3.20
Feb 02 23:39:58 hetzner1 qemu-system-x86_64[216846]: [ 2.544712] sr 1:0:0:0: Attached scsi CD-ROM sr0
Feb 02 23:39:59 hetzner1 qemu-system-x86_64[216846]: qemu-system-x86_64: check_slave_message_entries: Non-multiple VhostUserFSSlaveMsg size, 256
Feb 02 23:39:59 hetzner1 qemu-system-x86_64[216846]: [ 2.930789] Not activating Mandatory Access Control as /sbin/tomoyo-init does not exist.
Feb 02 23:39:59 hetzner1 qemu-system-x86_64[216846]: qemu-system-x86_64: check_slave_message_entries: Non-multiple VhostUserFSSlaveMsg size, 256
Feb 02 23:39:59 hetzner1 qemu-system-x86_64[216846]: run-init: can't execute '/sbin/init': Input/output error
Feb 02 23:39:59 hetzner1 qemu-system-x86_64[216846]: [ 2.932524] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
After that the kernel panics and it can't boot.
Removing rootflags=dax makes the kernel boot and actually use virtiofs but obviously without DAX. And it seems I can't enable DAX no matter what I do, even when attempting to remount, or just mounting manually. The DAX option never gets enabled, yet I get no error messages whatsoever.
What the hell am I doing wrong?