This makes it possible to use MSI for virtual functions of Intel network
devices without having to specify the q35 machine.
QEMU is detected by testing for the Qumranet pci subsystem vendor id,
suggested by sf@. MSI previously wasn't enabled as 82441FX is in the list
of excluded devices.
Initial patch from Yuichiro NAITO. ok yasuoka@ sf@
-/* $OpenBSD: pci_machdep.c,v 1.87 2021/03/11 11:16:57 jsg Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.88 2024/10/10 06:00:42 jsg Exp $ */
/* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */
/*-
break;
}
+ /* Enable MSI for QEMU */
+ id = pci_conf_read(pc, tag, PCI_SUBSYS_ID_REG);
+ if (PCI_VENDOR(id) == PCI_VENDOR_QUMRANET)
+ pba->pba_flags |= PCI_FLAGS_MSI_ENABLED;
+
/*
* Don't enable MSI on a HyperTransport bus. In order to
* determine that bus 0 is a HyperTransport bus, we look at