[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Struggling with PCI-Passthrough


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Alexander Brychcy <alexander@xxxxxxxxxxx>
  • Date: Tue, 25 Mar 2014 21:33:02 +0100
  • Delivery-date: Tue, 25 Mar 2014 20:33:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Am 25.03.2014 11:46, schrieb Gordan Bobic:
> On 2014-03-24 19:18, Alexander Brychcy wrote:
> 
>> As ever there are only problems with domU #2. The first one, that i
>> could not passthrough an USB controller resolved. No matter at which
>> port you plug an USB device on the mainboard, it is always assigned to
>> the XHCI controller.
> 
> I found that on Intel ICH USB controllers the PCI USB device that the
> USB device is attached to changes dependant on what is connected. There
> is some odd routing going on. This is especially the case when a USB
> hub is connected to a port. If you just want to pass through, say, a
> keyboard, it is stable, but IIRC the device has to be connected to the
> port before you re-assign the PCI device that is the port to xen-pcistub.
> 
> My motherboard also comes with a NEC USB 3.0 adapter on-board which
> doesn't suffer from this problem, so for VMs that require multiple
> USB devices I have a USB hub on that controller and I pass the
> whole controller to the VM.
> 
>> My workaround is to add another PCIe USB controller
>> for the vm, so i'm still able to have usb connection in dom0 for backup
>> or other purposes.
> 
> Sounds similar to what I do. Note that you can also pass specific USB
> devices to the domU, rather than using PCI passthrough for the USB
> controllers. Unfortunately this comes with ~5% CPU idling overhead
> in domU due to USB polling.
> 
>> Tried to passthrough a NIC to verify if it is a bios related bug. This
>> works without any problems and nothing freezes at all.
> 
> I suspect you are just seeing the Intel ICH USB weirdness I described
> above.
> 

I think that should be the same weirdness. I declare the problem solved
:) vm will get their own dedicated controller when everythin else is
working.

>> So last but not least the VGA Passthrough. Issue is still present. HVM
>> boots and GPU is assigned and working. But after some time respectively
>> an application tries to access some kind of function the whole system
>> freezes.
> 
> How much RAM are you passing to the VM? It is possible your motherboard
> suffers from the same problem as mine and IOMEM DMA is bypassing the
> root PCIe hub. Do the following:
> 
> lspci -v | grep "Memory at" | sed -e 's/.*Memory at //' -e 's/ .*//' | sort
> 
> Convert the first address that comes back from hex, and set the amount
> of memory you are passing to your VM to a few MB below that.
> 
> Then see if the crash still happens after a while. If it doesn't, then
> there is a good chance that what is happening is that your VM's
> memory is trampling over the IOMEM region of the host because it
> isn't being translated by the IOMMU, probably because DMA is
> bypassing it. In my case this is caused by a bug/feature of NF200
> PCIe switches, but it could also be caused by a buggy motherboard
> chipset or firmware.

Edited the config to 768MB - way below the address 2051MB. First i
though it works, but only because the 5 Minutes felt like hours. Win7 is
a pain in the ass with such scanty amount of memory.

>> Nearly forgot the RAM problem. The maximum amount of RAM i can assign to
>> the HVM when i passthrough the GPU is 3GB. Haven't tried it yet but may
>> this patch still be usable with 4.4.0?
>> http://www.davidgis.fr/blog/index.php?2013/04/05/937-xen-43-unstable-vga-passthrough-hd-7970-windows-7-64-bits-with-more-than-3gb-for-ram
>>
Tried to apply the patch, but there were to many changes since 4.2.0 and
currently i don't have to time to find all the changes in the current files.
> 
> I think this is for a different bug, but probably worth a try
> depending on what results you get with domU memory size reduced to
> ensure it cannot trample IOMEM regions.
> 
> Gordan

I think it has definetly something to do with the memory mapping. I want
to assign 8GB of RAM to the hvm. And the dedicated memory of the gpu to
passthrough itself is 4GB. The thread "[Xen-devel] [PATCH v3 0/4] Add
max-ram-below-4g (was Add pci_hole_min_size machine option)" aroused my
attention.

Alexander


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.