From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDLqD-0001l6-VG for qemu-devel@nongnu.org; Wed, 15 Jun 2016 21:11:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDLqA-0004zt-Np for qemu-devel@nongnu.org; Wed, 15 Jun 2016 21:11:29 -0400 Received: from ozlabs.org ([103.22.144.67]:57119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDLqA-0004zk-BM for qemu-devel@nongnu.org; Wed, 15 Jun 2016 21:11:26 -0400 Date: Thu, 16 Jun 2016 11:12:55 +1000 From: David Gibson Message-ID: <20160616011255.GJ28087@voom.fritz.box> References: <20160615154203.32658.82724.stgit@gimli.home> <20160615155616.32658.17560.stgit@gimli.home> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="I/5syFLg1Ed7r+1G" Content-Disposition: inline In-Reply-To: <20160615155616.32658.17560.stgit@gimli.home> Subject: Re: [Qemu-devel] [PATCH 2/2] intel_iommu: Throw hw_error on notify_started List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: qemu-devel@nongnu.org, mst@redhat.com, aik@ozlabs.ru, bd.aviv@gmail.com, peterx@redhat.com, marcel@redhat.com, pbonzini@redhat.com --I/5syFLg1Ed7r+1G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 15, 2016 at 09:56:16AM -0600, Alex Williamson wrote: > We don't currently support the MemoryRegionIOMMUOps notifier, so throw > an error should a device require it. >=20 > Signed-off-by: Alex Williamson Reviewed-by: David Gibson > --- > hw/i386/intel_iommu.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c > index 347718f..5eba704 100644 > --- a/hw/i386/intel_iommu.c > +++ b/hw/i386/intel_iommu.c > @@ -24,6 +24,7 @@ > #include "exec/address-spaces.h" > #include "intel_iommu_internal.h" > #include "hw/pci/pci.h" > +#include "hw/pci/pci_bus.h" > =20 > /*#define DEBUG_INTEL_IOMMU*/ > #ifdef DEBUG_INTEL_IOMMU > @@ -1871,6 +1872,16 @@ static IOMMUTLBEntry vtd_iommu_translate(MemoryReg= ion *iommu, hwaddr addr, > return ret; > } > =20 > +static void vtd_iommu_notify_started(MemoryRegion *iommu) > +{ > + VTDAddressSpace *vtd_as =3D container_of(iommu, VTDAddressSpace, iom= mu); > + > + 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)); > +} > + > static const VMStateDescription vtd_vmstate =3D { > .name =3D "iommu-intel", > .unmigratable =3D 1, > @@ -1938,6 +1949,7 @@ static void vtd_init(IntelIOMMUState *s) > memset(s->womask, 0, DMAR_REG_SIZE); > =20 > s->iommu_ops.translate =3D vtd_iommu_translate; > + s->iommu_ops.notify_started =3D vtd_iommu_notify_started; > s->root =3D 0; > s->root_extended =3D false; > s->dmar_enabled =3D false; >=20 --=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 --I/5syFLg1Ed7r+1G Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXYf0XAAoJEGw4ysog2bOSPAkQAJhayvaMXY0GRInIaKICyiR5 K63vIrsBEOr1MeQmweAn3QyKwkIZRgrpMuz8Y1ZkD67Jbk22cpNwMO1Kou2ikAH4 WAzLk81CeA4vJk5ClZqqwrwaMbxlzE882jX4tI3rcMhzUi09vDBO+09G+eIEF2Ft As6iAzVZGVF+FthBF4dUtWCtBjr4IEjSXuPX1I0mOpt8NzepYasb03s3vzTPEwKd 2OHmcyTr5cXaZWgIftdv7bl6UbAkdEE9GJuTN1RlkI2aq6KIIk4E1Uwtu4VOVhlH 7+AQBp/XLZu50Nh9dluJErwxwJ2UywADVuENgRFfMIkQaSJL73WhiMdtX1pqDTud sWC3jl7EGGCvqLg9NSx1mm5d1zqD5JkqBEymx7pIKoD9i6nBWrDEUmlztms2+i+/ cD0Rl+lY2Dkd3BSdlZISPtYUSD33mip3GJymDUQrwX41bwBOLDVsrA4iBnRv6f3o BNYDlEr5CEHVxw4SkgUPpYwkj+gR30ShB9CtPQAHkeLJDKTx59wDeCBlIBfEXl0C GwzZ39izODEhIM3T25aeNolzgabhj4xDRuyBRUP9qjur+n/DRYu3iq9XPppvRx5V YkNn+U9H4o5nxSk6trjAPcdZL6d2gUnRn6YN92uj9sXPw6ScQIaaOyDuq0rQLZys UIF/tRWw3RAI3n3jiOt9 =CDc2 -----END PGP SIGNATURE----- --I/5syFLg1Ed7r+1G--