Nick S Kanakakorn
2008-Sep-09 06:42 UTC
[Xen-users] pci passthrough question. Do I need VT-D ?
Hi, I really need help. I spent 2 days already on this pci passthrough thing. I''m using Xen 3.2.1 with Centos 5.2 64 bits on intel VT. I''d like to use PCI passthrough and I don''t think I need VT-D functionality. I''m trying to pass PCI 12:01.0 to my domU guest. I got this error when I use "xm create /etc/xen/hvm_centos_2.cfg" Using config file "/etc/xen/hvm_centos_2.cfg". Error: Fail to assign device(12:1.0): maybe VT-d is not enabled, or the device is not exist, or it has already been assigned to other domain I thought that I can do PCI-passthrough w/o VT-D. Do I misunderstand anything ? How do I solve this problems ? Here is some debugging info: I managed to use pciback module to hide my device (qlogic). Here is the output from dmesg. ACPI: PCI interrupt for device 0000:12:01.0 disabled pciback 0000:12:01.0: seizing device PCI: Enabling device 0000:12:01.0 (0150 -> 0153) ACPI: PCI Interrupt 0000:12:01.0[A] -> GSI 25 (level, low) -> IRQ 21 ACPI: PCI interrupt for device 0000:12:01.0 disabled ACPI: PCI interrupt for device 0000:12:01.1 disabled pciback 0000:12:01.1: seizing device PCI: Enabling device 0000:12:01.1 (0150 -> 0153) ACPI: PCI Interrupt 0000:12:01.1[B] -> GSI 24 (level, low) -> IRQ 22 ACPI: PCI interrupt for device 0000:12:01.1 disabled I also noticed that cat /proc/cpuinfo does not show vmx flag to indicate vt. I checked bios of HP proliant DL380 and made sure that VT was enabled. flags : fpu de tsc msr pae cx8 apic sep mtrr cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall lm constant_tsc pni cx16 lahf_lm Thanks, -- -Nick K _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dustin Henning
2008-Sep-09 11:47 UTC
RE: [Xen-users] pci passthrough question. Do I need VT-D ?
I know very little about this, but if I remember correctly, searching the archives will show you that VT-D is certainly required for PCI passthrough to HVM domUs (maybe not for PV ones, but I''m not so sure on that). You might try creating a PV domU to do this in, or it might be quicker to search the archives in case that''s not possible either. Dustin -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Nick S Kanakakorn Sent: Tuesday, September 09, 2008 02:42 To: xen-users@lists.xensource.com Subject: [Xen-users] pci passthrough question. Do I need VT-D ? Hi, I really need help. I spent 2 days already on this pci passthrough thing. I''m using Xen 3.2.1 with Centos 5.2 64 bits on intel VT. I''d like to use PCI passthrough and I don''t think I need VT-D functionality. I''m trying to pass PCI 12:01.0 to my domU guest. I got this error when I use "xm create /etc/xen/hvm_centos_2.cfg" Using config file "/etc/xen/hvm_centos_2.cfg". Error: Fail to assign device(12:1.0): maybe VT-d is not enabled, or the device is not exist, or it has already been assigned to other domain I thought that I can do PCI-passthrough w/o VT-D. Do I misunderstand anything ? How do I solve this problems ? Here is some debugging info: I managed to use pciback module to hide my device (qlogic). Here is the output from dmesg. ACPI: PCI interrupt for device 0000:12:01.0 disabled pciback 0000:12:01.0: seizing device PCI: Enabling device 0000:12:01.0 (0150 -> 0153) ACPI: PCI Interrupt 0000:12:01.0[A] -> GSI 25 (level, low) -> IRQ 21 ACPI: PCI interrupt for device 0000:12:01.0 disabled ACPI: PCI interrupt for device 0000:12:01.1 disabled pciback 0000:12:01.1: seizing device PCI: Enabling device 0000:12:01.1 (0150 -> 0153) ACPI: PCI Interrupt 0000:12:01.1[B] -> GSI 24 (level, low) -> IRQ 22 ACPI: PCI interrupt for device 0000:12:01.1 disabled I also noticed that cat /proc/cpuinfo does not show vmx flag to indicate vt. I checked bios of HP proliant DL380 and made sure that VT was enabled. flags : fpu de tsc msr pae cx8 apic sep mtrr cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall lm constant_tsc pni cx16 lahf_lm Thanks, -- -Nick K _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
sven waeyenbergh
2008-Sep-09 13:17 UTC
Re: [Xen-users] pci passthrough question. Do I need VT-D ?
indeed, VT-d is needed to do pci passthrough to a HVM domain. It is not needed for a PV domain, i have been running a mythtv domU with multiple TV-cards for ages. but there are some requirements to get this to work. make sure that : - you do not load any drivers for the device on dom0 (google "pciback" for more info) - your domU has enough memory (pci cards do use memory) and not too much, trial and error is the way to go. - you domU kernels support PCI and the device that you''re trying to passthrough - you add the "pci" statement to your config file (ex: pci [''04:08.0''],[''04:09.0''],[''06:09.0''] ) - if problems arise, you probably need to append a statement like this one to the kernel options of the domU: "iommu=soft swiotlb=force" - one more caveat: some PCI cards actually are more then 1 pci device in the output of lspci. for example a tvcard with seperate audio device -> you need to passthrough them both other devices are not "dividable" for example my new quad port gigabit card is actually 4 pci devices, but i have to passthrough them 2 by 2 i have this working for tvcards, network cards, a scsi card and USB as well as serial. but all for PV domains, i haven''t tested yet with my new VT-d enabled mobo, that should be able to do this in HVM domains as well. Greetings, Sven _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users