qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 0/6] vSMMU initialization
@ 2015-06-12 14:20 Baptiste Reynal
  2015-06-12 14:20 ` [Qemu-devel] [RFC 1/6] headers sync Baptiste Reynal
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Baptiste Reynal @ 2015-06-12 14:20 UTC (permalink / raw)
  To: iommu, qemu-devel; +Cc: Baptiste Reynal, tech, will.deacon

The ARM SMMU has support for 2-stages address translations, allowing a virtual
address to be translated at two levels:
- Stage 1 translates a virtual address (VA) into an intermediate physical
address (IPA)
- Stage 2 translates an IPA into a physical address (PA)

Will Deacon introduced a virtual SMMU interface for KVM, which gives a virtual
machine the possibility to use an IOMMU with native drivers. While the VM will
program the first stage of translation (stage 1), the interface will program
the second (stage 2) on the physical SMMU.

This RFC brings support for the vSMMU on QEMU-side, introducing the code for
vSMMU initialization and the device tree operations needed to attach devices
to it.

The main purpose of such vSMMU device is to allow VFIO devices to benefit
from an IOMMU on the guest side, for userspace drivers or nested VFIO.

It is an early state of development so:
- Interrupts are not handled for now
- Only one device can be bound to the vSMMU

I'm open to any comments or suggestions.

Baptiste Reynal (6):
  headers sync
  hw/core/platform-bus: initialization notifier
  hw/core/platform-bus: add base_address field
  hw/vfio: vsmmu device
  hw/arm/sysbus-fdt: enable vsmmu dynamic instantiation
  hw/arm/sysbus-fdt: add smmu masters in device tree

 hw/arm/sysbus-fdt.c             |  78 ++++++++++++++++++++
 hw/arm/virt.c                   |   4 +
 hw/core/platform-bus.c          |  13 ++++
 hw/vfio/Makefile.objs           |   1 +
 hw/vfio/common.c                |   8 +-
 hw/vfio/platform.c              |   2 +
 hw/vfio/smmu.c                  | 157 ++++++++++++++++++++++++++++++++++++++++
 include/hw/platform-bus.h       |   3 +
 include/hw/vfio/vfio-platform.h |   1 +
 include/hw/vfio/vfio-smmu.h     |  50 +++++++++++++
 linux-headers/linux/kvm.h       |  15 ++++
 11 files changed, 330 insertions(+), 2 deletions(-)
 create mode 100644 hw/vfio/smmu.c
 create mode 100644 include/hw/vfio/vfio-smmu.h

-- 
2.4.3

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

end of thread, other threads:[~2015-07-15 17:38 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-12 14:20 [Qemu-devel] [RFC 0/6] vSMMU initialization Baptiste Reynal
2015-06-12 14:20 ` [Qemu-devel] [RFC 1/6] headers sync Baptiste Reynal
2015-06-12 14:20 ` [Qemu-devel] [RFC 2/6] hw/core/platform-bus: initialization notifier Baptiste Reynal
2015-06-12 14:20 ` [Qemu-devel] [RFC 3/6] hw/core/platform-bus: add base_address field Baptiste Reynal
2015-06-12 14:20 ` [Qemu-devel] [RFC 4/6] hw/vfio: vsmmu device Baptiste Reynal
2015-06-12 14:20 ` [Qemu-devel] [RFC 5/6] hw/arm/sysbus-fdt: enable vsmmu dynamic instantiation Baptiste Reynal
2015-06-12 14:20 ` [Qemu-devel] [RFC 6/6] hw/arm/sysbus-fdt: add smmu masters in device tree Baptiste Reynal
2015-06-12 14:23 ` [Qemu-devel] [RFC 0/6] vSMMU initialization Will Deacon
2015-07-14  2:21   ` Varun Sethi
2015-07-14 11:04     ` Will Deacon
2015-07-15 13:38       ` Baptiste Reynal
2015-07-15 13:42         ` Will Deacon
2015-07-15 16:41         ` Varun Sethi
2015-07-15 17:28       ` Varun Sethi
2015-07-15 17:37         ` Will Deacon

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