svn commit: r282865 - head/usr.sbin/bhyve
Peter Grehan
grehan at FreeBSD.org
Wed May 13 17:38:09 UTC 2015
Author: grehan
Date: Wed May 13 17:38:07 2015
New Revision: 282865
URL: https://svnweb.freebsd.org/changeset/base/282865
Log:
Set the subvendor field in config space to the vendor ID.
This is required by the Windows virtio drivers to correctly
match a device.
Submitted by: Leon Dang (ldang at nahannisys.com)
MFC after: 2 weeks
Modified:
head/usr.sbin/bhyve/pci_virtio_block.c
head/usr.sbin/bhyve/pci_virtio_net.c
head/usr.sbin/bhyve/pci_virtio_rnd.c
Modified: head/usr.sbin/bhyve/pci_virtio_block.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_block.c Wed May 13 16:02:55 2015 (r282864)
+++ head/usr.sbin/bhyve/pci_virtio_block.c Wed May 13 17:38:07 2015 (r282865)
@@ -370,6 +370,7 @@ pci_vtblk_init(struct vmctx *ctx, struct
pci_set_cfgdata16(pi, PCIR_VENDOR, VIRTIO_VENDOR);
pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_STORAGE);
pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_BLOCK);
+ pci_set_cfgdata16(pi, PCIR_SUBVEND_0, VIRTIO_VENDOR);
if (vi_intr_init(&sc->vbsc_vs, 1, fbsdrun_virtio_msix())) {
blockif_close(sc->bc);
Modified: head/usr.sbin/bhyve/pci_virtio_net.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_net.c Wed May 13 16:02:55 2015 (r282864)
+++ head/usr.sbin/bhyve/pci_virtio_net.c Wed May 13 17:38:07 2015 (r282865)
@@ -640,6 +640,7 @@ pci_vtnet_init(struct vmctx *ctx, struct
pci_set_cfgdata16(pi, PCIR_VENDOR, VIRTIO_VENDOR);
pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_NETWORK);
pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_NET);
+ pci_set_cfgdata16(pi, PCIR_SUBVEND_0, VIRTIO_VENDOR);
/* Link is up if we managed to open tap device. */
sc->vsc_config.status = (opts == NULL || sc->vsc_tapfd >= 0);
Modified: head/usr.sbin/bhyve/pci_virtio_rnd.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_rnd.c Wed May 13 16:02:55 2015 (r282864)
+++ head/usr.sbin/bhyve/pci_virtio_rnd.c Wed May 13 17:38:07 2015 (r282865)
@@ -170,6 +170,7 @@ pci_vtrnd_init(struct vmctx *ctx, struct
pci_set_cfgdata16(pi, PCIR_VENDOR, VIRTIO_VENDOR);
pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_CRYPTO);
pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_ENTROPY);
+ pci_set_cfgdata16(pi, PCIR_SUBVEND_0, VIRTIO_VENDOR);
if (vi_intr_init(&sc->vrsc_vs, 1, fbsdrun_virtio_msix()))
return (1);
More information about the svn-src-all
mailing list