From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rpi2w-0004gr-Ar for qemu-devel@nongnu.org; Tue, 24 Jan 2012 10:12:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rpi2q-0006bT-If for qemu-devel@nongnu.org; Tue, 24 Jan 2012 10:12:30 -0500 Received: from thoth.sbs.de ([192.35.17.2]:28909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rpi2q-0006ag-6D for qemu-devel@nongnu.org; Tue, 24 Jan 2012 10:12:24 -0500 Message-ID: <4F1ECA53.5090507@siemens.com> Date: Tue, 24 Jan 2012 16:12:19 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1326882794-31816-1-git-send-email-pbonzini@redhat.com> <1326882794-31816-7-git-send-email-pbonzini@redhat.com> In-Reply-To: <1326882794-31816-7-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 6/9] pc: attach ioapic to the QOM composition tree List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On 2012-01-18 11:33, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > hw/pc_piix.c | 7 +++++-- > 1 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/hw/pc_piix.c b/hw/pc_piix.c > index 2aba89c..3f92bf9 100644 > --- a/hw/pc_piix.c > +++ b/hw/pc_piix.c > @@ -54,7 +54,7 @@ static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 }; > static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 }; > static const int ide_irq[MAX_IDE_BUS] = { 14, 15 }; > > -static void ioapic_init(GSIState *gsi_state) > +static DeviceState *ioapic_init(GSIState *gsi_state) > { > DeviceState *dev; > SysBusDevice *d; > @@ -68,6 +68,7 @@ static void ioapic_init(GSIState *gsi_state) > for (i = 0; i < IOAPIC_NUM_PINS; i++) { > gsi_state->ioapic_irq[i] = qdev_get_gpio_in(dev, i); > } > + return dev; > } > > /* PC hardware initialisation */ > @@ -168,7 +169,9 @@ static void pc_init1(MemoryRegion *system_memory, > gsi_state->i8259_irq[i] = i8259[i]; > } > if (pci_enabled) { > - ioapic_init(gsi_state); > + dev = ioapic_init(gsi_state); > + qdev_property_add_child(qdev_resolve_path("/i440fx/piix3", NULL), > + "ioapic", dev, NULL); That's not true. The IOAPIC was a separate IC, not part of the PIIX3. It should be assigned to the board if you want to do it correctly. :) Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux