OSDN Git Service

vfio: Add guest side IOMMU support
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 30 May 2014 19:10:07 +0000 (13:10 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Fri, 30 May 2014 19:10:07 +0000 (13:10 -0600)
commit5e70018b00dbe59a96b80933a0dd308ee1ec4488
tree191156d45385939d42d7d7b1a62ded2e8e5c4b91
parent0688448b71d22912601380b7e7eb66a38dc996b8
vfio: Add guest side IOMMU support

This patch uses the new IOMMU notifiers to allow VFIO pass through devices
to work with guest side IOMMUs, as long as the host-side VFIO iommu has
sufficient capability and granularity to match the guest side. This works
by tracking all map and unmap operations on the guest IOMMU using the
notifiers, and mirroring them into VFIO.

There are a number of FIXMEs, and the scheme involves rather more notifier
structures than I'd like, but it should make for a reasonable proof of
concept.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/misc/vfio.c