We wanted to add a "[virtual]" marker to all resources which are
known to the kernel, but not configured in the hardware. That is,
those where the BAR is all zero.
However, the test was never triggered for I/O regions, since their
BAR is never zero: it always has the region type bit set.
Now, we test only the address part of the BAR.
putchar('\t');
if (ioflg & PCI_IORESOURCE_PCI_EA_BEI)
printf("[enhanced] ");
- else if (pos && !flg) /* Reported by the OS, but not by the device */
+ else if (pos && !(flg & ((flg & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)))
{
+ /* Reported by the OS, but not by the device */
printf("[virtual] ");
flg = pos;
virtual = 1;