From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bk3Cw-00045p-8Q for qemu-devel@nongnu.org; Wed, 14 Sep 2016 01:58:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bk3Cr-0003uS-2e for qemu-devel@nongnu.org; Wed, 14 Sep 2016 01:58:05 -0400 Received: from ozlabs.org ([103.22.144.67]:48767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bk3Cq-0003r9-LF for qemu-devel@nongnu.org; Wed, 14 Sep 2016 01:58:01 -0400 Date: Wed, 14 Sep 2016 15:56:45 +1000 From: David Gibson Message-ID: <20160914055645.GN15077@voom.fritz.box> References: <1473389864-19694-1-git-send-email-peterx@redhat.com> <1473389864-19694-4-git-send-email-peterx@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O27Gs9jTTFWz3gAR" Content-Disposition: inline In-Reply-To: <1473389864-19694-4-git-send-email-peterx@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 3/3] intel_iommu: allow UNMAP notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu Cc: qemu-devel@nongnu.org, mst@redhat.com, jasowang@redhat.com, vkaplans@redhat.com, alex.williamson@redhat.com, wexu@redhat.com, pbonzini@redhat.com, cornelia.huck@de.ibm.com, dgibson@redhat.com --O27Gs9jTTFWz3gAR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 09, 2016 at 10:57:44AM +0800, Peter Xu wrote: > 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). >=20 > 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). Ah, you can scratch the comment I made about this in the previous patch, I hadn't realised this just threw an error at present. >=20 > Signed-off-by: Peter Xu Reviewed-by: David Gibson > --- > hw/i386/intel_iommu.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) >=20 > 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(MemoryR= egion *iommu, > { > VTDAddressSpace *vtd_as =3D container_of(iommu, VTDAddressSpace, iom= mu); > =20 > - hw_error("Device at bus %s addr %02x.%d requires iommu notifier whic= h " > - "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); > + } > } > =20 > static const VMStateDescription vtd_vmstate =3D { --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --O27Gs9jTTFWz3gAR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJX2OadAAoJEGw4ysog2bOStbUQALuXiJ3WMtqRH6ZhcDPoNEBl ceDKaahQVSs2XBky1XHgpWfbMfD0M0DFcOT0irhxYocFbGJk4vXzXnSkC5YGvAB3 41baOjV6+elhIKBYuhhYOHeVd49aGTWbBhJyjpND0EI5I/tyScj9Xoy8SzeZ32Lx ScRorAdk42vRZEyehLQgtnwqiX4b9327edUFNjh9ZANQDFt+bKp0hBl++VNMKh7Q jDhsbTH0Yh84BTVvd4UuiFGmB7r/hZ965jTw/KFqefb8H1VPC9gIctk5C0i7C06V cs+y5YvTs+6SVL4GrpmCn5qtOQcof7S03E8uFtbPpRxdj3Zt7EMWkfQHSuZ+MvPm tnmGT+MRb1lZDFItQiHYCPywqx12I+0xgpsBT0lWdgUn7BOk+sHbdPAOstH+sPEk VlyxMxHU4tP4TS3pFeHlfNyGCBBm7zxkdjHtfzrE6uvBRj8Uq3dop+LIP5qkuQMw Kz+NK/YzCeae+cqaeMHFuyloZ9GmFa0HF1P9+YRf47AoEkZP68lxq9sm7Y1X0V5a vHS/LDvk8/9lXpMgqsLmg90hDM5+WvuLHh7+fDtlei8pykqe16ltX7o73mBZnjst jQ/ElkLCs7I052YjSKgr4ITiVyKi8vA5ZYuRFfhOTOEbX/FrnZeMV+MP2P0cMQl8 PjFBO6FA0WEXzmEHFskc =LHk1 -----END PGP SIGNATURE----- --O27Gs9jTTFWz3gAR--