WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: Re: [Xen-devel] Re: PCI passthrough stopped working, brainache!

To: Carsten Schiers <carsten@xxxxxxxxxx>
Subject: Re: Re: [Xen-devel] Re: PCI passthrough stopped working, brainache!
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Wed, 19 Oct 2011 23:40:00 -0400
Cc: "xen.lists" <xen.lists@xxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Ian.Campbell" <Ian.Campbell@xxxxxxxxxx>
Delivery-date: Mon, 24 Oct 2011 06:13:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <H0000067000c72b1.1318693040.uhura.space.zz@MHS>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CAE1-PRe3FZknxdCLkhkGbzd-i=y5eGMAwY+yoa36j61oHNcRSw@xxxxxxxxxxxxxx> <H0000067000c72b1.1318693040.uhura.space.zz@MHS>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
On Sat, Oct 15, 2011 at 05:37:20PM +0200, Carsten Schiers wrote:
> Interesting. Konrad, do you remember that one of my DVB cards did 
> consume double CPU time 
> as compared to a) old Xenified 2.6.18 b) Xenified 2.6.34 and c) mem=2G 

Well, your DVB cards started consuming when you added more than 4GB to your
box. I don't remember the 2.6.18 figuring in this picture.

> Dom0? Maybe these
> observations are somehow connected.
> 
> It did work, though... Unfortunately, I sold these cards to have only 
> one, which is 

.. which is?

.. snip..
> A coconut for the gentleman!

Beer!
> 
> Working in dom0 and (with page-alignment of the PCI BARs) in the domU,
> I did check a couple of reboots and a cold start too, just in case!
> 
> So what's to look at for the real cause?

There can be one more test to conclude this and that is to raise right about 4GB
(ought to work) or perhaps to 5GB (it should fail there) under Xen .
Either way it sounds like a DMA issue - either we are:

 1). Not having the right dma_mask set. Check the 
/sys/bus/pci/devices/<BDF>/dma_mask
     and coherent_dma_mask. Both values should be the same and it ought to be 32
 
 2). The driver is not doing pci_sync_range .. which you should be able
     to easily find out. Try booting the Linux kernel in baremetal, with
     8GB and with "iommu=soft swiotlb=force". That will bounce buffer 
_everything_
     - which might show the same problem. It also might show problems with some
     other drivers.

 3). I can send you some patches to instrument Xen SWIOTLB to see what DMA pages
     (and where in the driver code is doing it) are using bounce buffer and not
     properly doing 2).

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel