Skip to content

: dma,x86,xen: reduce SWIOTLB usage in Xen guests

David Vrabel linux-ia64 lkml xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 22 repliesIn review
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- split x86 and xen changes into separate patches

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dma,ia64: add dma_get_required_mask_from_max_pfn()arch/ia64/include/asm/machvec.h arch/ia64/include/asm/machvec_init.h arch/ia64/pci/pci.c +2 more+10 -242 replies
1/3dma, ia64: add dma_get_required_mask_from_max_pfn()arch/ia64/include/asm/machvec.h arch/ia64/include/asm/machvec_init.h arch/ia64/pci/pci.c +2 more+10 -240 replies
2/3x86: allow dma_get_required_mask() to be overriddenarch/x86/include/asm/device.h arch/x86/kernel/pci-dma.c+10 -08 replies
2/3x86: allow dma_get_required_mask() to be overriddenarch/x86/include/asm/device.h arch/x86/kernel/pci-dma.c+10 -00 replies
3/3x86/xen: use the maximum MFN to calculate the required DMA maskarch/x86/xen/pci-swiotlb-xen.c drivers/xen/swiotlb-xen.c include/xen/swiotlb-xen.h+18 -00 replies
3/3x86/xen: use the maximum MFN to calculate the required DMA maskarch/x86/xen/pci-swiotlb-xen.c drivers/xen/swiotlb-xen.c include/xen/swiotlb-xen.h+18 -012 replies

Reviews trailers per patch

4 of 6 patches have a Reviewed-by or Acked-by.

PatchStefano Stabellini
1/3R-b R-b
1/3R-b R-b
2/3R-b R-b
2/3R-b R-b
3/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCHv2 0/3]: dma,x86,xen: reduce SWIOTLB usage in Xen guests

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 calculated the DMA mask from the maximum MFN (and not the PFN).

The first patch removes a duplicated function between ia64 and common since we want a common implementation usage by ia64 and x86.

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

David