WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] PCI Passthru: fn0 exported but not fn1

To: Jambunathan K <jambunathan@xxxxxxxxxx>
Subject: Re: [Xen-devel] PCI Passthru: fn0 exported but not fn1
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Wed, 29 Aug 2007 15:26:41 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefan Neuwirth <neuwirt-xen-devel@xxxxxxxxxxxxxxxxxxxxxx>, Sanjeev Jorapur <sanjeev@xxxxxxxxxx>
Delivery-date: Wed, 29 Aug 2007 07:27:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <46D58037.7010007@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcfqSJ3W3GrS5VY7EdyVXAAX8io7RQ==
Thread-topic: [Xen-devel] PCI Passthru: fn0 exported but not fn1
User-agent: Microsoft-Entourage/11.3.6.070618
On 29/8/07 15:18, "Jambunathan K" <jambunathan@xxxxxxxxxx> wrote:

> Just to be sure I 'fixed'
> linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h and  made a
> clean build from xen source tar. I ensured that BACKEND_PASS is set to yes.
> 
> I am using the same vmlinuz both on Dom0 and Dom1. I am seeing that
> lspci in Dom1 *doesn't* report the exported non-zero function.

Very odd. The tracing you provide clearly shows that the kernel is *not*
scanning every fn. It is only scanning every fn==0.

The function of interest here is, I think,
linux/drivers/pci/probe.c:pci_scan_slot(). Notice how it iterates on every
fn but bails early if no device is found at fn 0 and !scan_all_fns. I
suggest you add some tracing to that function to check that:
 A. It is being called; and
 B. Exactly how it is bailing without checking fns != 0, if it ireally is
the case that scan_all_fns==1.

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel