Here's a simple and obvious change that would be necessary to 
support virtio under bhyve. But it is only acceptable if other
virtio implementations either 1. don't claim to support MSI or
2. also work with MSI.

Index: virtio_pci.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/virtio_pci.c,v
retrieving revision 1.6
diff -u -r1.6 virtio_pci.c
--- virtio_pci.c        10 Mar 2013 21:58:02 -0000      1.6
+++ virtio_pci.c        18 Sep 2013 14:10:49 -0000
@@ -211,7 +211,7 @@
                goto fail_1;
        }
 
-       if (pci_intr_map(pa, &ih)) {
+       if (pci_intr_map_msi(pa, &ih) != 0 && pci_intr_map(pa, &ih) != 0) {
                printf("%s: couldn't map interrupt\n", vsc->sc_dev.dv_xname);
                goto fail_2;
        }

Reply via email to