All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jan Beulich <JBeulich@novell.com>
Cc: dri-devel@lists.sourceforge.net, xen-devel@lists.xensource.com,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: Re: ATI radeon fails with "iommu=soft	 swiotlb=force" (seen on RV730/RV740 and RS780/RS800)
Date: Mon, 05 Oct 2009 12:09:13 -0700	[thread overview]
Message-ID: <4ACA4459.4000903@goop.org> (raw)
In-Reply-To: <4AC9E75F0200007800017F61@vpn.id2.novell.com>

On 10/05/09 03:32, Jan Beulich wrote:
> 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.
>   

vmalloc_32 is a general problem.  The only clean way I can see to make
it work under Xen is to make sure all the pages in the DMA32 zone are
really under 4G in machine addresses.  But that doesn't scale very well
if you have more than one domain wanting to use vmalloc_32 for hardware
access (or a few small domains).

I'm wondering if the "proper" fix is to introduce a vmalloc_dma() call
which allocates the pages with the proper DMA API calls them maps them
together in the vmalloc space, and then start migrating drivers over to
this new API (ie as needed when people report Xen problems).  That would
be more generally correct, but perhaps it would be a bit more cumbersome
because it would have to return both the vaddr of the vmapping, and the
dma_addr_t array, so that vfree_dma() can make the proper
dma_free_coherent calls.

    J

  parent reply	other threads:[~2009-10-05 19:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-02  6:58 Re: ATI radeon fails with "iommu=soft swiotlb=force" (seen on RV730/RV740 and RS780/RS800) Boris Derzhavets
2009-10-02 17:18 ` Jeremy Fitzhardinge
2009-10-02 17:23   ` Boris Derzhavets
2009-10-02 18:42     ` Jeremy Fitzhardinge
2009-10-02 19:25       ` Boris Derzhavets
2009-10-05 10:32       ` Jan Beulich
2009-10-05 14:01         ` Konrad Rzeszutek Wilk
2009-10-05 14:37           ` Konrad Rzeszutek Wilk
2009-10-05 19:12             ` Jeremy Fitzhardinge
2009-10-05 14:41           ` [Xen-devel] " Alex Deucher
2009-10-05 14:49             ` Konrad Rzeszutek Wilk
2009-10-05 14:54               ` [Xen-devel] " Alex Deucher
2009-10-05 19:09         ` Jeremy Fitzhardinge [this message]
2009-10-06  8:10           ` Jan Beulich
2009-10-06 19:01             ` Jeremy Fitzhardinge
     [not found] <20090930152149.GA29603@phenom.dumpdata.com>
2009-10-01 17:35 ` Konrad Rzeszutek Wilk
2009-10-01 19:07   ` Jeremy Fitzhardinge
2009-10-01 19:21     ` Konrad Rzeszutek Wilk
2009-10-02 12:52       ` Jan Beulich
2009-10-02 14:44         ` Konrad Rzeszutek Wilk
  -- strict thread matches above, loose matches on Subject: below --
2009-10-02  5:02 Boris Derzhavets

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ACA4459.4000903@goop.org \
    --to=jeremy@goop.org \
    --cc=JBeulich@novell.com \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.