qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/5] Allow memory_region_register_iommu_notifier() to fail
@ 2019-09-19 12:18 Eric Auger
  2019-09-19 12:18 ` [Qemu-devel] [PATCH v2 1/5] memory: allow " Eric Auger
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Eric Auger @ 2019-09-19 12:18 UTC (permalink / raw)
  To: eric.auger.pro, eric.auger, qemu-devel, qemu-arm, peter.maydell,
	pbonzini, alex.williamson, peterx
  Cc: mst

This series allows the memory_region_register_iommu_notifier()
to fail. As of now, when a MAP notifier is attempted to be
registered along with SMMUv3, Intel iommu without caching mode
or AMD IOMMU, we exit in the IOMMU MR notify_flag_changed()
callback. In case of VFIO assigned device hotplug, this could be
handled more nicely directly within the VFIO code, simply rejecting
the hotplug without exiting. This is what the series achieves
by handling the memory_region_register_iommu_notifier() returned
value.

Best Regards

Eric

This series can be found at:
https://github.com/eauger/qemu/tree/v4.1.0_register_iommu_notifier_fail_v2

History:

v1 -> v2:
- Intel IOMMU now handles the problem differently with machine init done
  notifier and machine hotplug allowed hook.
- use assert(!ret)
- message rewording in SMMUv3

Follow-up of "VFIO/SMMUv3: Fail on VFIO/HW nested paging detection"
https://patchew.org/QEMU/20190829090141.21821-1-eric.auger@redhat.com/


Eric Auger (5):
  memory: allow memory_region_register_iommu_notifier() to fail
  vfio/common: Handle memory_region_register_iommu_notifier() failure
  exec: assert on memory_region_register_iommu_notifier() failure
  vhost: assert on memory_region_register_iommu_notifier() failure
  amd_iommu: Let amdvi_iommu_notify_flag_changed() fail

 exec.c                |  6 ++++--
 hw/arm/smmuv3.c       | 12 +++++++-----
 hw/i386/amd_iommu.c   |  9 +++++----
 hw/i386/intel_iommu.c |  7 ++++---
 hw/ppc/spapr_iommu.c  |  7 ++++---
 hw/vfio/common.c      |  8 ++++++--
 hw/virtio/vhost.c     |  5 +++--
 include/exec/memory.h | 18 +++++++++++++-----
 memory.c              | 28 ++++++++++++++++++----------
 9 files changed, 64 insertions(+), 36 deletions(-)

-- 
2.20.1



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

end of thread, other threads:[~2019-09-20  7:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-19 12:18 [Qemu-devel] [PATCH v2 0/5] Allow memory_region_register_iommu_notifier() to fail Eric Auger
2019-09-19 12:18 ` [Qemu-devel] [PATCH v2 1/5] memory: allow " Eric Auger
2019-09-19 12:18 ` [Qemu-devel] [PATCH v2 2/5] vfio/common: Handle memory_region_register_iommu_notifier() failure Eric Auger
2019-09-19 12:18 ` [Qemu-devel] [PATCH v2 3/5] exec: assert on " Eric Auger
2019-09-19 12:18 ` [Qemu-devel] [PATCH v2 4/5] vhost: " Eric Auger
2019-09-19 12:18 ` [Qemu-devel] [PATCH v2 5/5] amd_iommu: Let amdvi_iommu_notify_flag_changed() fail Eric Auger
2019-09-20  6:16 ` [PATCH v2 0/5] Allow memory_region_register_iommu_notifier() to fail Peter Xu
2019-09-20  7:05   ` Auger Eric

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