qemu-e2k/include
Jason Wang 375f74f473 vhost: generalize iommu memory region
We assumes the iommu_ops were attached to the root region of address
space. This may not be true for all kinds of IOMMU implementation and
especially after commit 3716d5902d ("pci: introduce a bus master
container"). So fix this by not assuming as->root has iommu_ops,
instead depending on the regions reported by memory listener through:

- register a memory listener to dma_as
- during region_add, if it's a region of IOMMU, register a specific
  IOMMU notifier, and store all notifiers in a list.
- during region_del, compare and delete the IOMMU notifier from the list

This is also a must for making vhost device IOTLB works for all types
of IOMMUs. Note, since we register one notifier during each
.region_add, the IOTLB may be flushed more than one times, this is
suboptimal and could be optimized in the future.

Reported-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Fixes: 3716d5902d ("pci: introduce a bus master container")
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2017-03-30 19:09:16 +03:00
..
block block: Always call bdrv_child_check_perm first 2017-03-17 12:54:06 +01:00
crypto
disas
exec RAMBlocks: qemu_ram_is_shared 2017-03-16 09:00:58 +01:00
fpu softfloat: Add float128_to_uint32_round_to_zero() 2017-02-22 11:28:28 +11:00
hw vhost: generalize iommu memory region 2017-03-30 19:09:16 +03:00
io
libdecnumber
migration postcopy: Use temporary for placing zero huge pages 2017-02-28 11:30:23 +00:00
monitor qmp: Dumb down how we run QMP command registration 2017-03-05 09:02:10 +01:00
net eth: Extend vlan stripping functions 2017-03-06 11:46:02 +08:00
qapi qapi: New qobject_input_visitor_new_str() for convenience 2017-03-07 16:07:47 +01:00
qemu win32: replace custom mutex and condition variable with native primitives 2017-03-27 14:41:01 +02:00
qom Merge branch 'icount-update' into HEAD 2017-03-03 16:39:18 +01:00
standard-headers update Linux headers to 4.11 2017-02-28 16:18:49 +00:00
sysemu block-backend: add drained_begin / drained_end ops 2017-03-22 13:26:27 -04:00
ui cirrus/vnc: zap bitblit support from console code. 2017-03-16 08:58:15 +01:00
elf.h
glib-compat.h glib-compat: add g_test_add_data_func_full fallback 2017-03-01 00:09:28 +04:00
qemu-common.h Update copyright year 2017-02-28 09:03:39 +03:00
qemu-io.h hmp: Request permissions in qemu-io 2017-02-28 20:47:50 +01:00
trace-tcg.h