vhost-device icon indicating copy to clipboard operation
vhost-device copied to clipboard

vhost on macOS?

Open bradjc opened this issue 7 months ago • 2 comments

I'm interested in using vhost peripherals (specifically GPIO) with a QEMU-based RISC-V board in a way that is cross-platform. My understanding based on trying to run QEMU with vhost-user-i2c-pci is support for vhost in QEMU (and this repo) is Linux-only. First, is that correct? Second, if so, is there any effort/discussion/plan to support vhost on macOS?

For more on my intended use case, we are developing Tock, and OS for embedded devices. While we prefer to run on physical hardware, for demos and tutorials it is helpful to be able to run on a QEMU board. We have a RISC-V QEMU based board (https://github.com/tock/tock/tree/master/boards/qemu_rv32_virt), but to make tutorials interactive we would like to add virtual LED support (via GPIOs) and potentially a virtual sensor over I2C. However, we need the tutorial to be cross-platform because different users have different machines.

Thanks for your help.

bradjc avatar Jul 30 '25 18:07 bradjc

We covered a bit of the current status this year at FOSDEM: https://fosdem.org/2025/schedule/event/fosdem-2025-5100-can-qemu-and-vhost-user-devices-be-used-on-macos-and-bsd-/

About rust-vmm crates (vhost, vhost-device, etc.) we are working to support vhost-user on macOS/BSD. @uran0sH is doing this for his GSoC project, some PRs related to that effort:

  • https://github.com/rust-vmm/vmm-sys-util/pull/244
  • https://github.com/rust-vmm/vmm-sys-util/pull/245
  • https://github.com/rust-vmm/vhost/pull/308

About RISC-V @RuoqingHe is our expert on that :-)

stefano-garzarella avatar Jul 31 '25 08:07 stefano-garzarella

Amazing, thank you for sending the updates.

Links to issues/PRs from the slides for others to discover and maybe find while searching:

  • QEMU version on macOS: https://gitlab.com/sgarzarella/qemu/-/tree/macos-vhost-user
  • https://github.com/rust-vmm/vhost/issues/110
  • https://github.com/rust-vmm/vhost/issues/279
  • https://gitlab.com/virtio-fs/virtiofsd/-/issues/169

bradjc avatar Jul 31 '25 16:07 bradjc