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

[Xen-devel] [PATCH pvops] Fix a bug that shutdown watcher is disabled on

To: xen-devel@xxxxxxxxxxxxxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Jeremy Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: [Xen-devel] [PATCH pvops] Fix a bug that shutdown watcher is disabled on pvops
From: Frank Pan <frankpzh@xxxxxxxxx>
Date: Fri, 4 Mar 2011 00:46:20 +0800
Cc:
Delivery-date: Thu, 03 Mar 2011 08:48:15 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=Bl96CAObVaJOyegLfjyk+Vpmvibmkt+f2bM9rGzuO/I=; b=sPRXmAx9Si1TshLJlIR+vijcu+9b6QN/Y8vTc/QR3pgkMnEUnH0N5GP/Z58NcrGwez EHKf1eJwlNJn1a3f80cGzBz6l5EJVbWIIS+uKOzmiUT0JhcLLCB4pIx5wVgUtlccTe/0 WNj2SMoxL4gLUX5qn+V9WO4+TuTrJ6mHaEF3w=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=TsY9i5T0MPQJbhHcLxNvNgAPirjDGja0TQFyKBWd8O9IUAWhjTDBrDvQ3GQJAkVf5X AZFciBV6aJkgog4+qctcHLVV0kDLWxnyyN3Yz0C1EM5MPge2dtPNmeGE1Q+FKNylhLJZ SN24XA1NPF+lB6qrXpLhqM96tiCp4iOGJ7D5U=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I use pvops kernel for HVM domU, and I find that shutdown watcher is
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

Attachment: 0001-Fix-a-bug-that-shutdown-watcher-is-disabled-on-pvops.patch
Description: Text Data

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