From 5e4547689346b7ce4a6ab2a0e6d1d45c43504ff9 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Tue, 19 Jul 2016 02:51:10 +0000 Subject: 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@ --- sys/dev/pci/virtio_pci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sys') 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); -- cgit v1.2.3