diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2021-09-03 14:04:36 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2021-09-03 14:04:36 +0000 |
commit | 75c7447bc1e19d0449c212df17ddbdbb0aa09adb (patch) | |
tree | 45cc6f738a589b306cc416c3ff35fb3012037226 /sys/dev/pci/virtio_pci.c | |
parent | 2ca3d484e3034a762f9bbecdd102bc5bd3202688 (diff) |
Make virtio(4) less restrictive on the type of BAR it supports for
legacy versions. The current version of Parallels on M1 seems to
not provide the I/O BAR that we expect, and reducing our expectations
seems to be help.
ok kettenis@
Diffstat (limited to 'sys/dev/pci/virtio_pci.c')
-rw-r--r-- | sys/dev/pci/virtio_pci.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/virtio_pci.c b/sys/dev/pci/virtio_pci.c index c99f50136cd..c3b1f2275b1 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.29 2021/06/12 13:08:30 kettenis Exp $ */ +/* $OpenBSD: virtio_pci.c,v 1.30 2021/09/03 14:04:35 patrick Exp $ */ /* $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */ /* @@ -508,7 +508,10 @@ int virtio_pci_attach_09(struct virtio_pci_softc *sc, struct pci_attach_args *pa) { struct virtio_softc *vsc = &sc->sc_sc; - if (pci_mapreg_map(pa, PCI_MAPREG_START, PCI_MAPREG_TYPE_IO, 0, + pcireg_t type; + + type = pci_mapreg_type(pa->pa_pc, pa->pa_tag, PCI_MAPREG_START); + if (pci_mapreg_map(pa, PCI_MAPREG_START, type, 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); return EIO; |