Skip to content

KVM noncoherent DMA registration and VFIO pseudo device

Alex Williamson kvm kvm-ppc linuxppc-dev lkml 2 versions – Applied

Status from this message: Applied to kvm/queue, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyApplied
  2. v14 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Drop KVM device changes
- Add kfree(dev) in destroy function
- Add atomic_set(,0) in kvm_arch init

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3kvm: Add VFIO deviceDocumentation/virtual/kvm/devices/vfio.txt arch/x86/kvm/Kconfig arch/x86/kvm/Makefile +5 more+257 -10 replies
2/3kvm/x86: Convert iommu_flags to iommu_noncoherentarch/ia64/include/asm/kvm_host.h arch/x86/include/asm/kvm_host.h arch/x86/kvm/vmx.c +3 more+12 -150 replies
3/3kvm: Create non-coherent DMA registerationarch/x86/include/asm/kvm_host.h arch/x86/kvm/vmx.c arch/x86/kvm/x86.c +3 more+92 -40 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/3] KVM noncoherent DMA registration and VFIO pseudo device

v2:
- Drop KVM device changes
- Add kfree(dev) in destroy function
- Add atomic_set(,0) in kvm_arch init

As described in v1 and discussion, this adds a VFIO pseudo device to KVM through which userspace can register VFIO groups. The initial use of this interface is to enable emulation of coherency instructions on x86 when a VFIO group is attached. Future patches will allow KVM to query the coherency state of the IOMMU domain used by the group to avoid unnecessarily enabling this emulation. Thanks,

Alex

---

Alex Williamson (3):
kvm: Add VFIO device
kvm/x86: Convert iommu_flags to iommu_noncoherent
kvm: Create non-coherent DMA registeration

 Documentation/virtual/kvm/devices/vfio.txt |   22 ++
 arch/ia64/include/asm/kvm_host.h           |    2 
 arch/x86/include/asm/kvm_host.h            |    4 
 arch/x86/kvm/Kconfig                       |    1 
 arch/x86/kvm/Makefile                      |    2 
 arch/x86/kvm/vmx.c                         |    3 
 arch/x86/kvm/x86.c                         |   22 ++
 include/linux/kvm_host.h                   |   23 ++
 include/uapi/linux/kvm.h                   |    4 
 virt/kvm/Kconfig                           |    3 
 virt/kvm/iommu.c                           |   22 +-
 virt/kvm/kvm_main.c                        |    5 +
 virt/kvm/vfio.c                            |  264 ++++++++++++++++++++++++++++
 13 files changed, 359 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/virtual/kvm/devices/vfio.txt
 create mode 100644 virt/kvm/vfio.c