All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 0/4]: dma, x86, xen: reduce SWIOTLB usage in Xen guests
@ 2014-11-19 16:01 David Vrabel
  2014-11-19 16:01 ` [PATCH 1/4] dma: add dma_get_required_mask_from_max_pfn() David Vrabel
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: David Vrabel @ 2014-11-19 16:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Vrabel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	xen-devel, Konrad Rzeszutek Wilk, Boris Ostrovsky,
	Greg Kroah-Hartman

On systems where DMA addresses and physical addresses are not 1:1
(such as Xen PV guests), the generic dma_get_required_mask() will not
return the correct mask (since it uses max_pfn).

Some device drivers (such as mptsas, mpt2sas) use
dma_get_required_mask() to set the device's DMA mask to allow them to use
only 32-bit DMA addresses in hardware structures.  This results in
unnecessary use of the SWIOTLB if DMA addresses are more than 32-bits,
impacting performance significantly.

This series allows Xen PV guests to override the default
dma_get_required_mask() with one that calculates the DMA mask from the
maximum MFN (and not the PFN).

Changes in v3:
- fix off-by-one in xen_dma_get_required_mask()
- split ia64 changes into separate patch.

Changes in v2:
- split x86 and xen changes into separate patches

David

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2014-11-20 11:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-19 16:01 [PATCHv3 0/4]: dma, x86, xen: reduce SWIOTLB usage in Xen guests David Vrabel
2014-11-19 16:01 ` [PATCH 1/4] dma: add dma_get_required_mask_from_max_pfn() David Vrabel
2014-11-19 16:01 ` David Vrabel
2014-11-19 16:01 ` [PATCH 2/4] ia64: use common dma_get_required_mask_from_pfn() David Vrabel
2014-11-19 16:01 ` David Vrabel
2014-11-19 16:01   ` David Vrabel
2014-11-19 17:33   ` Stefano Stabellini
2014-11-19 17:33   ` Stefano Stabellini
2014-11-19 17:33     ` Stefano Stabellini
2014-11-19 16:02 ` [PATCH 3/4] x86: allow dma_get_required_mask() to be overridden David Vrabel
2014-11-19 16:02 ` David Vrabel
2014-11-19 16:02 ` [PATCH 4/4] x86/xen: use the maximum MFN to calculate the required DMA mask David Vrabel
2014-11-19 16:02 ` David Vrabel
2014-11-19 17:51   ` [Xen-devel] " Stefano Stabellini
2014-11-20 11:42     ` David Vrabel
2014-11-20 11:42     ` David Vrabel
2014-11-19 17:51   ` Stefano Stabellini
2014-11-20 11:21   ` [Xen-devel] " Jan Beulich
2014-11-20 11:21     ` Jan Beulich

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.