Skip to content

vsock device fails with "qemu-system-x86_64: vhost_set_features failed: Operation not supported (95)" when queue_reset=true

Host environment

  • Operating system: Fedora 37 (also occurs with Fedora 36)
  • OS/kernel version: Linux yekko 6.0.8-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 11 15:09:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Architecture: x86_64
  • QEMU flavor: qemu-system-x86_64
  • QEMU version: built from commit 2c831124
  • QEMU command line:
    qemu-system-x86_64 -m 2048 -kernel /boot/vmlinuz-6.0.8-300.fc37.x86_64 -initrd mbuto.img -nographic -serial stdio -nodefaults -append "console=ttyS0" -device vhost-vsock-pci,guest-cid=31415,queue_reset=true

Emulated/Virtualized environment

  • Operating system: Minimal initramfs built from host using mbuto. Includes vsock driver, and an init script starting socat to listen on a vsock and start sshd -i
  • OS/kernel version: Same as host
  • Architecture: x86_64

Description of problem

Immediately after guest vsock driver initialize, qemu prints error messages. I'm not able to connect to the guest with vsock:

[    0.654463] Run /init as init process
[    0.679778] NET: Registered PF_VSOCK protocol family
qemu-system-x86_64: vhost_set_features failed: Operation not supported (95)
qemu-system-x86_64: Error starting vhost: 95
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 
# 

Steps to reproduce

  1. Clone git://passt.top/passt
  2. In passt/test, run make mbuto.img
  3. Run qemu-system-x86_64 -enable-kvm -m 2048 -kernel KERNEL -initrd mbuto.img -nographic -serial stdio -nodefaults -append "console=ttyS0" -device vhost-vsock-pci,guest-cid=31415,queue_reset=true replacing KERNEL with the host kernel image.

Additional information

  • Problem goes away if queue_reset=false, which means it goes away with default options prior to 69e1c14aa222 ("virtio: core: vq reset feature negotation support")
  • Occurs both with and without KVM
Edited by dgibson
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information