qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 04/16] pc: forbid BSP removal


From: Bandan Das
Subject: Re: [Qemu-devel] [PATCH v4 04/16] pc: forbid BSP removal
Date: Thu, 14 Jul 2016 13:49:55 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Igor Mammedov <address@hidden> writes:

> BSP is assumed to always present in QEMU code, so
> untile that assumptions are gone, deny removal request.
> In another words QEMU won't support BSP hot-unplug.
>
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
>  hw/i386/pc.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 5a67f15..33c5f97 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1751,10 +1751,17 @@ out:
>  static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev,
>                                       DeviceState *dev, Error **errp)
>  {
> +    int idx;
>      HotplugHandlerClass *hhc;
>      Error *local_err = NULL;
>      PCMachineState *pcms = PC_MACHINE(hotplug_dev);
>  
> +    pc_find_cpu_slot(pcms, CPU(dev), &idx);
> +    if (idx == 0) {
> +        error_setg(&local_err, "1st CPU (BSP) is unpluggable");
> +        goto out;
> +    }

Nit: Boot CPU or simply Bootstrap Processor sounds better IMO.

>      hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
>      hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);



reply via email to

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