From: "Andreas Färber" <afaerber@suse.de>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] isapc: Fix segfault during initialization
Date: Sat, 14 Jan 2012 15:37:05 +0100 [thread overview]
Message-ID: <4F119311.4080204@suse.de> (raw)
In-Reply-To: <4F117F49.1090208@web.de>
Am 14.01.2012 14:12, schrieb Jan Kiszka:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Linking the RTC device state to the PIIX does not belong into the
> common path that is shared with the isapc. QEMU crashes otherwise.
Doesn't that indicate a missing NULL-check or something in
qdev_property_add_child() that should be fixed, too?
Andreas
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> hw/pc_piix.c | 22 +++++++++++-----------
> 1 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/hw/pc_piix.c b/hw/pc_piix.c
> index b70431f..3aea3cc 100644
> --- a/hw/pc_piix.c
> +++ b/hw/pc_piix.c
> @@ -201,6 +201,17 @@ static void pc_init1(MemoryRegion *system_memory,
> }
> idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0");
> idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");
> +
> + /* FIXME there's some major spaghetti here. Somehow we create the
> + * devices on the PIIX before we actually create it. We create the
> + * PIIX3 deep in the recess of the i440fx creation too and then lose
> + * the DeviceState.
> + *
> + * For now, let's "fix" this by making judicious use of paths. This
> + * is not generally the right way to do this.
> + */
> + qdev_property_add_child(qdev_resolve_path("/i440fx/piix3", NULL),
> + "rtc", (DeviceState *)rtc_state, NULL);
> } else {
> for(i = 0; i < MAX_IDE_BUS; i++) {
> ISADevice *dev;
> @@ -211,17 +222,6 @@ static void pc_init1(MemoryRegion *system_memory,
> }
> }
>
> - /* FIXME there's some major spaghetti here. Somehow we create the devices
> - * on the PIIX before we actually create it. We create the PIIX3 deep in
> - * the recess of the i440fx creation too and then lose the DeviceState.
> - *
> - * For now, let's "fix" this by making judicious use of paths. This is not
> - * generally the right way to do this.
> - */
> -
> - qdev_property_add_child(qdev_resolve_path("/i440fx/piix3", NULL),
> - "rtc", (DeviceState *)rtc_state, NULL);
> -
> audio_init(isa_bus, pci_enabled ? pci_bus : NULL);
>
> pc_cmos_init(below_4g_mem_size, above_4g_mem_size, boot_device,
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-01-14 14:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-14 13:12 [Qemu-devel] [PATCH] isapc: Fix segfault during initialization Jan Kiszka
2012-01-14 14:37 ` Andreas Färber [this message]
2012-01-15 14:38 ` Anthony Liguori
2012-01-15 14:40 ` Jan Kiszka
2012-01-15 16:12 ` Anthony Liguori
2012-01-15 16:16 ` Jan Kiszka
2012-01-15 16:20 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F119311.4080204@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=jan.kiszka@web.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.