From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQEhW-0000EF-Gj for qemu-devel@nongnu.org; Mon, 22 Oct 2012 05:53:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQEhQ-00069i-OX for qemu-devel@nongnu.org; Mon, 22 Oct 2012 05:53:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQEhQ-00069Y-Em for qemu-devel@nongnu.org; Mon, 22 Oct 2012 05:53:32 -0400 Date: Mon, 22 Oct 2012 12:55:37 +0200 From: "Michael S. Tsirkin" Message-ID: <20121022105537.GH28828@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 11/26] pcie: Convert PCIExpressHost to use the QOM. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Baron Cc: agraf@suse.de, aliguori@us.ibm.com, juzhang@redhat.com, jan.kiszka@siemens.com, qemu-devel@nongnu.org, armbru@redhat.com, blauwirbel@gmail.com, yamahata@valinux.co.jp, alex.williamson@redhat.com, kevin@koconnor.net, avi@redhat.com, mkletzan@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com, afaerber@suse.de, kraxel@redhat.com On Fri, Oct 19, 2012 at 04:43:33PM -0400, Jason Baron wrote: > From: Jason Baron >=20 > Let's use PCIExpressHost with QOM. >=20 > Reviewed-by: Paolo Bonzini > Acked-by: Andreas F=E4rber > Signed-off-by: Jason Baron Applied, thanks. > --- > hw/pcie_host.c | 14 ++++++++++++++ > hw/pcie_host.h | 4 ++++ > 2 files changed, 18 insertions(+), 0 deletions(-) >=20 > diff --git a/hw/pcie_host.c b/hw/pcie_host.c > index e2fd276..027ba05 100644 > --- a/hw/pcie_host.c > +++ b/hw/pcie_host.c > @@ -145,3 +145,17 @@ void pcie_host_mmcfg_update(PCIExpressHost *e, > pcie_host_mmcfg_map(e, addr, size); > } > } > + > +static const TypeInfo pcie_host_type_info =3D { > + .name =3D TYPE_PCIE_HOST_BRIDGE, > + .parent =3D TYPE_PCI_HOST_BRIDGE, > + .abstract =3D true, > + .instance_size =3D sizeof(PCIExpressHost), > +}; > + > +static void pcie_host_register_types(void) > +{ > + type_register_static(&pcie_host_type_info); > +} > + > +type_init(pcie_host_register_types) > diff --git a/hw/pcie_host.h b/hw/pcie_host.h > index 2faa54e..2494c71 100644 > --- a/hw/pcie_host.h > +++ b/hw/pcie_host.h > @@ -24,6 +24,10 @@ > #include "pci_host.h" > #include "memory.h" > =20 > +#define TYPE_PCIE_HOST_BRIDGE "pcie-host-bridge" > +#define PCIE_HOST_BRIDGE(obj) \ > + OBJECT_CHECK(PCIExpressHost, (obj), TYPE_PCIE_HOST_BRIDGE) > + > struct PCIExpressHost { > PCIHostState pci; > =20 > --=20 > 1.7.1