linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Clean up VMD DMA Map Ops
@ 2020-01-09 14:30 Jon Derrick
  2020-01-09 14:30 ` [PATCH v2 1/5] x86/pci: Add a to_pci_sysdata helper Jon Derrick
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Jon Derrick @ 2020-01-09 14:30 UTC (permalink / raw)
  To: iommu, linux-pci
  Cc: Bjorn Helgaas, Lorenzo Pieralisi, Keith Busch, Joerg Roedel,
	Christoph Hellwig, David Woodhouse, Lu Baolu, Jon Derrick

v1 Set: https://lore.kernel.org/linux-iommu/20200107134125.GD30750@8bytes.org/T/#t

This revision introduces a new weak function to reference the dma alias, as
well as using the struct device rather than the pci_dev. By using the weak
function in this manner, we remove the need to add a pointer in struct device
or pci_dev. Weak functions are generally frowned upon when it's a single
architecture implementation, so I am open to alternatives.

v1 Blurb:
VMD currently works with VT-d enabled by pointing DMA and IOMMU actions at the
VMD endpoint. The problem with this approach is that the VMD endpoint's
device-specific attributes, such as the dma mask, are used instead.

This set cleans up VMD by removing the override that redirects dma map
operations to the VMD endpoint. Instead it introduces a new dma alias mechanism
into the existing dma alias infrastructure.

Changes from v1:
Removed 1/5 & 2/5 misc fix patches that were merged
Uses Christoph's staging/cleanup patches
Introduce weak function rather than including pointer in struct device or pci_dev.

Based on Joerg's next:
https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git/

Christoph Hellwig (2):
  x86/pci: Add a to_pci_sysdata helper
  x86/pci: Replace the vmd_domain field with a vmd_dev pointer

Jon Derrick (3):
  PCI: Introduce direct dma alias
  PCI: vmd: Stop overriding dma_map_ops
  x86/pci: Remove X86_DEV_DMA_OPS

 arch/x86/Kconfig               |   3 -
 arch/x86/include/asm/device.h  |  10 ---
 arch/x86/include/asm/pci.h     |  31 ++++-----
 arch/x86/pci/common.c          |  45 ++----------
 drivers/iommu/intel-iommu.c    |  17 +++--
 drivers/pci/controller/Kconfig |   1 -
 drivers/pci/controller/vmd.c   | 152 +----------------------------------------
 drivers/pci/pci.c              |  17 ++++-
 drivers/pci/search.c           |   9 +++
 include/linux/pci.h            |   1 +
 10 files changed, 60 insertions(+), 226 deletions(-)

-- 
1.8.3.1


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

end of thread, other threads:[~2020-01-09 23:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-09 14:30 [PATCH v2 0/5] Clean up VMD DMA Map Ops Jon Derrick
2020-01-09 14:30 ` [PATCH v2 1/5] x86/pci: Add a to_pci_sysdata helper Jon Derrick
2020-01-09 14:30 ` [PATCH v2 2/5] x86/pci: Replace the vmd_domain field with a vmd_dev pointer Jon Derrick
2020-01-09 14:30 ` [PATCH v2 3/5] PCI: Introduce direct dma alias Jon Derrick
2020-01-09 23:11   ` Bjorn Helgaas
2020-01-09 23:37     ` Derrick, Jonathan
2020-01-09 14:30 ` [PATCH v2 4/5] PCI: vmd: Stop overriding dma_map_ops Jon Derrick
2020-01-09 14:30 ` [PATCH v2 5/5] x86/pci: Remove X86_DEV_DMA_OPS Jon Derrick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).