From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAm73-0003wd-Ty for qemu-devel@nongnu.org; Thu, 22 Mar 2012 13:47:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAm71-00030q-Un for qemu-devel@nongnu.org; Thu, 22 Mar 2012 13:47:49 -0400 Received: from fmmailgate06.web.de ([217.72.192.247]:41905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAm71-00030c-Lh for qemu-devel@nongnu.org; Thu, 22 Mar 2012 13:47:47 -0400 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate06.web.de (Postfix) with ESMTP id 2382BFFDF2A for ; Thu, 22 Mar 2012 18:47:46 +0100 (CET) Message-ID: <4F6B65C0.40801@web.de> Date: Thu, 22 Mar 2012 18:47:44 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <5071f24e827d5948ed3de7f53991b148b4ef38e9.1332430835.git.julien.grall@citrix.com> In-Reply-To: <5071f24e827d5948ed3de7f53991b148b4ef38e9.1332430835.git.julien.grall@citrix.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig2706C1F09692232118A428F6" Subject: Re: [Qemu-devel] [QEMU][RFC PATCH 4/6] xen-pci: Register PCI in Xen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Julien Grall Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org, Stefano.Stabellini@eu.citrix.com, julian.pidancet@citrix.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2706C1F09692232118A428F6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2012-03-22 17:01, Julien Grall wrote: > QEMU will now register PCI in Xen. It will usefull to forward > IO config space to the right QEMU. >=20 > Before to register a PCI device, QEMU will check with XenStore if it is= > autorized to register the PCI associate to a given BDF. >=20 > Signed-off-by: Julien Grall > --- > hw/pci.c | 6 +++++ > xen-all.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++++ > 2 files changed, 76 insertions(+), 0 deletions(-) >=20 > diff --git a/hw/pci.c b/hw/pci.c > index bf046bf..4df4449 100644 > --- a/hw/pci.c > +++ b/hw/pci.c > @@ -31,6 +31,7 @@ > #include "loader.h" > #include "range.h" > #include "qmp-commands.h" > +#include "xen.h" > =20 > //#define DEBUG_PCI > #ifdef DEBUG_PCI > @@ -764,6 +765,11 @@ static PCIDevice *do_pci_register_device(PCIDevice= *pci_dev, PCIBus *bus, > pci_dev->devfn =3D devfn; > pstrcpy(pci_dev->name, sizeof(pci_dev->name), name); > pci_dev->irq_state =3D 0; > + > + if (xen_enabled() && xen_register_pcidev(pci_dev)) { > + return NULL; > + } > + That is doomed to break as QEMU evolves. What magical code is supposed to be above, what below this ha^Whook? > pci_config_alloc(pci_dev); > =20 > pci_config_set_vendor_id(pci_dev->config, pc->vendor_id); Jan --------------enig2706C1F09692232118A428F6 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.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9rZcEACgkQitSsb3rl5xRPmgCgkkSTJELDZOjAqreulTN3xHQH Ej8An27ssExUSxIKzbGii5RCDEk4GP1P =bdlT -----END PGP SIGNATURE----- --------------enig2706C1F09692232118A428F6--