[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH pvops] Fix a bug that shutdown watcher is disabled on pvops
> Is the issue you are seeing perhaps due to this patch being missing from > that tree? > > commit a947f0f8f7012a5e8689a9cff7209ec6964ec154 > Author: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> > Date: Â Mon Oct 4 16:10:06 2010 +0100 > > Â Âxen: do not set xenstored_ready before xenbus_probe on hvm > Stefano's "2.6.38-rc6-pvhvm" branch also contains this which looks > related: > > commit 702d4eb9b3de4398ab99cf0a4e799e552c7ab756 > Author: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> > Date: Â Thu Dec 2 17:54:50 2010 +0000 > > Â Âxen: no need to delay xen_setup_shutdown_event for hvm guests anymore FP: Yes, both commits seem like a solution of the issue I met. > If possible we should prefer to backport patches from newer kernels > rather than diverge in the 2.6.32 branch. FP: The former commit seems ok. The latter one is more like a cleanup. Here is a patch can be applied on xen/next-2.6.32: --- linux-2.6-xen/drivers/xen/xenbus/xenbus_probe.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/linux-2.6-xen/drivers/xen/xenbus/xenbus_probe.c b/linux-2.6-xen/drivers/xen/xenbus/xenbus_probe.c index 3a83ba2..f368db9 100644 --- a/linux-2.6-xen/drivers/xen/xenbus/xenbus_probe.c +++ b/linux-2.6-xen/drivers/xen/xenbus/xenbus_probe.c @@ -646,7 +646,10 @@ int register_xenstore_notifier(struct notifier_block *nb) { int ret = 0; - blocking_notifier_chain_register(&xenstore_chain, nb); + if (xenstored_ready > 0) + ret = nb->notifier_call(nb, 0, NULL); + else + blocking_notifier_chain_register(&xenstore_chain, nb); return ret; } @@ -660,7 +663,7 @@ EXPORT_SYMBOL_GPL(unregister_xenstore_notifier); void xenbus_probe(struct work_struct *unused) { - BUG_ON((xenstored_ready <= 0)); + xenstored_ready = 1; /* Notify others that xenstore is up */ blocking_notifier_call_chain(&xenstore_chain, 0, NULL); @@ -722,7 +725,6 @@ static int __init xenbus_init(void) xen_store_interface = mfn_to_virt(xen_store_mfn); } else { - xenstored_ready = 1; if (xen_hvm_domain()) { uint64_t v = 0; err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v); @@ -738,6 +740,7 @@ static int __init xenbus_init(void) xen_store_evtchn = xen_start_info->store_evtchn; xen_store_mfn = xen_start_info->store_mfn; xen_store_interface = mfn_to_virt(xen_store_mfn); + xenstored_ready = 1; } } -- 1.7.0.4 -- æéç, Frank Pan Computer Science and Technology Tsinghua University Attachment:
0001-xen-do-not-set-xenstored_ready-before-xenbus_probe-o.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |