From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Buffers not reachable by PCI Date: Fri, 9 Dec 2011 16:30:10 -0400 Message-ID: <20111209203010.GA14412@andromeda.dapyr.net> References: <3E243B26F475504B9BB0BCC9728B0DA629E16E01@USILMS110A.ca.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <3E243B26F475504B9BB0BCC9728B0DA629E16E01@USILMS110A.ca.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Taylor, Neal E" Cc: xen-devel , "Kalev, Leonid" , "Dave, Tushar N" List-Id: xen-devel@lists.xenproject.org On Fri, Dec 09, 2011 at 08:19:47PM +0000, Taylor, Neal E wrote: > We're running 64-bit Xex 4.1.1 and 32-bit Linux 3.0.4 Dom0 (Linux 3.1 shows the same symptom.) Hm, 32-bit. Did it work if the Dom0 was 64-bit? > > Several PCI drivers are unable to use DMA. Most fallback to using PIO but in two instances the network drivers (e1000 and pcinet32) abort. The same kernel running on the same hardware without Xen works fine. > > Digging through the code, in swiotlb-xen.c I find "DMA_BIT_MASK(32)" (0x00000000ffffffff) compared to "xen_virt_to_bus(xen_io_tlb_end - 1)" which resolves to 0x1,20fd,feff. Since the address is larger than the mask, DMA is declared as unsupportable. xen_io_tlb_end resolved to 120fdfeff? That is a definite bug. Can you attach you full bootup serial log with 'debug loglevel=8' parameters on the Linux line please? > In talking with others I hear Linux handles this situation with bounce buffers. Is there a config setting I've missed to enable that for Xen? (Config file attached) The Xen SWIOTLB is by default enabled, so it is on, but the xen_virt_to_bus(xen_io_tlb_end - 1) _MUST_ never be above 4GB. In your case it is, which is bad. It is rather surprising as I had not seen this ever happen.