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: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] PCI Passthru: fn0 exported but not fn1
From: Jambunathan K <jambunathan@xxxxxxxxxx>
Date: Mon, 27 Aug 2007 21:28:39 +0530
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Sanjeev Jorapur <sanjeev@xxxxxxxxxx>
Delivery-date: Mon, 27 Aug 2007 08:59:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C2F8AF13.CE9B%Keir.Fraser@xxxxxxxxxxxx>
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>
References: <C2F8AF13.CE9B%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)
Keir Fraser wrote:
> On 27/8/07 16:27, "Jambunathan K" <jambunathan@xxxxxxxxxx> wrote:
> 
>>>> For now I have reverted my working tree to Xen-304. I would appreciate
>>>> if you could provide a patch that addresses this issue in Xen310.
>>> What is the regression? That pcifront does not scan fn!=0 if fn==0 is empty?
>>>
>>>  -- Keir
>>>
>> Behaviorally speaking, I can export *just* fn1 on Xen304. But I can't
>> export *just* fn1 on Xen310.
>>
>> I am calling this difference in behaviour a regression.
> 
> You mean pciback doesn't let you, or do you mean it lets you but then
> pcifront doesn't pick it up because it has fn!=0? And if you force it to be
> renamed to have fn==0 then some assumption in your device driver is broken?
> I think you're a long way down a diagnosis path that I haven't followed...
> 
>  -- Keir
> 
> 
> 

Let me know whether you have the information that you are looking for in
the below logs. I want the lspci in Dom1 to report fn1 (assuming
BACKEND_PASS) which it is not.


About the Log:

In the Dom0 log below, we can see that pciback has grabbed the exported
device. xenstore-ls for both pci frontend and backend says that the
devices are connected. However lspci in Dom1 reports nothing. pcifront
is set in verbose mode and the assoicated log is also attached.


Dom-0 Log
---------

XEN-PROTO-SUSE $ xm list -l
(domain
    (domid 0)
    (on_crash restart)
    (uuid 00000000-0000-0000-0000-000000000000)
    (bootloader_args )
    (vcpus 2)
    (name Domain-0)
    (on_poweroff destroy)
    (on_reboot restart)
    (bootloader )
    (maxmem 16777215)
    (memory 1600)
    (shadow_memory 0)
    (cpu_weight 256)
    (cpu_cap 0)
    (features )
    (on_xend_start ignore)
    (on_xend_stop ignore)
    (cpu_time 32.145754358)
    (online_vcpus 2)
    (image (linux (kernel ) (rtc_timeoffset 0)))
    (status 2)
    (state r-----)
)
(domain
    (domid 1)
    (on_crash restart)
    (uuid 5a29bab8-7727-7c88-d67a-bda1e608d3b5)
    (bootloader_args )
    (vcpus 1)
    (name pvm-guest-1)
    (on_poweroff destroy)
    (on_reboot restart)
    (bootloader )
    (maxmem 1700)
    (memory 1700)
    (shadow_memory 0)
    (cpu_weight 256)
    (cpu_cap 0)
    (features )
    (on_xend_start ignore)
    (on_xend_stop ignore)
    (start_time 1187967780.47)
    (cpu_time 4.34765064)
    (online_vcpus 1)
    (image
        (linux
            (kernel /boot/xen310-debug/vmlinuz-2.6.18-xen-suse-xen)
            (ramdisk /boot/xen310-debug/initrd-2.6.18-xen-suse-xen.img)
            (args 'root=/dev/sda10 ro 3 noreboot
pcifront.verbose_request=1')
            (rtc_timeoffset 0)
            (notes
                (FEATURES

'writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'
                )
                (VIRT_BASE -2147483648)
                (GUEST_VERSION 2.6)
                (PADDR_OFFSET -2147483648)
                (GUEST_OS linux)
                (HYPERCALL_PAGE -2145361920)
                (LOADER generic)
                (SUSPEND_CANCEL 1)
                (ENTRY -2145386496)
                (XEN_VERSION xen-3.0)
            )
        )
    )
    (status 2)
    (state -b----)
    (store_mfn 1400196)
    (console_mfn 1400195)
    (device
        (vif
            (bridge xenbr0)
            (uuid 1b519334-bafb-404d-01f3-652edfde41cd)
            (script vif-bridge)
            (mac aa:cc:00:00:00:01)
            (type netfront)
            (backend 0)
        )
    )
    (device
        (vbd
            (uname phy:/dev/VolGroup00/LogVol01)
            (uuid 65202539-20ac-3dba-61fd-ea2028f1761a)
            (mode w)
            (dev /dev/sda10:disk)
            (backend 0)
            (bootable 1)
        )
    )
    (device
        (vbd
            (uname phy:/dev/VolGroup00/LogVol00)
            (uuid 613153fc-8b7f-2476-4929-f7dca3759d4c)
            (mode w)
            (dev /dev/sda11:disk)
            (backend 0)
            (bootable 0)
        )
    )
    (device
        (console
            (protocol vt100)
            (location 2)
            (uuid ed7260b4-1581-600c-7f1d-5a3b7f7e9eb8)
        )
    )
    (device
        (pci
            (dev (slot 0x00) (bus 0x04) (domain 0x0000) (func 0x01))
            (uuid 2d732f8d-ef9f-7ea5-11a0-6847129fde96)
            (backend 0)
        )
    )
)

XEN-PROTO-SUSE $ ls /sys/bus/pci/drivers/pciback/
0000:04:00.1  new_id    permissive  remove_slot  unbind
bind          new_slot  quirks      slots

XEN-PROTO-SUSE $ xenstore-ls /local/domain/0/backend/pci
1 = ""
 0 = ""
  domain = "pvm-guest-1"
  frontend = "/local/domain/1/device/pci/0"
  uuid = "2d732f8d-ef9f-7ea5-11a0-6847129fde96"
  dev-0 = "0000:04:00.01"
  state = "4"
  online = "1"
  frontend-id = "1"
  num_devs = "1"
  root-0 = "0000:04"
  root_num = "1"

XEN-PROTO-SUSE $ xenstore-ls /local/domain/1/device/pci/0
state = "4"
backend-id = "0"
backend = "/local/domain/0/backend/pci/1/0"
pci-op-ref = "8"
event-channel = "6"
magic = "7"

Dom-1 Log
---------

XEN-PROTO-RHEL $ dmesg | grep PCI
PCI: setting up Xen PCI frontend stub
PCI: System does not support PCI
PCI: System does not support PCI
pcifront pci-0: Installing PCI frontend
pcifront pci-0: Creating PCI Frontend Bus 0000:04
PCI: Scanning bus 0000:04
PCI: Fixups for bus 0000:04
PCI: Bus scan for 0000:04 returning with max=04


XEN-PROTO-RHEL $ dmesg | grep pcifront
Bootdata ok (command line is root=/dev/sda10 ro 3 noreboot
pcifront.verbose_request=1)
Kernel command line: root=/dev/sda10 ro 3 noreboot
pcifront.verbose_request=1
bus xen: add driver pcifront
xen: Matched Device pci-0 with Driver pcifront
pcifront pci-0: Allocated pdev @ 0xffff880001095c40 pdev->sh_info @
0xffff880000ca6000
pcifront pci-0: publishing successful!
bound device 'pci-0' to driver 'pcifront'
xen: Bound Device pci-0 to Driver pcifront
pcifront pci-0: Installing PCI frontend
pcifront pci-0: Creating PCI Frontend Bus 0000:04
pcifront pci-0: read dev=0000:04:00.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:01.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:02.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:03.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:04.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:05.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:06.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:07.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:08.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:09.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:0a.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:0b.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:0c.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:0d.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:0e.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:0f.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:10.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:11.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:12.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:13.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:14.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:15.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:16.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:17.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:18.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:19.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:1a.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:1b.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:1c.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:1d.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:1e.0 - offset 0 size 4
pcifront pci-0: read dev=0000:04:1f.0 - offset 0 size 4








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