xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH pvops] Fix a bug that shutdown watcher is disabled on pvops
@ 2011-03-03 16:46 Frank Pan
  2011-03-03 18:29 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 8+ messages in thread
From: Frank Pan @ 2011-03-03 16:46 UTC (permalink / raw)
  To: xen-devel, Stefano Stabellini, Jeremy Fitzhardinge, Ian Campbell

[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]

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 #2: 0001-Fix-a-bug-that-shutdown-watcher-is-disabled-on-pvops.patch --]
[-- Type: text/x-patch, Size: 811 bytes --]

From 8d2402bd48ccc9eb5afe2aaa407d61ff715cb24c Mon Sep 17 00:00:00 2001
From: Frank Pan <frankpzh@gmail.com>
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


[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-03-04 11:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-03 16:46 [PATCH pvops] Fix a bug that shutdown watcher is disabled on pvops Frank Pan
2011-03-03 18:29 ` Konrad Rzeszutek Wilk
2011-03-04  2:09   ` Frank Pan
2011-03-04  8:41     ` Ian Campbell
2011-03-04  9:29       ` Frank Pan
2011-03-04 11:51         ` Ian Campbell
2011-03-04  2:39   ` Frank Pan
2011-03-04  2:57   ` Frank Pan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).