This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


RE: [Xen-devel][PATCH] dom0 vcpu set problem

To: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel][PATCH] dom0 vcpu set problem
From: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>
Date: Tue, 11 May 2010 17:23:45 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Tue, 11 May 2010 02:24:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201005111107.30550.dietmar.hahn@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <201005110819.47801.dietmar.hahn@xxxxxxxxxxxxxx> <4BE92223020000780000239C@xxxxxxxxxxxxxxxxxx> <201005111107.30550.dietmar.hahn@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acrw6XBLJctqgooyRXWTrZj0yZlpvAAAbkCA
Thread-topic: [Xen-devel][PATCH] dom0 vcpu set problem
Dietmar Hahn wrote:
> Am 11.05.2010 schrieb Jan Beulich:
>>>>> Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx> 11.05.10 08:19 >>>
>>> Can anybody point me where in the code the acpi cpu hotplug gets
>>> triggered to add the vcpu again to the dom0 kernel after setting
>>> the xenstore! 
>> No, ACPI hotplug code is not involved in pv domains' vCPU adding or
>> removal. Instead, the pv kernels create a xenstore watch on their
>> domain's "cpu" node, reading cpu/<id>/availability when the watch
>> fires. See drivers/xen/core/cpu_hotplug.c (for the forward ported
>> kernels) or drivers/xen/cpu_hotplug.c (for the pv-ops ones).
>> Jan
> It's the pv-ops kernel from within the xen-4.0-testing.hg tree.
> Thanks, Jan ;-)
> Pointing to the right place I found a missing cpu_up() call
> in the vcpu_hotplug() function.
> Now all my vcpus are back again on my machine ;-)
> Thanks.
> Dietmar.
> Signed-off-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>
> diff --git a/drivers/xen/cpu_hotplug.c b/drivers/xen/cpu_hotplug.c
> index bdfd584..f3f0c1e 100644
> --- a/drivers/xen/cpu_hotplug.c
> +++ b/drivers/xen/cpu_hotplug.c
> @@ -49,6 +49,7 @@ static void vcpu_hotplug(unsigned int cpu)
>         switch (vcpu_online(cpu)) {
>         case 1:
>                 enable_hotplug_cpu(cpu);
> +               (void)cpu_up(cpu);
>                 break;
>         case 0:
>                 (void)cpu_down(cpu);

No, I don't think you need update pv-ops kernel so.
vcpu-add just set it to cpu present map, not online map.
It provide user chance to echo 1 > /sys/devices/system/cpux/online to make cpu 
work (means, to add cpu to online map).

The original pv-ops vcpu hotplug logic is right.

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>