From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnhRO-0006Ru-A3 for qemu-devel@nongnu.org; Thu, 30 Apr 2015 01:55:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnhRL-0000xF-1L for qemu-devel@nongnu.org; Thu, 30 Apr 2015 01:55:18 -0400 Received: from cantor2.suse.de ([195.135.220.15]:44574 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnhRK-0000xA-RV for qemu-devel@nongnu.org; Thu, 30 Apr 2015 01:55:14 -0400 Message-ID: <5541C3C0.6090403@suse.de> Date: Thu, 30 Apr 2015 07:55:12 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <7faa06027a446f7eed60976d458bbad4ca9bbb48.1430357187.git.zhugh.fnst@cn.fujitsu.com> In-Reply-To: <7faa06027a446f7eed60976d458bbad4ca9bbb48.1430357187.git.zhugh.fnst@cn.fujitsu.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RESEND PATCH v4 3/4] cpu/apic: drop icc bus/bridge/ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhu Guihua , qemu-devel@nongnu.org Cc: chen.fan.fnst@cn.fujitsu.com, imammedo@redhat.com, guz.fnst@cn.fujitsu.com, izumi.taku@jp.fujitsu.com Subject: s|bus/bridge/|bus/bridge| Am 30.04.2015 um 03:33 schrieb Zhu Guihua: > From: Chen Fan >=20 > ICC bus was invented only to provide hotplug capability to > CPU and APIC because at the time being hotplug was available only for > BUS attached devices. >=20 > Now this patch is to drop ICC bus impl, and switch to bus-less > CPU+APIC hotplug, handling them in the same manner as pc-dimm. > and due to APIC is bus-less, so we should reset it as CPU reset. >=20 > Signed-off-by: Chen Fan > Signed-off-by: Zhu Guihua > --- > hw/i386/pc.c | 19 +++++-------------- > hw/i386/pc_piix.c | 9 +-------- > hw/i386/pc_q35.c | 9 +-------- > hw/intc/apic_common.c | 5 ++--- > include/hw/i386/apic_internal.h | 7 ++++--- > include/hw/i386/pc.h | 2 +- > target-i386/cpu.c | 14 ++++++++------ > 7 files changed, 22 insertions(+), 43 deletions(-) >=20 > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index a5e2a27..00b3ddd 100644 > --- a/hw/i386/pc.c > +++ b/hw/i386/pc.c > @@ -58,7 +58,6 @@ > #include "qemu/config-file.h" > #include "hw/acpi/acpi.h" > #include "hw/acpi/cpu_hotplug.h" > -#include "hw/cpu/icc_bus.h" > #include "hw/boards.h" > #include "hw/pci/pci_host.h" > #include "acpi-build.h" > @@ -990,22 +989,17 @@ void pc_acpi_smi_interrupt(void *opaque, int irq,= int level) > } > =20 > static X86CPU *pc_new_cpu(const char *cpu_model, int64_t apic_id, > - DeviceState *icc_bridge, Error **errp) > + Error **errp) > { > X86CPU *cpu =3D NULL; > Error *local_err =3D NULL; > =20 > - if (icc_bridge =3D=3D NULL) { > - error_setg(&local_err, "Invalid icc-bridge value"); > - goto out; > - } > - > cpu =3D cpu_x86_create(cpu_model, &local_err); > if (local_err !=3D NULL) { > goto out; > } > =20 > - qdev_set_parent_bus(DEVICE(cpu), qdev_get_child_bus(icc_bridge, "i= cc")); > + qdev_set_parent_bus(DEVICE(cpu), sysbus_get_default()); The device is not a SysBusDevice, so just drop this line please. > object_unref(OBJECT(cpu)); > =20 > object_property_set_int(OBJECT(cpu), apic_id, "apic-id", &local_er= r); [snip] Note that this is probably going to collide with my unref changes. Regards, Andreas --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Felix Imend=F6rffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG N=FCrnberg)