Module Name: src Committed By: msaitoh Date: Thu Feb 9 03:38:01 UTC 2017
Modified Files: src/sys/arch/x86/pci: pci_machdep.c Log Message: Supress verbose message "This pci host supports neither MSI nor MSI-X." on VMware and KVM. OK'd by k-nakahara. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/arch/x86/pci/pci_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/pci/pci_machdep.c diff -u src/sys/arch/x86/pci/pci_machdep.c:1.76 src/sys/arch/x86/pci/pci_machdep.c:1.77 --- src/sys/arch/x86/pci/pci_machdep.c:1.76 Thu Aug 25 12:21:21 2016 +++ src/sys/arch/x86/pci/pci_machdep.c Thu Feb 9 03:38:01 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.76 2016/08/25 12:21:21 nonaka Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.77 2017/02/09 03:38:01 msaitoh Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.76 2016/08/25 12:21:21 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.77 2017/02/09 03:38:01 msaitoh Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -483,7 +483,12 @@ pci_attach_hook(device_t parent, device_ PCI_SUBCLASS(class) != PCI_SUBCLASS_BRIDGE_HOST) return; - if (pci_has_msi_quirk(id, PCI_QUIRK_DISABLE_MSI)) { + /* VMware and KVM use old chipset, but they can use MSI/MSI-X */ + if ((cpu_feature[1] & CPUID2_RAZ) + && (pci_has_msi_quirk(id, PCI_QUIRK_ENABLE_MSI_VM))) { + pba->pba_flags |= PCI_FLAGS_MSI_OKAY; + pba->pba_flags |= PCI_FLAGS_MSIX_OKAY; + } else if (pci_has_msi_quirk(id, PCI_QUIRK_DISABLE_MSI)) { pba->pba_flags &= ~PCI_FLAGS_MSI_OKAY; pba->pba_flags &= ~PCI_FLAGS_MSIX_OKAY; aprint_verbose("\n"); @@ -500,14 +505,6 @@ pci_attach_hook(device_t parent, device_ pba->pba_flags |= PCI_FLAGS_MSIX_OKAY; } - /* VMware and KVM use old chipset, but they can use MSI/MSI-X */ - if (cpu_feature[1] & CPUID2_RAZ) { - if (pci_has_msi_quirk(id, PCI_QUIRK_ENABLE_MSI_VM)) { - pba->pba_flags |= PCI_FLAGS_MSI_OKAY; - pba->pba_flags |= PCI_FLAGS_MSIX_OKAY; - } - } - /* * Don't enable MSI on a HyperTransport bus. In order to * determine that bus 0 is a HyperTransport bus, we look at