All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] memory/intel_iommu: Generate error for incompatible usage
@ 2016-06-15 15:56 Alex Williamson
  2016-06-15 15:56 ` [Qemu-devel] [PATCH 1/2] memory: Add MemoryRegionIOMMUOps.notify_started/stopped callbacks Alex Williamson
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Alex Williamson @ 2016-06-15 15:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: mst, aik, bd.aviv, peterx, marcel, pbonzini, david

VT-d emulation is currently incompatible with device assignment due
to intel_iommu's lack of support for memory_region_notify_iommu().
Alexey has proposed a nice addition to the MemoryRegionIOMMUOps
structure that adds callbacks when the first iommu notifier is
registered and the last is removed.  For POWER this will allow them
to switch the view of the iommu depending on whether anyone in
userspace is watching.  For VT-d I expect that eventually we'll use
these callbacks to enable and disable code paths so that we avoid
notifier overhead when there are no registered notifiy-ees.  For now,
we don't support calling memory_region_notify_iommu(), so this
signals an incompatible hardware configuration.  If we choose to make
CM=0 a user selectable option, something like this might continue to
be useful if we only support notifies via invalidations rather than
full VT-d data structure shadowing.

Even though we're currently working on enabling users like vfio-pci
with VT-d, I believe this is correct for the current state of things.
We might even want to consider this stable for v2.6.x so that
downstreams pick it up to avoid incompatible configurations.

Alexey, I hope I'm not stepping on your toes by extracting this
from your latest patch series.  Please let us know whether you
approve.  Thanks,

Alex

---

Alex Williamson (1):
      intel_iommu: Throw hw_error on notify_started

Alexey Kardashevskiy (1):
      memory: Add MemoryRegionIOMMUOps.notify_started/stopped callbacks


 hw/i386/intel_iommu.c |   12 ++++++++++++
 hw/vfio/common.c      |    5 +++--
 include/exec/memory.h |    8 +++++++-
 memory.c              |   10 +++++++++-
 4 files changed, 31 insertions(+), 4 deletions(-)

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

end of thread, other threads:[~2016-06-29 15:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15 15:56 [Qemu-devel] [PATCH 0/2] memory/intel_iommu: Generate error for incompatible usage Alex Williamson
2016-06-15 15:56 ` [Qemu-devel] [PATCH 1/2] memory: Add MemoryRegionIOMMUOps.notify_started/stopped callbacks Alex Williamson
2016-06-15 15:56 ` [Qemu-devel] [PATCH 2/2] intel_iommu: Throw hw_error on notify_started Alex Williamson
2016-06-16  1:12   ` David Gibson
2016-06-16  7:22   ` Marcel Apfelbaum
2016-06-16  1:43 ` [Qemu-devel] [PATCH 0/2] memory/intel_iommu: Generate error for incompatible usage Alexey Kardashevskiy
2016-06-27  4:46   ` Alexey Kardashevskiy
2016-06-27  5:12     ` Alex Williamson
2016-06-16  3:21 ` Peter Xu
2016-06-28 14:49 ` Alex Williamson
2016-06-29 10:53   ` Paolo Bonzini
2016-06-29 15:56     ` Alex Williamson
2016-06-29 15:58       ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.