From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoXtF-0002XA-TA for qemu-devel@nongnu.org; Tue, 10 Jul 2012 06:41:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoXtB-0001yt-4J for qemu-devel@nongnu.org; Tue, 10 Jul 2012 06:41:57 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60320 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoXtA-0001yd-RI for qemu-devel@nongnu.org; Tue, 10 Jul 2012 06:41:53 -0400 Message-ID: <4FFC06EC.5080100@suse.de> Date: Tue, 10 Jul 2012 12:41:48 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1341900967-4344-1-git-send-email-qemulist@gmail.com> <1341900967-4344-6-git-send-email-qemulist@gmail.com> <4FFBEBA0.3080609@redhat.com> In-Reply-To: <4FFBEBA0.3080609@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 5/5] apic: create apic as a child of cpu, not system_bus any longer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Jan Kiszka , Liu Ping Fan , qemu-devel@nongnu.org, Blue Swirl , Anthony Liguori , Igor Mammedov Am 10.07.2012 10:45, schrieb Paolo Bonzini: > Il 10/07/2012 08:16, Liu Ping Fan ha scritto: >> Signed-off-by: Liu Ping Fan >> --- >> hw/pc.c | 10 +++++----- >> 1 files changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/hw/pc.c b/hw/pc.c >> index c7e9ab3..8df58c9 100644 >> --- a/hw/pc.c >> +++ b/hw/pc.c >> @@ -886,17 +886,17 @@ DeviceState *cpu_get_current_apic(void) >> } >> } >> =20 >> -static DeviceState *apic_init(void *env, uint8_t apic_id) >> +static DeviceState *apic_init(void *cpu, void *env, uint8_t apic_id) >> { >> DeviceState *dev; >> static int apic_mapped; >> =20 >> if (kvm_irqchip_in_kernel()) { >> - dev =3D qdev_create(NULL, "kvm-apic"); >> + dev =3D qdev_create_kid(OBJECT(cpu), "kvm-apic"); >> } else if (xen_enabled()) { >> - dev =3D qdev_create(NULL, "xen-apic"); >> + dev =3D qdev_create_kid(OBJECT(cpu), "xen-apic"); >> } else { >> - dev =3D qdev_create(NULL, "apic"); >> + dev =3D qdev_create_kid(OBJECT(cpu), "apic"); >> } >=20 > Does it make sense instead to do this in the realize method of the CPU? Igor was working on patches to do that. We ran into other design issues on that road, yesterday I made a proposal how we might proceed with his approach: http://lists.nongnu.org/archive/html/qemu-devel/2012-07/msg00992.html 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