qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC v4 0/8] KVM PCI/MSI passthrough with mach-virt
@ 2016-10-06 11:41 Eric Auger
  2016-10-06 11:41 ` [Qemu-devel] [RFC v4 1/8] linux-headers: Partial update for MSI IOVA handling Eric Auger
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Eric Auger @ 2016-10-06 11:41 UTC (permalink / raw)
  To: eric.auger, eric.auger.pro, peter.maydell, qemu-arm, qemu-devel,
	alex.williamson, pranav.sawargaonkar
  Cc: diana.craciun, christoffer.dall, drjones, Bharat.Bhushan

On ARM, MSI transactions emitted by passthrough'ed devices are translated
by the IOMMU.  So the host must allocate IOVAs and map them to the host
MSI frame physical addresses. Those IOVAs must be allocated within safe
GPA slots, unused by the guest.

The QEMU VFIO device retrieves the size if the IOVA window needed by the
host using a new VFIO IOMMU type capability chain API. This window is
allocated on guest address space withing the platform bus memory container.
This latter acts as a pool of usable GPA and comes with its own GPA allocator.
The memory region is tagged as "reserved_iova". The vfio_listener_region_add
callback is in charge of passing the window characteristics to the kernel
through an extended VFIO_IOMMU_MAP_DMA ioctl.

Best Regards

Eric

Dependencies:
The series depends on the not yet upstream kernel series:
[PATCH v13 00/15] KVM PCIe/MSI passthrough on ARM/ARM64
http://www.spinics.net/lists/arm-kernel/msg535168.html

Git:
https://github.com/eauger/qemu/tree/v2.7.0-passthrough-rfc-v4

History:

RFCv3 -> RFC v4:
- initialize err to NULL in vfio_connect_container and fix hint

RFCv2 -> RFC v3:
- IOVA aperture size is not arbitrary anymore. It is retrieved from the host
  usig VFIO IOMMU type capability chain API
- GPEX related patches removed since the warning is not seen anymore

RFC v1 -> RFC v2:
- now uses platform bus MMIO for mapping reserved IOVA region; hence the
  new patch file:
  "hw: platform-bus: enable to map any memory region onto the platform-bus"

Eric Auger (8):
  linux-headers: Partial update for MSI IOVA handling
  hw: vfio: common: vfio_get_iommu_type1_info
  hw: vfio: common: Introduce vfio_register_msi_iova
  memory: Add reserved_iova region type
  memory: memory_region_find_by_name
  hw: platform-bus: Enable to map any memory region onto the
    platform-bus
  hw: vfio: common: vfio_prepare_msi_mapping
  hw: vfio: common: Adapt vfio_listeners for reserved_iova region

 hw/core/platform-bus.c     |  27 ++++---
 hw/vfio/common.c           | 175 +++++++++++++++++++++++++++++++++++++++------
 include/exec/memory.h      |  40 +++++++++++
 include/hw/platform-bus.h  |   7 ++
 linux-headers/linux/vfio.h |  48 +++++++++++--
 memory.c                   |  27 +++++++
 6 files changed, 288 insertions(+), 36 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2016-10-10 21:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-06 11:41 [Qemu-devel] [RFC v4 0/8] KVM PCI/MSI passthrough with mach-virt Eric Auger
2016-10-06 11:41 ` [Qemu-devel] [RFC v4 1/8] linux-headers: Partial update for MSI IOVA handling Eric Auger
2016-10-06 11:41 ` [Qemu-devel] [RFC v4 2/8] hw: vfio: common: vfio_get_iommu_type1_info Eric Auger
2016-10-06 11:41 ` [Qemu-devel] [RFC v4 3/8] hw: vfio: common: Introduce vfio_register_msi_iova Eric Auger
2016-10-06 11:41 ` [Qemu-devel] [RFC v4 4/8] memory: Add reserved_iova region type Eric Auger
2016-10-06 11:41 ` [Qemu-devel] [RFC v4 5/8] memory: memory_region_find_by_name Eric Auger
2016-10-06 11:41 ` [Qemu-devel] [RFC v4 6/8] hw: platform-bus: Enable to map any memory region onto the platform-bus Eric Auger
2016-10-06 11:41 ` [Qemu-devel] [RFC v4 7/8] hw: vfio: common: vfio_prepare_msi_mapping Eric Auger
2016-10-06 11:41 ` [Qemu-devel] [RFC v4 8/8] hw: vfio: common: Adapt vfio_listeners for reserved_iova region Eric Auger
2016-10-10 16:16 ` [Qemu-devel] [RFC v4 0/8] KVM PCI/MSI passthrough with mach-virt no-reply
2016-10-10 21:11 ` no-reply

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).