diff --git a/sys/dev/virtio/balloon/virtio_balloon.c b/sys/dev/virtio/balloon/virtio_balloon.c --- a/sys/dev/virtio/balloon/virtio_balloon.c +++ b/sys/dev/virtio/balloon/virtio_balloon.c @@ -314,7 +314,7 @@ VQ_ALLOC_INFO_INIT(&vq_info[1], 0, vtballoon_vq_intr, sc, &sc->vtballoon_deflate_vq, "%s deflate", device_get_nameunit(dev)); - return (virtio_alloc_virtqueues(dev, 0, nvqs, vq_info)); + return (virtio_alloc_virtqueues(dev, nvqs, vq_info)); } static void diff --git a/sys/dev/virtio/block/virtio_blk.c b/sys/dev/virtio/block/virtio_blk.c --- a/sys/dev/virtio/block/virtio_blk.c +++ b/sys/dev/virtio/block/virtio_blk.c @@ -707,7 +707,7 @@ vtblk_vq_intr, sc, &sc->vtblk_vq, "%s request", device_get_nameunit(dev)); - return (virtio_alloc_virtqueues(dev, 0, 1, &vq_info)); + return (virtio_alloc_virtqueues(dev, 1, &vq_info)); } static void diff --git a/sys/dev/virtio/console/virtio_console.c b/sys/dev/virtio/console/virtio_console.c --- a/sys/dev/virtio/console/virtio_console.c +++ b/sys/dev/virtio/console/virtio_console.c @@ -543,7 +543,7 @@ portidx++; } - error = virtio_alloc_virtqueues(dev, 0, nvqs, info); + error = virtio_alloc_virtqueues(dev, nvqs, info); free(info, M_TEMP); return (error); diff --git a/sys/dev/virtio/gpu/virtio_gpu.c b/sys/dev/virtio/gpu/virtio_gpu.c --- a/sys/dev/virtio/gpu/virtio_gpu.c +++ b/sys/dev/virtio/gpu/virtio_gpu.c @@ -429,7 +429,7 @@ VQ_ALLOC_INFO_INIT(&vq_info[0], 0, NULL, sc, &sc->vtgpu_ctrl_vq, "%s control", device_get_nameunit(dev)); - return (virtio_alloc_virtqueues(dev, 0, nvqs, vq_info)); + return (virtio_alloc_virtqueues(dev, nvqs, vq_info)); } static int diff --git a/sys/dev/virtio/mmio/virtio_mmio.c b/sys/dev/virtio/mmio/virtio_mmio.c --- a/sys/dev/virtio/mmio/virtio_mmio.c +++ b/sys/dev/virtio/mmio/virtio_mmio.c @@ -76,7 +76,7 @@ static bool vtmmio_with_feature(device_t, uint64_t); static void vtmmio_set_virtqueue(struct vtmmio_softc *sc, struct virtqueue *vq, uint32_t size); -static int vtmmio_alloc_virtqueues(device_t, int, int, +static int vtmmio_alloc_virtqueues(device_t, int, struct vq_alloc_info *); static int vtmmio_setup_intr(device_t, enum intr_type); static void vtmmio_stop(device_t); @@ -537,7 +537,7 @@ } static int -vtmmio_alloc_virtqueues(device_t dev, int flags, int nvqs, +vtmmio_alloc_virtqueues(device_t dev, int nvqs, struct vq_alloc_info *vq_info) { struct vtmmio_virtqueue *vqx; diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -1018,10 +1018,9 @@ struct vq_alloc_info *info; struct vtnet_rxq *rxq; struct vtnet_txq *txq; - int i, idx, flags, nvqs, error; + int i, idx, nvqs, error; dev = sc->vtnet_dev; - flags = 0; nvqs = sc->vtnet_max_vq_pairs * 2; if (sc->vtnet_flags & VTNET_FLAG_CTRL_VQ) @@ -1059,14 +1058,7 @@ &sc->vtnet_ctrl_vq, "%s ctrl", device_get_nameunit(dev)); } - /* - * TODO: Enable interrupt binding if this is multiqueue. This will - * only matter when per-virtqueue MSIX is available. - */ - if (sc->vtnet_flags & VTNET_FLAG_MQ) - flags |= 0; - - error = virtio_alloc_virtqueues(dev, flags, nvqs, info); + error = virtio_alloc_virtqueues(dev, nvqs, info); free(info, M_TEMP); return (error); diff --git a/sys/dev/virtio/pci/virtio_pci.h b/sys/dev/virtio/pci/virtio_pci.h --- a/sys/dev/virtio/pci/virtio_pci.h +++ b/sys/dev/virtio/pci/virtio_pci.h @@ -122,7 +122,7 @@ int vtpci_read_ivar(struct vtpci_common *cn, int index, uintptr_t *result); int vtpci_write_ivar(struct vtpci_common *cn, int index, uintptr_t value); -int vtpci_alloc_virtqueues(struct vtpci_common *cn, int flags, int nvqs, +int vtpci_alloc_virtqueues(struct vtpci_common *cn, int nvqs, struct vq_alloc_info *vq_info); int vtpci_setup_interrupts(struct vtpci_common *cn, enum intr_type type); void vtpci_release_child_resources(struct vtpci_common *cn); diff --git a/sys/dev/virtio/pci/virtio_pci.c b/sys/dev/virtio/pci/virtio_pci.c --- a/sys/dev/virtio/pci/virtio_pci.c +++ b/sys/dev/virtio/pci/virtio_pci.c @@ -324,7 +324,7 @@ } int -vtpci_alloc_virtqueues(struct vtpci_common *cn, int flags, int nvqs, +vtpci_alloc_virtqueues(struct vtpci_common *cn, int nvqs, struct vq_alloc_info *vq_info) { device_t dev; diff --git a/sys/dev/virtio/pci/virtio_pci_legacy.c b/sys/dev/virtio/pci/virtio_pci_legacy.c --- a/sys/dev/virtio/pci/virtio_pci_legacy.c +++ b/sys/dev/virtio/pci/virtio_pci_legacy.c @@ -87,7 +87,7 @@ static uint64_t vtpci_legacy_negotiate_features(device_t, uint64_t); static bool vtpci_legacy_with_feature(device_t, uint64_t); -static int vtpci_legacy_alloc_virtqueues(device_t, int, int, +static int vtpci_legacy_alloc_virtqueues(device_t, int, struct vq_alloc_info *); static int vtpci_legacy_setup_interrupts(device_t, enum intr_type); static void vtpci_legacy_stop(device_t); @@ -390,7 +390,7 @@ } static int -vtpci_legacy_alloc_virtqueues(device_t dev, int flags, int nvqs, +vtpci_legacy_alloc_virtqueues(device_t dev, int nvqs, struct vq_alloc_info *vq_info) { struct vtpci_legacy_softc *sc; @@ -399,7 +399,7 @@ sc = device_get_softc(dev); cn = &sc->vtpci_common; - return (vtpci_alloc_virtqueues(cn, flags, nvqs, vq_info)); + return (vtpci_alloc_virtqueues(cn, nvqs, vq_info)); } static int diff --git a/sys/dev/virtio/pci/virtio_pci_modern.c b/sys/dev/virtio/pci/virtio_pci_modern.c --- a/sys/dev/virtio/pci/virtio_pci_modern.c +++ b/sys/dev/virtio/pci/virtio_pci_modern.c @@ -112,7 +112,7 @@ static uint64_t vtpci_modern_negotiate_features(device_t, uint64_t); static int vtpci_modern_finalize_features(device_t); static bool vtpci_modern_with_feature(device_t, uint64_t); -static int vtpci_modern_alloc_virtqueues(device_t, int, int, +static int vtpci_modern_alloc_virtqueues(device_t, int, struct vq_alloc_info *); static int vtpci_modern_setup_interrupts(device_t, enum intr_type); static void vtpci_modern_stop(device_t); @@ -507,7 +507,7 @@ } static int -vtpci_modern_alloc_virtqueues(device_t dev, int flags, int nvqs, +vtpci_modern_alloc_virtqueues(device_t dev, int nvqs, struct vq_alloc_info *vq_info) { struct vtpci_modern_softc *sc; @@ -524,7 +524,7 @@ return (E2BIG); } - return (vtpci_alloc_virtqueues(cn, flags, nvqs, vq_info)); + return (vtpci_alloc_virtqueues(cn, nvqs, vq_info)); } static int diff --git a/sys/dev/virtio/random/virtio_random.c b/sys/dev/virtio/random/virtio_random.c --- a/sys/dev/virtio/random/virtio_random.c +++ b/sys/dev/virtio/random/virtio_random.c @@ -265,7 +265,7 @@ VQ_ALLOC_INFO_INIT(&vq_info, 0, NULL, sc, &sc->vtrnd_vq, "%s request", device_get_nameunit(dev)); - return (virtio_alloc_virtqueues(dev, 0, 1, &vq_info)); + return (virtio_alloc_virtqueues(dev, 1, &vq_info)); } static void diff --git a/sys/dev/virtio/scsi/virtio_scsi.c b/sys/dev/virtio/scsi/virtio_scsi.c --- a/sys/dev/virtio/scsi/virtio_scsi.c +++ b/sys/dev/virtio/scsi/virtio_scsi.c @@ -504,7 +504,7 @@ vtscsi_request_vq_intr, sc, &sc->vtscsi_request_vq, "%s request", device_get_nameunit(dev)); - return (virtio_alloc_virtqueues(dev, 0, nvqs, vq_info)); + return (virtio_alloc_virtqueues(dev, nvqs, vq_info)); } static void diff --git a/sys/dev/virtio/virtio.h b/sys/dev/virtio/virtio.h --- a/sys/dev/virtio/virtio.h +++ b/sys/dev/virtio/virtio.h @@ -103,7 +103,7 @@ void virtio_write_ivar(device_t dev, int ivar, uintptr_t val); uint64_t virtio_negotiate_features(device_t dev, uint64_t child_features); int virtio_finalize_features(device_t dev); -int virtio_alloc_virtqueues(device_t dev, int flags, int nvqs, +int virtio_alloc_virtqueues(device_t dev, int nvqs, struct vq_alloc_info *info); int virtio_setup_intr(device_t dev, enum intr_type type); bool virtio_with_feature(device_t dev, uint64_t feature); diff --git a/sys/dev/virtio/virtio.c b/sys/dev/virtio/virtio.c --- a/sys/dev/virtio/virtio.c +++ b/sys/dev/virtio/virtio.c @@ -260,12 +260,11 @@ } int -virtio_alloc_virtqueues(device_t dev, int flags, int nvqs, +virtio_alloc_virtqueues(device_t dev, int nvqs, struct vq_alloc_info *info) { - return (VIRTIO_BUS_ALLOC_VIRTQUEUES(device_get_parent(dev), flags, - nvqs, info)); + return (VIRTIO_BUS_ALLOC_VIRTQUEUES(device_get_parent(dev), nvqs, info)); } int diff --git a/sys/dev/virtio/virtio_bus_if.m b/sys/dev/virtio/virtio_bus_if.m --- a/sys/dev/virtio/virtio_bus_if.m +++ b/sys/dev/virtio/virtio_bus_if.m @@ -63,7 +63,6 @@ METHOD int alloc_virtqueues { device_t dev; - int flags; int nvqs; struct vq_alloc_info *info; };