From: Keir Fraser Subject: Re: DMA trouble with current xen-sparse Date: Sat, 29 Oct 2005 09:55:06 +0100 Message-ID: References: <1130527280.4274.26.camel@orbit.scot.redhat.com> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1130527280.4274.26.camel@orbit.scot.redhat.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: "Stephen C. Tweedie" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 28 Oct 2005, at 20:21, Stephen C. Tweedie wrote: > The trouble is that this is a 1G box, so its memory is not large enough > to automatically enable the swiotlb. (arch/xen/i386/kernel/swiotlb.c > enables swiotlb automatically for dom0 only if there's at least 2G of > memory.) And the first time we get a pci_dma_single() request for a > dom0-contiguous region which crosses a page boundary, we hit the BUG_ON > at arch/xen/i386/kernel/pci_dma.c:270 due to dma_map_single() checking: > > IOMMU_BUG_ON(range_straddles_page_boundary(ptr, size)); > > And this happens *instantly* on any loaded tcp connection on my e1000 > NIC. All I need to do to kill the box is to ssh in and type "find\n". > Instant dom0 death after the ssh client receives about a dozen lines of > output. The stack trace is appended below. Is the network interface set up to use jumbo frames? Otherwise I wouldn't expect alloc_skb() to allocate a data area that straddles a page boundary, since the allocation will come from one of the sub-page-sized power-of-two kmem caches. If the problem is jumbo frames, we might need to add a hook to alloc_skb(). Using swiotlb will suck hugely. -- Keir