[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/28] intel_iommu: allow UNMAP notifiers
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 03/28] intel_iommu: allow UNMAP notifiers |
Date: |
Mon, 26 Sep 2016 15:40:33 +0200 |
From: Peter Xu <address@hidden>
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 <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
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
- [Qemu-devel] [PULL 00/28] Misc patches for 2016-09-26, Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PULL 01/28] memory: introduce IOMMUNotifier and its caps, Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PULL 03/28] intel_iommu: allow UNMAP notifiers,
Paolo Bonzini <=
- [Qemu-devel] [PULL 02/28] memory: introduce IOMMUOps.notify_flag_changed, Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PULL 04/28] x86: ioapic: boost default version to 0x20, Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PULL 05/28] checkpatch: downgrade "architecture specific defines should be avoided", Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PULL 07/28] migration: sync all address spaces, Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PULL 09/28] build-sys: put glib_cflags in QEMU_CFLAGS, Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PULL 08/28] build-sys: remove unused GLIB_CFLAGS, Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PULL 06/28] compiler: Swap 'public domain' header for license, Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PULL 10/28] cpus: pass CPUState to run_on_cpu helpers, Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PULL 12/28] cpus: Rename flush_queued_work(), Paolo Bonzini, 2016/09/26
- [Qemu-devel] [PULL 11/28] cpus: Move common code out of {async_, }run_on_cpu(), Paolo Bonzini, 2016/09/26