[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 11/16] hw/arm/virt: add support for VFIO devices
From: |
Eric Auger |
Subject: |
[Qemu-devel] [PATCH v7 11/16] hw/arm/virt: add support for VFIO devices |
Date: |
Fri, 31 Oct 2014 14:05:45 +0000 |
VFIO devices are dynamic sysbus devices. They could already be
instantiated. However for them to be functional, IRQ injection must
be programmed and started. This programming must happen after the
sysbus devices are attached to the platform bus and IRQ are bound.
Only at that time the GSI they are connected to are identified and
irqfd can be programmed.
Binding happens in a machine init done notifier registered by the
platform bus init. The IRQ start is done in another notifier that
must be registered before the platform bus creation.
This patchs adds the registration of the IRQ start notifier in machvirt.
Signed-off-by: Eric Auger <address@hidden>
---
The registration of the IRQ start notifier could also happen in
the platform bus.
---
hw/arm/virt.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 3a09d58..911dbfc 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -44,6 +44,7 @@
#include "qemu/error-report.h"
#include "hw/arm/sysbus-fdt.h"
#include "hw/platform-bus.h"
+#include "hw/vfio/vfio-platform.h"
#define NUM_VIRTIO_TRANSPORTS 32
@@ -546,6 +547,14 @@ static void create_platform_bus(VirtBoardInfo *vbi,
qemu_irq *pic,
MemoryRegion *sysmem = get_system_memory();
/*
+ * Registers a notifier that starts VFIO IRQ injection. The notifier
+ * must be registered before the platform bus device creation. This
+ * latter registers another notifier that binds the dynamic sysbus
+ * devices to the platform bus.
+ */
+ vfio_register_irq_starter(system_params->platform_bus_first_irq);
+
+ /*
* register the notifier that will update the device tree with
* the platform bus and device tree nodes. Must be done before
* the instantiation of the platform bus device that registers
--
1.8.3.2
- [Qemu-devel] [PATCH v7 00/16] KVM platform device passthrough, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 09/16] hw/vfio/platform: add vfio-platform support, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 16/16] hw/vfio/platform: add forwarded irq support, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 15/16] hw/vfio/common: vfio_kvm_device_fd moved in the common header, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 13/16] hw/vfio/platform: Add irqfd support, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 14/16] linux-headers: Update KVM headers from linux-next tag ToBeFilled, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 12/16] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 10/16] hw/vfio: calxeda xgmac device, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 11/16] hw/arm/virt: add support for VFIO devices,
Eric Auger <=
- [Qemu-devel] [PATCH v7 06/16] hw/vfio/pci: rename group_list into vfio_group_list, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 05/16] hw/vfio/pci: split vfio_get_device, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 08/16] hw/vfio: create common module, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 03/16] hw/vfio/pci: introduce VFIODevice, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 04/16] hw/vfio/pci: Introduce VFIORegion, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 02/16] hw/vfio/pci: Rename VFIODevice into VFIOPCIDevice, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 01/16] vfio: move hw/misc/vfio.c to hw/vfio/pci.c Move vfio.h into include/hw/vfio, Eric Auger, 2014/10/31
- [Qemu-devel] [PATCH v7 07/16] hw/vfio/pci: use name field in format strings, Eric Auger, 2014/10/31