Kenneth Andresen
2008-Jul-05 07:54 UTC
[Xen-users] Uninitialized hardware under Xen Client?
Hello, I am currently running Centos 5.2 with Xen which by default is built without support such as Firewire citing system stability issues. Intending not to modify the original builds, I would like to know if a Xen client can use Firewire without it being supported by the host system? lspci is listing the firewire as: 07:03.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev c0) Even though detected, I would like to know if I can prevent the host system from directly using the Ethernet card and only allow direct access through a Xen client? The Ethernet card is: 00:19.0 Ethernet controller: Intel Corporation 82566DC-2 Gigabit Network Connection (rev 02) In the last setup, the idea is to let pfSense as a Xen client control the real hardware, and force all communication from the host as well as other clients to use virtual adapters. -- Best regards, Kenneth _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 05/07/2008 08:54, Kenneth Andresen wrote:> I would like to know if a > Xen client can use Firewire without it being supported by the host system? > > lspci is listing the firewire as: > 07:03.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host > Controller (rev c0)Yes, you can use pciback and pcifront to pass the device from dom0 into a domU, where you can install a different kernel that does support the device. the centos 5.2 xen kernels are built with pciback/pcifront, other distro xen kernels may vary. On the dom0, in /etc/modprobe.conf add this (beware of line-wrapping on the install line) options pciback hide=(0000:07:03.0) install XXXXXX /sbin/modprobe pciback ; /sbin/modprobe --first-time --ignore-install XXXXXX where XXXXXX is the driver which would normally load the device, essentially what it does is say where you''d normally load the driver for XXX, load pciback instead. If the dom0 kernel doesn''t have a driver for XXXXXX, then you can do it this way instead, but it will be required each boot so put it in /etc/rc.local or similar. modprobe pciback echo -n 0000:07:03.0 > /sys/bus/pci/drivers/pciback/new_slot echo -n 0000:07:03.0 > /sys/bus/pci/drivers/pciback/bind You will need to use the xmdomain.cfg style config file for your domU not a libvirt xml stykle config, you can then add the pci device with a line e.g pci = [''07:03.0''] When you boot the domU, it should the show the passthrough device with an lspci, and you can modprobe drivers for it if they aren''t done automatically You may need to use pollirq kernel parameter on dom0 if the device shares interrupts with other devices. You may need swoitlb parameters to xen itself, or domU kernel if it does DMA transfers. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 06/07/2008 09:59, Kenneth Andresen wrote:> I have been trying quite hard today to get the Xen working with some of > my live cd''s to test the PCI, but so far without any luck;It can be bit of a headache, while I have managed to get my TV tuner card almost working, the domU has a tendency to panic with one set of settings or the hardware doesn''t function properly with another set of settings (the swiotlb I was talking about)> I am > considering if my problems steam from having an Intel Quad Core rather > than AMD, and trying to run it using HVM rather than para-virtual.My machine is an intel quad core, so you''re OK on that front, but if your domU is HVM, then for PCI passthrough I believe you need to have intel VT-d (as well as VT-i) support in hardware and xen. I gather this should be supported by Q35/P45/X48 boards with chipsets and *might* be supported by some boards with X38 chipsets. Are you interested in windows domU as well as linux domU?> I have tried to use the virt-manager to create an initial xen install,virt-manager uses libvirt''s XML config files, which don''t have a way to add pci passthrough, you need the xmdomain.cfg format files.> name = "InsideSecurity" > memory = 512 > root = "/dev/hdc ro" > #root = "/dev/ram0 rw" > kernel = "/root/isolinux/vmlinuz" > #ramdisk = "/root/isolinux/miniroot.lz" > vcpus = 1 > vif = [ ''mac=00:01:01:01:01:01'' ] > disk = [ "file:/boot/iso/INSERT-1.3.9b_en.iso,hdc,r" ] > pci = [''07:03.0'']that''s the right format> However this fails with an the following error message: > > Error: (2, ''Invalid kernel'', ''xc_dom_find_loader: no loader found\n'')I''ve only used xen "the other way" with pygrub as the bootloader, so that the kernel is inside /dev/hdc and is extracted by the bootloader at boot time, for xen to initialise the domU.> While searching for information about my problems, I have come across > that it is generally seen as better to use Para virtualization rather > than hardware. Can para virtual work with unmodified linux client > kernels or default pfSense (BSD based), or will I have to use HVM for this?paravirt will probably get you better performance, but the domU kernel has to know that it is running under xen (it can either be a specific kernel built for xen, or a paravirt_ops kernel that can decide at boot time whether it is on xen, or bare-metal) with HVM the kernel believes it is running on bare-metal when it isn''t and xen/qemu provide the smoke and mirrors.> Will HVM work as intended with Intel Quad Core cpu the default > Redhat/Centos 5.2 kernel (kernel-xen-2.6.18-92.1.6.el5.x86_64) and Xen > 3.0.4 with their respective patches, or will I need to use modified > kernel / upgraded Xen version to 3.2?you''ll need the kernel-xen as the dom0, I''d be tempted to also use kernel-xen for the domU (paravirt) but you can also use normal kernel-2.6 for the domU (HVM) but I doubt you''ll get PCI passthrough. there is a third way, redhat recently release paravirt drivers for HVM kernels, not tried them though and I don''t think they''re "in" centos yet. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users