From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmELP-0006rk-3Y for qemu-devel@nongnu.org; Tue, 20 Sep 2016 02:15:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmELK-00006g-Vz for qemu-devel@nongnu.org; Tue, 20 Sep 2016 02:15:50 -0400 Received: from ozlabs.org ([103.22.144.67]:50893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmELK-0008V5-8w for qemu-devel@nongnu.org; Tue, 20 Sep 2016 02:15:46 -0400 Date: Tue, 20 Sep 2016 16:14:09 +1000 From: David Gibson Message-ID: <20160920061409.GX20488@umbus> References: <1473841548-26742-1-git-send-email-peterx@redhat.com> <1473841548-26742-4-git-send-email-peterx@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="21/Vc5rId7THQcsT" Content-Disposition: inline In-Reply-To: <1473841548-26742-4-git-send-email-peterx@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 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 --21/Vc5rId7THQcsT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 14, 2016 at 04:25:48PM +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). Erm... AIUI currently the intel iommu driver doesn't do any notifications. Surely it's only valid to allow this once you've implemented unmap side notifications. > 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 --21/Vc5rId7THQcsT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX4NOxAAoJEGw4ysog2bOSYQ0P/R4opL/s60gChEDSMWh0S+pv HYsw7vtadGw+LasTBwznvOAmvh6pCGBF3eRQtPa60y4KE0Rsvu2Yee+cNuJz5lnh xjR78bFH06wWeymH3OQzhJJvHm8nHvcP+gsiDNys8pIqmEeK3maxA01lNkZfzClk UUkl98FHFJps4R1LfEN1V1uqVjmIOJOs92U2Pd7DI/OqXL2wnZYLM3xzE/FuSxJA RoG9CR/uCPZlgzxKxkyU81QgehKyFt+/PLEBr7g5cRfXAE1fJvkNHoFjTEqvOhn4 UjMIR8PcEAIE2cQWY4yL+glnNzgIsl1+3yBMvZRYZaITE2A8L2XgTZUvtaZCSX20 204BmDbcMV8Wx/UL2xbkULFbTZHGmI6M3Wc+TzUeQJt1nOR/XQQOPuSvJHANr3+F 3+eOl4lKg+wqrMjA57LpBCByU7fMh9aLIL+KzJxxPojc8c7IZt481vzFRCly5KBM ythFszaEKPCxK4rf1PRBiAM50MMfaXbqwlHlKdN/riSRGcL9MyZyGzx98/mDSgo4 UEILg2MqgmTcQrTTsPvmsdg8xzsYy6tpHKiMqeuWTYwmIkyNjKPEBupbI6FU8hK1 6a/n4P21jU34sau7XPBcKipFHENpb7TV9D8U2CWe83jv0nPKdeItelcolIO3axvs EbMN2KOrWO6dVtpnPo8c =8QhY -----END PGP SIGNATURE----- --21/Vc5rId7THQcsT--