From: "Jan Beulich" Subject: Re: Dom0 physical networking/swiotlb/something issue in 3.7-rc1 Date: Fri, 09 Nov 2012 17:34:35 +0000 Message-ID: <509D3EAB020000780008F4B6@nat28.tlf.novell.com> References: <1350037688.14806.93.camel@zakaz.uk.xensource.com> <509CD50302000078000A76E4@nat28.tlf.novell.com> <1352452573.21048.35.camel@dagon.hellion.org.uk> <509CDDBA02000078000A772C@nat28.tlf.novell.com> <509CEAB402000078000A7772@nat28.tlf.novell.com> <509CFA7B02000078000A778C@nat28.tlf.novell.com> <20121109134829.GB30634@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20121109134829.GB30634@phenom.dumpdata.com> Content-Disposition: inline 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.wilk@oracle.com Cc: Ian.Campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> Konrad Rzeszutek Wilk 11/09/12 2:48 PM >>> >On Fri, Nov 09, 2012 at 11:43:39AM +0000, Jan Beulich wrote: >> >>> On 09.11.12 at 11:36, "Jan Beulich" wrote: >> > In the forward ported kernels, those two checks are however >> > accompanied by range_needs_mapping() (aka >> > range_straddles_page_boundary()) checks, which ought to >> > take care of this. There is brokenness there with the invocations >> > of gnttab_dma_map_page(), but only if the initial offset is at >> > least PAGE_SIZE - will have to check whether that occurs. >> >> And indeed, fixing this also makes the problem go away when >> the allocation order doesn't get forced to zero. So presumably >> there's also only that one problem I had pointed out in pv-ops. > >The pvops one has this in the map-page variant (xen_swiotlb_map_page): > >351 if (dma_capable(dev, dev_addr, size) && >352 !range_straddles_page_boundary(phys, size) && !swiotlb_force) >353 return dev_addr; > >and in the sg variant: > >494 if (swiotlb_force || >495 !dma_capable(hwdev, dev_addr, sg->length) || >496 range_straddles_page_boundary(paddr, sg->length)) { >497 void *map = swiotlb_tbl_map_single(hwdev, Oh, right, I forgot that there's yet another clone of that code under drivers/xen/. >So I think that check is OK. There is no gnttab_dma_map_page call - so that >can't be the issue. Indeed. Jan