Discussion:
vioif(4) vs. VirtualBox?
(too old to reply)
Valery Ushakov
2018-02-15 10:45:39 UTC
Permalink
Does anyone use vioif with vbox? With current amd64 and vbox trunk it
doesn't seem to work. I haven't yet tried other combinations of older
versions or i386, so if it works for someone, it will be a useful data
point.

As far as I can tell what happens is that the first control queue
reply from the host is missed. VBox writes the new index (1) for its
reply and triggers an interrupt, but netbsd in virtio_vq_intr() still
reads the old (0) value for vq->vq_used->idx and so it blocks in
vioif_ctrl_rx() waiting for sc_ctrl_wait.

This used to work. I last tested it about an year ago when lookig at
http://gnats.netbsd.org/51132

-uwe

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Valery Ushakov
2018-02-15 16:30:03 UTC
Permalink
Post by Valery Ushakov
As far as I can tell what happens is that the first control queue
reply from the host is missed. VBox writes the new index (1) for its
reply and triggers an interrupt, but netbsd in virtio_vq_intr() still
reads the old (0) value for vq->vq_used->idx and so it blocks in
vioif_ctrl_rx() waiting for sc_ctrl_wait.
This used to work. I last tested it about an year ago when lookig at
http://gnats.netbsd.org/51132
Turns out VBox no longer enables bus-master by default and our driver
never enables it b/c it's always been enabled by default.

qemu had similar fallout too:
http://lists.gnu.org/archive/html/qemu-devel/2014-09/msg02368.html

-uwe

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...