diff options
author | Stefan Fritsch <sf@cvs.openbsd.org> | 2016-07-19 02:51:10 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@cvs.openbsd.org> | 2016-07-19 02:51:10 +0000 |
commit | 5e4547689346b7ce4a6ab2a0e6d1d45c43504ff9 (patch) | |
tree | 0ff3f6167b2ec10d191925fa91234b6c90c4fbc5 /sys | |
parent | ad1246e559671cc6fb4284a6ad4ec054f0560ac2 (diff) |
virtio_pci: Always allow MSI/MSI-X
For virtio devices, ignore the black/white-listing depending on the PCI
bridge. This enables MSI-X with qemu's old "82441FX" pci-bridge.
Suggested by kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/virtio_pci.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/virtio_pci.c b/sys/dev/pci/virtio_pci.c index c35dd7f1262..fbd5a38ea73 100644 --- a/sys/dev/pci/virtio_pci.c +++ b/sys/dev/pci/virtio_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: virtio_pci.c,v 1.14 2016/07/16 12:07:21 sf Exp $ */ +/* $OpenBSD: virtio_pci.c,v 1.15 2016/07/19 02:51:09 sf Exp $ */ /* $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */ /* @@ -213,6 +213,12 @@ virtio_pci_attach(struct device *parent, struct device *self, void *aux) sc->sc_config_offset = VIRTIO_CONFIG_DEVICE_CONFIG_NOMSI; sc->sc_irq_type = IRQ_NO_MSIX; + /* + * For virtio, ignore normal MSI black/white-listing depending on the + * PCI bridge but enable it unconditionally. + */ + pa->pa_flags |= PCI_FLAGS_MSI_ENABLED; + if (pci_mapreg_map(pa, PCI_MAPREG_START, PCI_MAPREG_TYPE_IO, 0, &sc->sc_iot, &sc->sc_ioh, NULL, &sc->sc_iosize, 0)) { printf("%s: can't map i/o space\n", vsc->sc_dev.dv_xname); |