All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: dgibson@redhat.com, jasowang@redhat.com, mst@redhat.com,
	pbonzini@redhat.com, cornelia.huck@de.ibm.com, wexu@redhat.com,
	vkaplans@redhat.com, alex.williamson@redhat.com,
	peterx@redhat.com
Subject: [Qemu-devel] [PATCH v4 3/3] intel_iommu: allow UNMAP notifiers
Date: Fri,  9 Sep 2016 10:57:44 +0800	[thread overview]
Message-ID: <1473389864-19694-4-git-send-email-peterx@redhat.com> (raw)
In-Reply-To: <1473389864-19694-1-git-send-email-peterx@redhat.com>

Intel vIOMMU is still lacking of a complete IOMMU notifier mechanism.
Before that is achieved, let's open a door for vhost DMAR support, which
only requires cache invalidations (UNMAP operations).

Meanwhile, converting hw_error() to error_report() and exit(1), to make
the error messages clean and obvious (so no CPU registers will be
dumped).

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 hw/i386/intel_iommu.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 9d49be7..e4c3681 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -1980,10 +1980,14 @@ static void vtd_iommu_notify_flag_changed(MemoryRegion *iommu,
 {
     VTDAddressSpace *vtd_as = container_of(iommu, VTDAddressSpace, iommu);
 
-    hw_error("Device at bus %s addr %02x.%d requires iommu notifier which "
-             "is currently not supported by intel-iommu emulation",
-             vtd_as->bus->qbus.name, PCI_SLOT(vtd_as->devfn),
-             PCI_FUNC(vtd_as->devfn));
+    if (new & IOMMU_NOTIFIER_MAP) {
+        error_report("Device at bus %s addr %02x.%d requires iommu "
+                     "notifier which is currently not supported by "
+                     "intel-iommu emulation",
+                     vtd_as->bus->qbus.name, PCI_SLOT(vtd_as->devfn),
+                     PCI_FUNC(vtd_as->devfn));
+        exit(1);
+    }
 }
 
 static const VMStateDescription vtd_vmstate = {
-- 
2.7.4

  parent reply	other threads:[~2016-09-09  2:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09  2:57 [Qemu-devel] [PATCH v4 0/3] Introduce IOMMUNotifier struct Peter Xu
2016-09-09  2:57 ` [Qemu-devel] [PATCH v4 1/3] memory: introduce IOMMUNotifier and its caps Peter Xu
2016-09-14  5:48   ` David Gibson
2016-09-14  7:15     ` David Gibson
2016-09-14  7:40       ` Peter Xu
2016-09-14 10:47         ` David Gibson
2016-09-14  8:17       ` Peter Xu
2016-09-14 10:50         ` David Gibson
2016-09-09  2:57 ` [Qemu-devel] [PATCH v4 2/3] memory: introduce IOMMUOps.notify_flag_changed Peter Xu
2016-09-14  5:55   ` David Gibson
2016-09-14  7:12     ` Peter Xu
2016-09-14  7:22       ` David Gibson
2016-09-14  7:49         ` Peter Xu
2016-09-14 10:37           ` David Gibson
2016-09-14 11:25             ` Peter Xu
2016-09-09  2:57 ` Peter Xu [this message]
2016-09-14  5:56   ` [Qemu-devel] [PATCH v4 3/3] intel_iommu: allow UNMAP notifiers David Gibson
2016-09-09  4:05 ` [Qemu-devel] [PATCH v4 0/3] Introduce IOMMUNotifier struct no-reply
2016-09-09  6:41   ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473389864-19694-4-git-send-email-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dgibson@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vkaplans@redhat.com \
    --cc=wexu@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.