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 v6 3/3] intel_iommu: allow UNMAP notifiers
Date: Wed, 21 Sep 2016 12:58:56 +0800 [thread overview]
Message-ID: <1474433936-19617-4-git-send-email-peterx@redhat.com> (raw)
In-Reply-To: <1474433936-19617-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).
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
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
next prev parent reply other threads:[~2016-09-21 4:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 4:58 [Qemu-devel] [PATCH v6 0/3] Introduce IOMMUNotifier struct Peter Xu
2016-09-21 4:58 ` [Qemu-devel] [PATCH v6 1/3] memory: introduce IOMMUNotifier and its caps Peter Xu
2016-09-22 5:20 ` David Gibson
2016-09-22 7:17 ` Peter Xu
2016-09-23 0:36 ` David Gibson
2016-09-21 4:58 ` [Qemu-devel] [PATCH v6 2/3] memory: introduce IOMMUOps.notify_flag_changed Peter Xu
2016-09-21 4:58 ` Peter Xu [this message]
2016-09-22 5:24 ` [Qemu-devel] [PATCH v6 3/3] intel_iommu: allow UNMAP notifiers David Gibson
2016-09-22 5:55 ` Peter Xu
2016-09-22 7:44 ` Paolo Bonzini
2016-09-23 0:35 ` David Gibson
2016-09-23 0:35 ` David Gibson
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=1474433936-19617-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 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).