From: Sander Eikelenboom Subject: Re: pci adapter not working in dom0. works under plain Linux. Date: Tue, 10 Jun 2014 17:05:03 +0200 Message-ID: <1498011152.20140610170503@eikelenboom.it> References: <95534be07bf54fca9c8b0dcc76f7d3aa@SIXPR04MB304.apcprd04.prod.outlook.com> <20140609165149.GF2275@laptop.dumpdata.com> <20140610130832.GC28932@laptop.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140610130832.GC28932@laptop.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: James Harper , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Tuesday, June 10, 2014, 3:08:32 PM, you wrote: > On Tue, Jun 10, 2014 at 11:19:18AM +0000, James Harper wrote: >> > >> > On Sun, Jun 08, 2014 at 11:01:25AM +0000, James Harper wrote: >> > > I bought an unsupported DVB card (by mistake - I bought the v2 version >> > instead of the supported v1 version), and I've just finished getting it working >> > under Linux, but spent the last day or so trying to figure out why it keeps >> > dropping buffers even though the reception is perfect. As soon as I noticed >> > that the lost data is always in PAGE_SIZE multiples, I figured I'd better boot in >> > plain Linux instead of Xen, and when I did that it worked perfectly. >> > >> > What happens if you boot dom0 with 'dom0_mem=max:1G' and limit the >> > amount of memory >> > Xen sees by using 'mem=4G' on the Xen command line? >> > >> >> That seems to make the problem go away. The machine itself has 5GB of memory in it, so (assuming an even spread) only 1/5 of allocations would come from >4GB memory right? This matches the missing pages of data in the resulting DMA transfers. > That was my theory. >> >> Where should I start looking for the fix? The card is PCIe so I would have thought it would have supported DMA to memory > 4GB, is that the problem? I think one of my USB devices has the same problem too. > Ugh. They all should do the right job - that is using the DMA API. >> >> Btw, what is dom0_mem=max:1G supposed to do? Dom0 still has ~3.7GB memory allocated to it on boot. > Oh, I think I mentioned that it should have been on the 'dom0' line but > I meant Xen line. > If you try removing the 'mem=4G' and just use 'dom0_mem=max:1G' please? > That should limit the amount of memory the dom0 uses (it sees the > rest of the E820 - but does not use it) - and that means that the > drivers should _also_ use said below memory. > I had some preliminary patches for the V4L API to use a better > DMA ops, but I fear that they are bitrotten (and I can't even > find them!). But lets try first determine if the workarounds > work for you. Were you by any means referring to this thread / patch: http://lists.xen.org/archives/html/xen-devel/2012-01/msg01982.html ? -- Sander >> >> Thanks! >> >> James