From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi0QY-0004B9-I9 for qemu-devel@nongnu.org; Sat, 25 Oct 2014 08:26:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xi0QR-0007iR-0G for qemu-devel@nongnu.org; Sat, 25 Oct 2014 08:26:38 -0400 Message-ID: <544B9695.2080407@web.de> Date: Sat, 25 Oct 2014 14:24:53 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1413844443-28894-1-git-send-email-knut.omang@oracle.com> <1413844443-28894-3-git-send-email-knut.omang@oracle.com> <544B8B50.7080607@web.de> In-Reply-To: <544B8B50.7080607@web.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C9j5mREvBk4tI78xEwpLAkR13DbPLW2P5" Subject: Re: [Qemu-devel] [PATCH 2/2] intel_iommu: Add support for translation for devices behind bridges. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Knut Omang , qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Michael Tokarev , "Michael S. Tsirkin" , Mark Cave-Ayland , Alexander Graf , Markus Armbruster , =?ISO-8859-15?Q?Andreas_F=E4rber?= , =?ISO-8859-15?Q?Herv=E9_Poussineau?= , Anthony Liguori , Stefan Weil , qemu-ppc@nongnu.org, Richard Henderson This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --C9j5mREvBk4tI78xEwpLAkR13DbPLW2P5 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 2014-10-25 13:36, Jan Kiszka wrote: > On 2014-10-21 00:34, Knut Omang wrote: >> diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c >> index 40c97b1..e6832c4 100644 >> --- a/hw/pci/pci_bridge.c >> +++ b/hw/pci/pci_bridge.c >> @@ -376,8 +376,14 @@ int pci_bridge_initfn(PCIDevice *dev, const char = *typename) >> sec_bus->address_space_io =3D &br->address_space_io; >> memory_region_init(&br->address_space_io, OBJECT(br), "pci_bridge= _io", 65536); >> br->windows =3D pci_bridge_region_init(br); >> + >> QLIST_INIT(&sec_bus->child); >> QLIST_INSERT_HEAD(&parent->child, sec_bus, sibling); >> + >> + if (dev->bus->iommu_opaque) { >> + pci_setup_iommu(sec_bus, dev->bus->iommu_fn, dev->bus->iommu_= opaque); >> + } >> + >=20 > So, if I followed the discussion in the cover-letter thread correctly, > this should rather move into the bridge device init functions because > the PCI[e]-PCI bridge ("pci-bridge") would not call it, right? Not right. We need the setup in any case (except for the virtio bridges I'm currently thinking of for encapsulating non-translatable virtio devices). But something still has to change to reflect the requester ID aliasing of the PCIe-PCI bridge, no? Jan --C9j5mREvBk4tI78xEwpLAkR13DbPLW2P5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlRLlpkACgkQitSsb3rl5xQmPwCgrtNdcMhydr0X/yblbV5m6bIO dekAoId8o/a+Jbd2hARuIwzZO80lsj+Q =8UaF -----END PGP SIGNATURE----- --C9j5mREvBk4tI78xEwpLAkR13DbPLW2P5--