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: [Xen-devel] Question regarding SLAB corruption

To: Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Question regarding SLAB corruption
From: Roland Dreier <rdreier@xxxxxxxxx>
Date: Mon, 09 Jul 2007 12:25:16 -0700
Authentication-results: sj-dkim-2; header.From=rdreier@xxxxxxxxx; dkim=pass ( sig from cisco.com/sjdkim2002 verified; );
Cc: Lukas Hejtmanek <xhejtman@xxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 10 Jul 2007 10:08:54 -0700
Dkim-signature: v=0.5; a=rsa-sha256; q=dns/txt; l=928; t=1184009126; x=1184873126; c=relaxed/simple; s=sjdkim2002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rdreier@xxxxxxxxx; z=From:=20Roland=20Dreier=20<rdreier@xxxxxxxxx> |Subject:=20Re=3A=20[Xen-devel]=20Question=20regarding=20SLAB=20corruptio n |Sender:=20; bh=8L36olgVfIcxL1ollpp8jTirsnNc9v+CEgFrWa/RF/I=; b=O/2VEOSE22dpXr/r3Kqir0sBCo8aE6Uf5nDSgRV64dzWZt+pWY+OV4r1N5fgh9mKYvKMT+f3 hSYyYeWIB05lQFN848gkFsNG7IjbZGcaSi/FzqQNUZZLJihAKWbrR+bS;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C2B83D37.A8DF%keir@xxxxxxxxxxxxx> (Keir Fraser's message of "Mon, 09 Jul 2007 19:29:59 +0100")
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C2B83D37.A8DF%keir@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.20 (linux)
 > Oh! I take it then that the infiniband driver will call sync_single() on
 > subsections of a mapped region? I haven't seen that behaviour before and it
 > will kill lib/swiotlb.c (the generic Linux swiotlb implementation) just as
 > surely as it does the Xen-specific swiotlb!

I guess it is not being hit on non-Xen Linux because mthca sets a
64-bit DMA mask and hence bypasses swiotlb.

However what you point out does seem to be a bug:
Documentation/DMA-API.txt says:

    void
    dma_sync_single(struct device *dev, dma_addr_t dma_handle, size_t size,
                    enum dma_data_direction direction)

    ...

    synchronise a single contiguous or scatter/gather mapping.  All the
    parameters must be the same as those passed into the single mapping
    API.

so it seems not really kosher to do on a subsection of a mapping...

I'll take a look at how we can do better here.

 - R.

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

<Prev in Thread] Current Thread [Next in Thread>