Wolfgang Schleicher
2006-Aug-17 09:39 UTC
[Xen-users] How to enable pciback.hide in standard xen 3.0.2 kernels
Or how to delegate special PCI devices from domain-0 to dom(u) Hi, I tried to manage some pci devices for dom(u) domains, using the fedora core 5 (xen0/u) and 6-test2 (xen) i686 kernel-xen and kernel-xen-devel rpms: In domain-0 lspci shows the pci device 00:04.01 which should be delegated to dom(u) In dom(u) lspci does not show any information (this seems to be ok) lsmod in dom(u) gives: xennet ipv6 dm_mirror dm_mod parport_pc lp parport pcspkr ext3 jbd xenblk Following the official XEN Documentation, I modified the grub.conf with the following kernel option: "module /vmlinuz-2.6.17-1.2566.fc6xen ro root=LABEL=/1 selinux=0 rhgb quiet pciback.hide=(00:08.0)" or "module /vmlinuz-2.6.17-1.2566.fc6xen ro root=LABEL=/1 selinux=0 rhgb quiet pciback.hide=(0000:00:08.0)" After having booted into Domain-0, I noticed in the message log: "kernel: Kernel command line: ro root=LABEL=/1 selinux=0 rhgb quiet pciback.hide=(00:08.0)" "kernel: Unknown boot option `pciback.hide=(00:08.0)'': ignoring" So this kernel option does not seem to be supported by default. Btw, I also tried the xen-binaries packages (the testing ones) from xensource with the same results Adding the pci option to /etc/xen/config-file "pci = [ ''0000:00:08.0'' ]" or "pci = [ ''00:08.0'' ]" or "pci = [ ''00,08,00'' ]" and trying to start the guest domain fails: "Error: pci: failed to locate device and parse itŽs ressources - [Errno 2] No such file or directory: ''/sys/bus/pci/devices/0000:00:08.0/driver'' " I donŽt understand why the pci backend option is not included as a default kernel option and I wonder why this kernel option (slots) is mentioned in nearly every xen documentation (I know this option was missed in xen 3.0.0/3.0.1) I would like prefer the latest fc6-t2 kernel packages as there seems to be no longer smaller xenU kernels which might give a better support when trying to compile different kernel modules (e.g. avm fritzcard). What I did (Hardware x86, PIII) I downloaded the latest fedora core 6t2 src.rpm kernel-packages and tried to rebuild but was unsecure [e.g. marked with (?)] about the correct kernel-xen options. Then I would do the following: -install fedora-buildrpmtree -install kernel-2.6.17-1.2564.fc6.src.rpm -switching to non root user: -rpmbuild -bp --target i686 ~/rpmbuild/SPECS/kernel-2.6.spec -cd ~/rpmbuild/BUILD/kernel-2.6.17/linux-2.6.17.i686/ -make mrproper -cp ~/rpmbuild/SOURCES/kernel-2.6.17-i686.config .config -make oldconfig -cd ~/rpmbuild/BUILD/kernel-2.6.17/linux-2.6.17 -vi Makefile: change EXTRAVERSION = -1.2566.fc6xen to EXTRAVERSION = -1.2566.fc6xen-wsc #make menuconfig (not working for me) - make xconfig #make config (accepting all settings) ## #not sure about this, having red this in another FC kernel-howto# -echo >config.fix "# i386" -cat .config >>config.fix -cp -f config.fix ~/rpmbuild/SOURCES/kernel-2.6.17-i686.config ## -rpmbuild --target i686 -ba ~/rpmbuild/SPECS/kernel-2.6.spec Before doing the steps as listed above, I`m not sure what different settings should be used for a new kernel-built. Current (orginal default FC6t2) kernel-xen config file: /usr/src/kernels/2.6.17-1.2566.fc6-xen-i686/build/.config ... # XEN # CONFIG_XEN_PRIVILEGED_GUEST=y # CONFIG_XEN_UNPRIVILEGED_GUEST is not set CONFIG_XEN_PRIVCMD=y (?) CONFIG_XEN_XENBUS_DEV=y CONFIG_XEN_BACKEND=y CONFIG_XEN_BLKDEV_BACKEND=m CONFIG_XEN_BLKDEV_TAP=m CONFIG_XEN_NETDEV_BACKEND=m # CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER is not set CONFIG_XEN_NETDEV_LOOPBACK=m CONFIG_XEN_PCIDEV_BACKEND=m (?) CONFIG_XEN_PCIDEV_BACKEND_VPCI=y # CONFIG_XEN_PCIDEV_BACKEND_PASS is not set (?) # CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set (?) # CONFIG_XEN_PCIDEV_BE_DEBUG is not set # CONFIG_XEN_TPMDEV_BACKEND is not set CONFIG_XEN_BLKDEV_FRONTEND=m CONFIG_XEN_NETDEV_FRONTEND=m CONFIG_XEN_FRAMEBUFFER=m CONFIG_XEN_KEYBOARD=m CONFIG_XEN_SCRUB_PAGES=y # CONFIG_XEN_DISABLE_SERIAL is not set CONFIG_XEN_SYSFS=y CONFIG_XEN_COMPAT_030002_AND_LATER=y # CONFIG_XEN_COMPAT_LATEST_ONLY is not set CONFIG_XEN_COMPAT_030002=y CONFIG_HAVE_ARCH_ALLOC_SKB=y CONFIG_HAVE_ARCH_DEV_ALLOC_SKB=y CONFIG_HAVE_IRQ_IGNORE_UNHANDLED=y CONFIG_NO_IDLE_HZ=y CONFIG_XEN_UTIL=y CONFIG_XEN_BALLOON=y CONFIG_XEN_DEVMEM=y CONFIG_XEN_SKBUFF=y CONFIG_XEN_REBOOT=y CONFIG_XEN_SMPBOOT=y ... Please, can anyone provide a detailed "rebuilding kernel-xen" tutorial, regarding the relevant xen options for the pci backend/pci frontend settings? Anyone to point me to location where pci backend precompiled fedora kernel-xen packages are provided? Any help would be appreciated! Thanks Wolfgang _____________________________________________________________________ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=100071&distributionid=000000000071 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Duncan Gibb
2006-Aug-17 11:30 UTC
Re: [Xen-users] How to enable pciback.hide in standard xen 3.0.2 kernels
On Thu, 2006-08-17 at 11:39 +0200, Wolfgang Schleicher wrote: WS> I tried to manage some pci devices for dom(u) domains, using WS> the fedora core 5 (xen0/u) and 6-test2 (xen) i686 kernel-xen WS> and kernel-xen-devel rpms: WS>> "kernel: Unknown boot option `pciback.hide=(00:08.0)'': ignoring" WS>> CONFIG_XEN_PCIDEV_BACKEND=m (?) You have the pci backend driver as a module, so you will need to load this into the Dom0 kernel before you start your DomU. # modprobe pciback hide=(00:08.0) should work, or you can add pciback hide=(00:08.0) to /etc/modules to load it automatically at boot. You may find that another driver in the Dom0 has already attached to the device before pciback loads, in which case you will need to unload it or uninstall/sabotage/blacklist the driver in question. WS> Please, can anyone provide a detailed "rebuilding kernel-xen" WS> tutorial, regarding the relevant xen options for the pci WS> backend/pci frontend settings? The README file in the Xen source distribution has info on how to do this, and the Makefile there is very intelligent. It is however targeted at installing the built kernel on the local host or wrapping up a Xen dist tarball. Both Xen and other people distribute RPMs, though, so there must be rpm scripts in existence; have a look for the SRPMs matching the package you already have. Duncan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users