From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sdm4I-0002rT-Fj for qemu-devel@nongnu.org; Sun, 10 Jun 2012 13:36:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sdm4G-0002RI-6D for qemu-devel@nongnu.org; Sun, 10 Jun 2012 13:36:50 -0400 Message-ID: <4FD4DB24.2050305@suse.de> Date: Sun, 10 Jun 2012 19:36:36 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1339343875-6958-1-git-send-email-afaerber@suse.de> <1339343875-6958-2-git-send-email-afaerber@suse.de> <4FD4DA60.1070701@codemonkey.ws> In-Reply-To: <4FD4DA60.1070701@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 1/2] pci_host: Turn into SysBus-derived QOM type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Anthony Liguori , Wanpeng Li , "Michael S. Tsirkin" , qemu-devel@nongnu.org, =?ISO-8859-1?Q?Andreas_F=E4rber?= , "list@suse.de:PReP" , open@suse.de Am 10.06.2012 19:33, schrieb Anthony Liguori: > On 06/10/2012 10:57 AM, Andreas F=E4rber wrote: >> From: Andreas F=E4rber >> >> Allows us to access PCIHostState QOM-style with PCI_HOST() macro. >> >> Update PReP Raven PCI to derive from this type. >> >> Signed-off-by: Anthony Liguori >> Signed-off-by: Wanpeng Li >> Signed-off-by: Andreas F=E4rber >> Reviewed-by: Anthony Liguori >> --- >> hw/pci_host.c | 11 +++++++++++ >> hw/pci_host.h | 3 +++ >> hw/prep_pci.c | 4 ++-- >> 3 files changed, 16 insertions(+), 2 deletions(-) >> >> diff --git a/hw/pci_host.c b/hw/pci_host.c >> index 8041778..347bfa6 100644 >> --- a/hw/pci_host.c >> +++ b/hw/pci_host.c >> @@ -165,4 +165,15 @@ const MemoryRegionOps pci_host_data_be_ops =3D { >> .endianness =3D DEVICE_BIG_ENDIAN, >> }; >> >> +static const TypeInfo pci_host_type_info =3D { >> + .name =3D TYPE_PCI_HOST, >> + .parent =3D TYPE_SYS_BUS_DEVICE, >> + .instance_size =3D sizeof(PCIHostState), >> +}; >=20 > Any reason why PCIHost can't have TYPE_DEVICE as the the parent? Many current users rely on SysBus functionality like MMIO and IRQs. A conversion to TYPE_DEVICE can be done as part of your SysBus removal series. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg