Skip to content

Factor VT-d KVM functions into a generic API

Joerg Roedel kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 21 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9KVM: rename vtd.c to iommu.carch/ia64/kvm/Makefile arch/x86/kvm/Makefile virt/kvm/iommu.c +1 more+193 -1933 replies
2/9introcude linux/iommu.h for an iommu apiinclude/linux/iommu.h+100 -01 reply
3/9add frontend implementation for the IOMMU APIdrivers/base/iommu.c+94 -015 replies
4/9select IOMMU_API when DMAR and/or AMD_IOMMU is selectedarch/ia64/Kconfig arch/x86/Kconfig drivers/base/Makefile+7 -00 replies
5/9VT-d: add domain init and destroy functions for IOMMU APIdrivers/pci/intel-iommu.c+24 -00 replies
6/9VT-d: add device attach and detach functions for IOMMU APIdrivers/pci/intel-iommu.c+32 -00 replies
7/9VT-d: add domain map and iova_to_phys functions for IOMMU APIdrivers/pci/intel-iommu.c+22 -00 replies
8/9VT-d: register functions for the IOMMU APIdrivers/pci/intel-iommu.c+13 -01 reply
9/9KVM: change KVM iommu.c to use IOMMU APIarch/x86/include/asm/kvm_host.h virt/kvm/iommu.c+36 -330 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] Factor VT-d KVM functions into a generic API

Hi,

this patch series makes the current KVM device passthrough code generic enough so that other IOMMU implementation can also plug into this code. It works by factoring the functions Vt-d code exports to KVM into a generic interface which allows different backends.

This a basic implementation of a generic interface. It can and should be improved later to support more types of hardware IOMMUs then VT-d and AMD IOMMU.

Since I have no VT-d hardware available these patches are only compile tested for now.

Please review, comment and test these patches.

Thanks,

Joerg

diffstat:

 arch/ia64/Kconfig               |    3 +
 arch/ia64/kvm/Makefile          |    2 +-
 arch/x86/Kconfig                |    3 +
 arch/x86/include/asm/kvm_host.h |    3 +-
 arch/x86/kvm/Makefile           |    2 +-
 drivers/base/Makefile           |    1 +
 drivers/base/iommu.c            |   94 +++++++++++++++++++
 drivers/pci/intel-iommu.c       |   91 ++++++++++++++++++
 include/linux/iommu.h           |  100 ++++++++++++++++++++
 virt/kvm/iommu.c                |  193 +++++++++++++++++++++++++++++++++++++++
 virt/kvm/vtd.c                  |  191 --------------------------------------