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] Re: ATI radeon fails with "iommu=soft swiotlb=force" (s

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: ATI radeon fails with "iommu=soft swiotlb=force" (seen on RV730/RV740 and RS780/RS800)
From: Alex Deucher <alexdeucher@xxxxxxxxx>
Date: Mon, 5 Oct 2009 10:41:04 -0400
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Tue, 06 Oct 2009 06:16:21 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=E+WjtxoAb5uQtQY1J1OaOYAnR7EnztzNIbOmeO+QAbs=; b=rd4k7MolGaKtozTV3tUDaZrsSmFAGBJPEPtTQxcdd65EpAI9w+oDmxW1+30vQOUOkv dGfeAi89Nza/A8QC6xWtS6JNidZIla/ASUq7xIhEDweAR8ItSnsOPs1FcM6tmagzmZFL hi/REaR5f/LuPSh6/EQips0e1L+6yY0IQAlM4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=iPqLSvyHadOOvstDsWRc7XyGATeFWTkGyOGlBuxvZtMqlC7ZsXZoryWZrpyAB0+AbI ImlSImUhN6ZK3M1MhfN2OVSOPo20wkQ10OaCe0l3szGmXY/1Xf+NDnH8AntJIJfSojJx eZZGmhQVGNNBFitq38uC/YUMqB5dUu8gUWvto=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20091005140152.GA3127@xxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <41093.83224.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <4AC649B0.5090700@xxxxxxxx> <4AC9E75F0200007800017F61@xxxxxxxxxxxxxxxxxx> <20091005140152.GA3127@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, Oct 5, 2009 at 10:01 AM, Konrad Rzeszutek Wilk
<konrad.wilk@xxxxxxxxxx> wrote:
> On Mon, Oct 05, 2009 at 11:32:31AM +0100, Jan Beulich wrote:
>> >>> Jeremy Fitzhardinge <jeremy@xxxxxxxx> 02.10.09 20:42 >>>
>> >On 10/02/09 10:23, Boris Derzhavets wrote:
>> >> Jeremy,
>> >> Please,  be aware of bugzilla.xensource.com [1519]  the most recent
>> >> entries :-
>> >>
>> >> http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1519
>> >>
>> >
>> >Ah, OK.  I pushed a variant of Konrad's patches.  Could you try them out?
>>
>> Are you really convinced fixing this in DRM is the right thing to do? To
>> me, the use of vmalloc_32() in drivers/ieee1394/ seems to make similar
>> assumptions (pci_map_sg() not modifying the buffer addresses), and
>> who knows where else such assumptions exist. After all, vmalloc_32()
>> is *defined* to have the property assumed by both of the users, and
>> other than for most kmalloc() cases using GFP_DMA{,32} we're talking
>> about double buffering generally large amounts of data here even in
>> the cases where the DMA API is being used properly.
>
> I was chatting with Jeremy about this, and I realized that in some
> sense the radeon driver assumes that physical != bus addresses. Which is
> OK on x86, but if this card was ever moved to a Sun box it would fail.
>

FWIW, the radeon drm has been working fine on both sparc and ppc for years.

Alex

> The patch here thwarts this by allocating memory from the IOMMU, so that
> even if bus != physical address from pci_map_page, that is OK.
>
> Another way to make this work right is to modify the drivers
> that use vmalloc_32, with pci_map_[sg|page], is for them to check if the 
> physical
> != bus address, and if so, remap the virtual address (page_to_vmalloc) to
> point to the new bus addresses (and free the "old" page). Obviously this
> requires some book-keeping, but it does fix those drivers if they were to 
> move to
> non-x86 architecture. Or on machines where the IOMMU hands out non-physical
> addresses.
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> --
> _______________________________________________
> Dri-devel mailing list
> Dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/dri-devel
>

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

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