qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RESEND PATCH v4 3/4] cpu/apic: drop icc bus/bridge/


From: Andreas Färber
Subject: Re: [Qemu-devel] [RESEND PATCH v4 3/4] cpu/apic: drop icc bus/bridge/
Date: Thu, 30 Apr 2015 07:55:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Subject: s|bus/bridge/|bus/bridge|

Am 30.04.2015 um 03:33 schrieb Zhu Guihua:
> From: Chen Fan <address@hidden>
> 
> 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.
> 
> 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.
> 
> Signed-off-by: Chen Fan <address@hidden>
> Signed-off-by: Zhu Guihua <address@hidden>
> ---
>  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(-)
> 
> 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)
>  }
>  
>  static X86CPU *pc_new_cpu(const char *cpu_model, int64_t apic_id,
> -                          DeviceState *icc_bridge, Error **errp)
> +                          Error **errp)
>  {
>      X86CPU *cpu = NULL;
>      Error *local_err = NULL;
>  
> -    if (icc_bridge == NULL) {
> -        error_setg(&local_err, "Invalid icc-bridge value");
> -        goto out;
> -    }
> -
>      cpu = cpu_x86_create(cpu_model, &local_err);
>      if (local_err != NULL) {
>          goto out;
>      }
>  
> -    qdev_set_parent_bus(DEVICE(cpu), qdev_get_child_bus(icc_bridge, "icc"));
> +    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));
>  
>      object_property_set_int(OBJECT(cpu), apic_id, "apic-id", &local_err);
[snip]

Note that this is probably going to collide with my unref changes.

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]