[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] xenstore watch not working under 32 bit domU (xen stable 2.6.32 from jeremy git tree)



On Sun, 2010-12-05 at 21:39 +0300, Vasiliy G Tolstov wrote: 
> On Mon, 2010-11-22 at 14:53 +0300, Vasiliy G Tolstov wrote:
> > Hello. Can You helps me, i'm try to investigate why under 64 bit domU
> > this kernel module work's correct, but under 686 watch does not work:
> 

Sorry for long delay. I'm test some situations and investigate, that in
pvops 2.6.32.26 in 64 bit or 32 bit xenstore notifier and xenbus watch
not triggered.

Under centos 32 bit domU (xenlinux kernel)
module displays via printk (insmod xenmgm.ko; rmmod xenmgm;):

xenwatch: module init
xenwatch: xenstore watcher init
xenwatch: test
xenwatch: module exit

Under centos 32 bit domU (2.6.32.26 from jeremy)
module displays via printk (insmod xenmgm.ko; rmmod xenmgm;):

xenwatch: module init
xenwatch: module exit

Kernel config in attached file

Module source in e-mail:

#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/fcntl.h>
#include <linux/mm.h>
#include <linux/proc_fs.h>
#include <linux/notifier.h>
#include <linux/kthread.h>
#include <linux/mutex.h>
#include <linux/io.h>

#include <asm/xen/hypervisor.h>
#include <xen/xenbus.h>
#include <xen/events.h>
#include <xen/xen.h>
#include <xen/platform_pci.h>

static void xenwatch_watch(struct xenbus_watch *watch, const char **vec,
unsigned int len)
{
        printk("xenwatch: test");
}


static struct xenbus_watch xenwatch_xenbus_watch = {
        .node = "data",
        .callback = xenwatch_watch,
};

static int xenwatch_init_watcher(struct notifier_block *notifier,
unsigned long event, void *data)
{
        register_xenbus_watch(&xenwatch_xenbus_watch);
        printk("xenwatch: xenstore watcher init\n");
        return NOTIFY_DONE;
}

static struct notifier_block xenwatch_xenstore_notifier = {
        .notifier_call = xenwatch_init_watcher,
};


static int __init xenwatch_init(void)
{
        printk("\n");
        printk("xenwatch: module init\n");
        register_xenstore_notifier(&xenwatch_xenstore_notifier);
        return 0;
}

static void __exit xenwatch_exit(void)
{
        unregister_xenstore_notifier(&xenwatch_xenstore_notifier);
        printk("xenwatch: module exit\n");
        printk("\n");
        return;
}

subsys_initcall(xenwatch_init);
module_exit(xenwatch_exit);

MODULE_LICENSE("GPL");



-- 
Vasiliy G Tolstov <v.tolstov@xxxxxxxxx>
Selfip.Ru



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.