Skip to contentSkip to conversation

VT-d: only scan secondary functions on multi-function devices

PATCH New Jan Beulich 1 participant 1 message Oct 29, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 VT-d: only scan secondary functions on multi-function devices

xen/drivers/passthrough/pci.c +4 -0
@@ -445,6 +445,10 @@ int __init scan_pci_devices(void)
                         spin_unlock(&pcidevs_lock);
                         return -EINVAL;
                 }
+
+                if ( !func && !(pci_conf_read8(bus, dev, func,
+                                               PCI_HEADER_TYPE) & 0x80) )
+                    break;
             }
         }
     }
xen/drivers/passthrough/pci.c +4 -0
@@ -445,6 +445,10 @@ int __init scan_pci_devices(void)
                         spin_unlock(&pcidevs_lock);
                         return -EINVAL;
                 }
+
+                if ( !func && !(pci_conf_read8(bus, dev, func,
+                                               PCI_HEADER_TYPE) & 0x80) )
+                    break;
             }
         }
     }

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel