WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH pvops] Fix a bug that shutdown watcher is disable

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH pvops] Fix a bug that shutdown watcher is disabled on pvops
From: Frank Pan <frankpzh@xxxxxxxxx>
Date: Fri, 4 Mar 2011 10:57:55 +0800
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Jeremy Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Thu, 03 Mar 2011 19:00:05 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=gzkpXEMH6/jal/VNrmKciEl3z0s0Wk7D6vD3bwGH5zg=; b=i0wY4zcCeJFQN55x/EvaErdQTN/UCeRMkru0czm1gSx16cR/vZADcYHrxYgvl1GKC7 EgNJsV7MWGgtXWQ1eHGab7/5JOYSk/a3dQh5UMJkJtLXCifc8ZPOj/9jFc9RdfNM98DC vSVEIiOzq0FkNTa3/Fkjx7JeY0rnzUj4pdAH8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=irK9GjOln7bVbWqBH7KEu6rP03ELwiD+r9kMQ0poM9UkVF3aTQKnBNSEY2wBmGLhOe bDwO+UALwAiwAjFWWmXhE1P06kwvrQqJpxpUuO+rW9XAQmfEvF34PiDwBqa3cO/qBefI agxNuy5saequwTYQXO6eNBMZqnd2ps+O7lwBg=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110303182909.GA10812@xxxxxxxxxxxx>
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: <AANLkTikUyYpVKG_LZHFLL-ziCfU-Oc3qM9uFCd7QH13Z@xxxxxxxxxxxxxx> <20110303182909.GA10812@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Branch devel/next-2.6.38 on your tree has no such issue.
In this branch, setup_shutdown_watcher will be called inside
xen_setup_shutdown_event.(on PV-on-HVM)

On Fri, Mar 4, 2011 at 2:29 AM, Konrad Rzeszutek Wilk
<konrad.wilk@xxxxxxxxxx> wrote:
> On Fri, Mar 04, 2011 at 12:46:20AM +0800, Frank Pan wrote:
>> I use pvops kernel for HVM domU, and I find that shutdown watcher is
>
> Which one? 2.6.32? stock 2.6.37? devel 2.6.38?
>> not enabled at all when I compile platform-pci module inside kernel.
>> The code related calls xen_setup_shutdown_event after xenbus_probe,
>> that makes setup_shutdown_watcher never called.
>>
>> The following patch fixes this by changing the order of xenbus_probe
>> and xen_setup_shutdown, which makes my PV-on-HVM domU responses well
>> for the "control/shutdown" entry.
>>
>> ---
>>  linux-2.6-xen/drivers/xen/platform-pci.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/linux-2.6-xen/drivers/xen/platform-pci.c
>> b/linux-2.6-xen/drivers/xen/platform-pci.c
>> index c01b5dd..f141cfe 100644
>> --- a/linux-2.6-xen/drivers/xen/platform-pci.c
>> +++ b/linux-2.6-xen/drivers/xen/platform-pci.c
>> @@ -162,10 +162,10 @@ static int __devinit platform_pci_init(struct
>> pci_dev *pdev,
>>       ret = gnttab_init();
>>       if (ret)
>>               goto out;
>> -     xenbus_probe(NULL);
>>       ret = xen_setup_shutdown_event();
>>       if (ret)
>>               goto out;
>> +     xenbus_probe(NULL);
>>       return 0;
>>
>>  out:
>> --
>> 1.7.0.4
>>
>> --
>> Frank Pan
>>
>> Computer Science and Technology
>> Tsinghua University
>
>> From 8d2402bd48ccc9eb5afe2aaa407d61ff715cb24c Mon Sep 17 00:00:00 2001
>> From: Frank Pan <frankpzh@xxxxxxxxx>
>> Date: Thu, 3 Mar 2011 16:36:17 +0000
>> Subject: [PATCH] Fix a bug that shutdown watcher is disabled on pvops
>>
>> ---
>>  linux-2.6-xen/drivers/xen/platform-pci.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/linux-2.6-xen/drivers/xen/platform-pci.c 
>> b/linux-2.6-xen/drivers/xen/platform-pci.c
>> index c01b5dd..f141cfe 100644
>> --- a/linux-2.6-xen/drivers/xen/platform-pci.c
>> +++ b/linux-2.6-xen/drivers/xen/platform-pci.c
>> @@ -162,10 +162,10 @@ static int __devinit platform_pci_init(struct pci_dev 
>> *pdev,
>>       ret = gnttab_init();
>>       if (ret)
>>               goto out;
>> -     xenbus_probe(NULL);
>>       ret = xen_setup_shutdown_event();
>>       if (ret)
>>               goto out;
>> +     xenbus_probe(NULL);
>>       return 0;
>>
>>  out:
>> --
>> 1.7.0.4
>>
>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
>
>



-- 
潘震皓, Frank Pan

Computer Science and Technology
Tsinghua University

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel