[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] PCI Passthru: fn0 exported but not fn1
Keir Fraser wrote: >> As I worte accidently direct to Keir and not to the list, I face the >> same problem. I'd like to have option 1, because it worked fine and I >> don't see a benefit of having a dummy device in the domU. >> >> Dedecating single fnX to a domain is very usefull for example to give >> the domUs ethernets of a four port card. I'm also running one domU >> that is only using one of the USB 1.x controllers of a USB PCI addon >> card. > > Okay, if you want to check out the 'fix' to revert behaviour to that of > 3.0.4 for yourselves, it is to edit > linux/include/asm-i386/mach-xen/asm/pci.h and to change the definition > therein of pcibios_scan_all_fns() from 0 to 1. > > If you are building a 64-bit kernel then of course it is the file in > include/asm-x86_64 that you need to edit. > > Make that change and rebuild you domU. Additionally, make sure you build > dom0 with pciback in passthrough mode. Hopefully your problems will be gone! I am using x86_64. 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. XEN-PROTO-SUSE $ cat linux-2.6.18-xen/include/asm-x86_64/mach-xen/asm/pci.h | grep scan /* Can be used to override the logic in pci_scan_bus for skipping #define pcibios_scan_all_fns(a, b) 1 struct pci_bus * pcibios_scan_root(int bus); XEN-PROTO-SUSE $ cat linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h | grep scan /* Can be used to override the logic in pci_scan_bus for skipping #define pcibios_scan_all_fns(a, b) 1 struct pci_bus * pcibios_scan_root(int bus); XEN-PROTO-SUSE $ uname -a Linux xen2 2.6.18-xen-310-new-xen #2 SMP Wed Aug 29 08:44:29 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux XEN-PROTO-RHEL $ dmesg | grep pcifront Bootdata ok (command line is root=/dev/sda10 pcifront.verbose_request=1) Kernel command line: root=/dev/sda10 pcifront.verbose_request=1 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-PROTO-SUSE $ xenstore-ls /local/domain/0/backend/pci 13 = "" 0 = "" domain = "pvm-guest-1" frontend = "/local/domain/13/device/pci/0" uuid = "e294e348-fc0a-9bf1-fcf9-93f9665505bd" dev-0 = "0000:04:00.01" state = "4" online = "1" frontend-id = "13" num_devs = "1" root-0 = "0000:04" root_num = "1" XEN-PROTO-SUSE $ xenstore-ls /local/domain/13/device/pci 0 = "" state = "4" backend-id = "0" backend = "/local/domain/0/backend/pci/13/0" pci-op-ref = "8" event-channel = "6" magic = "7" XEN-PROTO-SUSE $ xm list --long (domain (domid 0) (on_crash restart) (uuid 00000000-0000-0000-0000-000000000000) (bootloader_args ) (vcpus 8) (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 301.173107752) (online_vcpus 8) (image (linux (kernel ) (rtc_timeoffset 0))) (status 2) (state r-----) ) (domain (domid 13) (on_crash restart) (uuid 0b2b804f-e5ed-f046-ae7e-819037019c21) (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 1188396494.65) (cpu_time 7.201405283) (online_vcpus 1) (image (linux (kernel /boot/xen310-new/vmlinuz-2.6.18-xen-310-new-xen) (ramdisk /boot/xen310-new/initrd-2.6.18-xen-310-new-xen.img) (args 'root=/dev/sda10 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 1400305) (console_mfn 1400304) (device (vif (bridge xenbr0) (uuid 65d1b021-70ff-d673-d59c-15a1432edfd4) (script vif-bridge) (mac aa:cc:00:00:00:01) (type netfront) (backend 0) ) ) (device (vbd (uname phy:VolGroup00/LogVol01) (uuid f1abc318-00cf-8d70-4a98-7b6b3c8e7630) (mode w) (dev sda10:disk) (backend 0) (bootable 1) ) ) (device (vbd (uname phy:VolGroup00/LogVol00) (uuid 04fb2c99-e334-5efe-40e5-8fba96340f74) (mode w) (dev sda11:disk) (backend 0) (bootable 0) ) ) (device (console (protocol vt100) (location 2) (uuid 42e6c974-c273-7225-edf3-1812c2410fd1) ) ) (device (pci (dev (slot 0x00) (bus 0x04) (domain 0x0000) (func 0x01)) (uuid e294e348-fc0a-9bf1-fcf9-93f9665505bd) (backend 0) ) ) ) Regards, Jambunathan K. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |