The pci-info crate provides a simple API to enumerate PCI devices across desktop/server operating systems, or to parse PCI headers from files or memory buffers.
I’m encountering an error while running the example that enumerates PCI devices on Linux Ubuntu, running in a Multipass instance on macOS Ventura (M2).
The error returned is:
pci bus enumeration error: error while parsing value: bus ID is invalid hex: '0000:00'
The output of lspci is the following:
00:00.0 Host bridge: Red Hat, Inc. QEMU PCIe Host bridge
Subsystem: Red Hat, Inc. QEMU PCIe Host bridge
Flags: fast devsel
00:01.0 Ethernet controller: Red Hat, Inc. Virtio network device
Subsystem: Red Hat, Inc. Virtio network device
Flags: bus master, fast devsel, latency 0, IRQ 46
I/O ports at 10c0 [size=32]
Memory at 10040000 (64-bit, prefetchable) [size=16K]
Expansion ROM at 10000000 [disabled] [size=256K]
Capabilities: <access denied>
Kernel driver in use: virtio-pci
00:02.0 SCSI storage controller: Red Hat, Inc. Virtio SCSI
Subsystem: Red Hat, Inc. Virtio SCSI
Flags: bus master, fast devsel, latency 0, IRQ 47
I/O ports at 1080 [size=64]
Memory at 1004c000 (32-bit, non-prefetchable) [size=4K]
Memory at 10044000 (64-bit, prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: virtio-pci
00:03.0 SCSI storage controller: Red Hat, Inc. Virtio block device
Subsystem: Red Hat, Inc. Virtio block device
Flags: bus master, fast devsel, latency 0, IRQ 48
I/O ports at 1000 [size=128]
Memory at 1004d000 (32-bit, non-prefetchable) [size=4K]
Memory at 10048000 (64-bit, prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: virtio-pci
Please let me know if you need any additional details.
I’m encountering an error while running the example that enumerates PCI devices on Linux Ubuntu, running in a Multipass instance on macOS Ventura (M2).
The error returned is:
pci bus enumeration error: error while parsing value: bus ID is invalid hex: '0000:00'
The output of lspci is the following:
Please let me know if you need any additional details.