Date: Mon, 22 Jun 2015 12:26:06 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: "freebsd-virtualization@freebsd.org" <freebsd-virtualization@FreeBSD.org> Subject: header type for bhyve host-pci bridge Message-ID: <5587D4AE.3050508@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
diff --git a/usr.sbin/bhyve/pci_hostbridge.c b/usr.sbin/bhyve/pci_hostbridge.c index 54a25ae..5c9ea28 100644 --- a/usr.sbin/bhyve/pci_hostbridge.c +++ b/usr.sbin/bhyve/pci_hostbridge.c @@ -38,7 +38,7 @@ pci_hostbridge_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) /* config space */ pci_set_cfgdata16(pi, PCIR_VENDOR, 0x1275); /* NetApp */ pci_set_cfgdata16(pi, PCIR_DEVICE, 0x1275); /* NetApp */ - pci_set_cfgdata8(pi, PCIR_HDRTYPE, PCIM_HDRTYPE_BRIDGE); + pci_set_cfgdata8(pi, PCIR_HDRTYPE, PCIM_HDRTYPE_NORMAL); pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_BRIDGE); pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_BRIDGE_HOST); It seems that the normal header type is expected for a Host-PCI bridge. I see that on real hardware. Also, Linux complains about the current header type: pci 0000:00:00.0: ignoring class 0x060000 (doesn't match header type 01) pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring pci 0000:00:00.0: can't allocate child bus 00 from [bus 00] Same with lspci: $ lspci -v 00:00.0 Non-VGA unclassified device: Network Appliance Corporation Device 1275 !!! Invalid class 0000 for header type 01 Flags: bus master, fast devsel, latency 0 Bus: primary=00, secondary=00, subordinate=00, sec-latency=0 I/O behind bridge: 00000000-00000fff Memory behind bridge: 00000000-000fffff Prefetchable memory behind bridge: 00000000-000fffff Capabilities: [40] Express Root Port (Slot-), MSI 00 I think that PCIM_HDRTYPE_BRIDGE is for PCI-PCI bridges. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5587D4AE.3050508>