From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmwVi-0003dd-IS for qemu-devel@nongnu.org; Thu, 22 Sep 2016 01:25:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmwVf-0000bq-Dj for qemu-devel@nongnu.org; Thu, 22 Sep 2016 01:25:26 -0400 Received: from ozlabs.org ([103.22.144.67]:33634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmwVf-0000bY-01 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 01:25:23 -0400 Date: Thu, 22 Sep 2016 15:24:43 +1000 From: David Gibson Message-ID: <20160922052443.GG2085@umbus.fritz.box> References: <1474433936-19617-1-git-send-email-peterx@redhat.com> <1474433936-19617-4-git-send-email-peterx@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9Iq5ULCa7nGtWwZS" Content-Disposition: inline In-Reply-To: <1474433936-19617-4-git-send-email-peterx@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 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 --9Iq5ULCa7nGtWwZS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 21, 2016 at 12:58:56PM +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). >=20 > Reviewed-by: David Gibson Uh.. I didn't send an R-b for this. In fact I explicitly said I didn't think it should be applied until notifications have actually been implemented by the intel viommu. I still think that, and think this should just be dropped. > Signed-off-by: Peter Xu > --- > 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 --9Iq5ULCa7nGtWwZS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX42sbAAoJEGw4ysog2bOSUSgP/jr1W5MGabtGbH93LFtHHK7u ft/uW2nD0ixDdYxl8615WrB8/tgbh8rXLlL3+xk2iLKUdMmOefRrW+0La5EzLDzO uZ+uUuSXtGKj/qGFMPSzTeencEXvVKEYHsxus6D6o8/x/goT8tuuwlI0gdzCz7pC Ure2LvXWbbTkys5G+lKH7kp23XRJ6o8NaU5qizYhao8qFiwGkRhlW2pqu08eIrNk qY1OhQXKUgosbtpfF/vURJycjz+0/2fg+kTRLwo0CypS19M9x74JOy2HgV3xv5RG fGyDrZPHshYAY7l2LXLpH4KAFgdIe6EThJGpxxsRXGCrFqKZvNLAWCQWLuV8ZgdK DuIQU3+6fWGwC8f+ILMCzXsYuiNMyQOExoOrQDDYQRQ7a2OjBlp6m7Sv9rA0akNn enxsn7Sg7kjGD+gGfwB6Rh/qY0IHKTDc6ZVccJ/d9I0hPQERLWsteHoAlf4r6HHE XxcgR1Bs0qsuR4cd6lFQ+O25RSAvRE3NQPOhN0Jtg0UvXwMCH3bi8Fz3Zm1IdpaI 4VP76UfZVutJ7YweazfVZAo6MDu/XgtsDlBJ7MHTTyCmC/lrXAP7wkjAkjUVgFHR xwsR4S9PB/N2Lig4hisS8KlaM3eastB+ImqVC9wCzlw9ZOXHIDT/yQKdlYsahD7C QpsH8SbqICwngTRDgDP/ =9IY6 -----END PGP SIGNATURE----- --9Iq5ULCa7nGtWwZS--