From: "Jan Beulich" Subject: [PATCH] VT-d: only scan secondary functions on multi-function devices Date: Fri, 29 Oct 2010 16:41:42 +0100 Message-ID: <4CCB07560200007800020071@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part230EA826.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part230EA826.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Signed-off-by: Jan Beulich --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -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; } } } --=__Part230EA826.0__= Content-Type: text/plain; name="pci-scan-single-func.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="pci-scan-single-func.patch" Signed-off-by: Jan Beulich =0A=0A--- a/xen/drivers/pas= sthrough/pci.c=0A+++ b/xen/drivers/passthrough/pci.c=0A@@ -445,6 +445,10 = @@ int __init scan_pci_devices(void)=0A spin_unlock= (&pcidevs_lock);=0A return -EINVAL;=0A = }=0A+=0A+ if ( !func && !(pci_conf_read8(bus, dev, = func,=0A+ PCI_HEADER_TYPE) & = 0x80) )=0A+ break;=0A }=0A }=0A = }=0A --=__Part230EA826.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part230EA826.0__=--