From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frank Pan Subject: Re: [PATCH pvops] Fix a bug that shutdown watcher is disabled on pvops Date: Fri, 4 Mar 2011 10:57:55 +0800 Message-ID: References: <20110303182909.GA10812@dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20110303182909.GA10812@dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk Cc: Ian Campbell , xen-devel@lists.xensource.com, Jeremy Fitzhardinge , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org 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 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. >> >> --- >> =C2=A0linux-2.6-xen/drivers/xen/platform-pci.c | =C2=A0 =C2=A02 +- >> =C2=A01 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, >> =C2=A0 =C2=A0 =C2=A0 ret =3D gnttab_init(); >> =C2=A0 =C2=A0 =C2=A0 if (ret) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto out; >> - =C2=A0 =C2=A0 xenbus_probe(NULL); >> =C2=A0 =C2=A0 =C2=A0 ret =3D xen_setup_shutdown_event(); >> =C2=A0 =C2=A0 =C2=A0 if (ret) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto out; >> + =C2=A0 =C2=A0 xenbus_probe(NULL); >> =C2=A0 =C2=A0 =C2=A0 return 0; >> >> =C2=A0out: >> -- >> 1.7.0.4 >> >> -- >> Frank Pan >> >> Computer Science and Technology >> Tsinghua University > >> From 8d2402bd48ccc9eb5afe2aaa407d61ff715cb24c Mon Sep 17 00:00:00 2001 >> From: Frank Pan >> Date: Thu, 3 Mar 2011 16:36:17 +0000 >> Subject: [PATCH] Fix a bug that shutdown watcher is disabled on pvops >> >> --- >> =C2=A0linux-2.6-xen/drivers/xen/platform-pci.c | =C2=A0 =C2=A02 +- >> =C2=A01 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/linux-2.6-xen/drivers/xen/platform-pci.c b/linux-2.6-xen/dr= ivers/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, >> =C2=A0 =C2=A0 =C2=A0 ret =3D gnttab_init(); >> =C2=A0 =C2=A0 =C2=A0 if (ret) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto out; >> - =C2=A0 =C2=A0 xenbus_probe(NULL); >> =C2=A0 =C2=A0 =C2=A0 ret =3D xen_setup_shutdown_event(); >> =C2=A0 =C2=A0 =C2=A0 if (ret) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 goto out; >> + =C2=A0 =C2=A0 xenbus_probe(NULL); >> =C2=A0 =C2=A0 =C2=A0 return 0; >> >> =C2=A0out: >> -- >> 1.7.0.4 >> > >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel > > --=20 =E6=BD=98=E9=9C=87=E7=9A=93, Frank Pan Computer Science and Technology Tsinghua University