Skip to content

RFC AMBA platform device passthrough

Alvise Rigo qemu-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest4 patches 0 repliesNew
  2. v2 RFC4 patches 1 replySuperseded

Changes in v3 from the cover letter

- The EXEC_FLAG now is always used by VFIO if it is supported. QEMU does not need to query the kernel any more to know whether using this flag or not. For this reason, the patch [1/4] of the previous version has been removed.

- Included patch [2/4] from Eric Auger, required by patch [3/4] and [4/4].

- The patch [3/4] of the previous version has been also removed since the introduction of the new mechanism of handling IRQs and EOIs through IRQFD. The patch can nevertheless be used to improve the standard, timer based, mechanism.

- [PATCH 4/4] Instead of checking whether eventfd has been used by event_notifier_init, a new method (eventfd_notifier_init) is added to fulfill this purpose.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Add AMBA devices support to VFIOhw/arm/virt.c+35 -100 replies
2/4vfio: Add irqfd support in platform devicehw/arm/virt.c hw/intc/arm_gic_kvm.c hw/vfio/platform.c+166 -140 replies
3/4Force eventfd as notifying mechanism for VFIOhw/vfio/pci.c hw/vfio/platform.c include/qemu/event_notifier.h +1 more+35 -160 replies
4/4Let VFIO handle the unmasking of interrupts at EOIhw/vfio/platform.c+24 -140 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [Qemu-devel] [RFC PATCH v3 0/4] AMBA platform device passthrough

These patches are the next iteration of "[Qemu-devel] [RFC v2 0/4] AMBA platform device passthrough" and are based on the latest version of VFIO for platform devices "[RFC PATCH v6 00/20] VFIO support for platform devices on ARM" and the initial patch series "[Qemu-devel] [RFC v3 0/10] KVM platform device passthrough".

- [PATCH 1/4] Possibility to bind a wider class of devices. In particular the patch proposes a solution to enhance a bit the device tree nodes generation, allowing to specify more than one compatibility property (handy for AMBA devices). This was required by the DMA330 that needs "arm,pl330","arm,primecell" as compatibility string, together with a clock source defined in the device tree. In the future VFIO will be able to tell if we are dealing with an AMBA device; before that, we have to rely on the compatibility string to state that.

- [PATCH 3/4] The last version of VFIO allows to pass an eventfd file descriptor to unmask a host interrupt. This can be used in conjunction with IRQFD to benefit of the resampler feature; in this way QEMU no longer has to unmask the interrupt because the kernel will take care of it.

- [PATCH 4/4] If event_notifier_init fails to create a new eventfd, it will fallback using pipe/pipe2 and we end up passing to the kernel a wrong file descriptor. This patch force to use eventfd.

Changes since v2:

- The EXEC_FLAG now is always used by VFIO if it is supported. QEMU does not need to query the kernel any more to know whether using this flag or not. For this reason, the patch [1/4] of the previous version has been removed.

- Included patch [2/4] from Eric Auger, required by patch [3/4] and [4/4].

- The patch [3/4] of the previous version has been also removed since the introduction of the new mechanism of handling IRQs and EOIs through IRQFD. The patch can nevertheless be used to improve the standard, timer based, mechanism.

- [PATCH 4/4] Instead of checking whether eventfd has been used by event_notifier_init, a new method (eventfd_notifier_init) is added to fulfill this purpose.

Alvise Rigo (3):
Add AMBA devices support to VFIO
Force eventfd as notifying mechanism for VFIO Let VFIO handle the unmasking of interrupts at EOI

Eric Auger (1):
vfio: Add irqfd support in platform device

 hw/arm/virt.c                 |  59 +++++++++++---
 hw/intc/arm_gic_kvm.c         |   1 +
 hw/vfio/pci.c                 |  18 ++---
 hw/vfio/platform.c            | 179 ++++++++++++++++++++++++++++++++++++++----
 include/qemu/event_notifier.h |   1 +
 util/event_notifier-posix.c   |  24 +++++-
 6 files changed, 244 insertions(+), 38 deletions(-)
Signature · 1 line
1.9.1