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

Re: [Xen-devel] xenstore watch not working under 32 bit domU (xen stable

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xenstore watch not working under 32 bit domU (xen stable 2.6.32 from jeremy git tree)
From: Vasiliy G Tolstov <v.tolstov@xxxxxxxxx>
Date: Sun, 05 Dec 2010 21:39:46 +0300
Delivery-date: Sun, 05 Dec 2010 10:41:16 -0800
Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=selfip.ru; s=dk; h=Mime-Version:Message-ID:Date:Content-Type:References:In-Reply-To:To:Reply-To:From:Subject; bh=Ic/Kbv+nTxV8mQwpJBn5uCM578pcjpxpReCATiqN3mQ=; b=qQCfU5G0g4u3oONDLL5qjHhGVOQlxS4UBzsRRRBtj/zI1waI8A2eAd+f5m2325p80cyaF8w4Vezrg0THEoyAuDviSNvGwA0AMiFy+omYE4NVhD+xKFnf+nA1rN556BaO;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1290426815.17994.111.camel@vase>
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>
Organization: Selfip.Ru
References: <1290426815.17994.111.camel@vase>
Reply-to: v.tolstov@xxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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:


Anybody check this?
More simple example, from balloon.c driver
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/mm.h>
#include <linux/bootmem.h>
#include <linux/pagemap.h>
#include <linux/highmem.h>
#include <linux/mutex.h>
#include <linux/list.h>
#include <linux/sysdev.h>
#include <linux/swap.h>

#include <asm/page.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
#include <asm/tlb.h>
#include <asm/e820.h>

#include <asm/xen/hypervisor.h>
#include <asm/xen/hypercall.h>

#include <xen/xen.h>
#include <xen/interface/xen.h>
#include <xen/interface/memory.h>
#include <xen/xenbus.h>
#include <xen/features.h>
#include <xen/page.h>


static struct xenbus_watch target_watch =
{
        .node = "data"
};

/* React to a change in the target key */
static void watch_target(struct xenbus_watch *watch,
                         const char **vec, unsigned int len)
{
        char *cmd;
        int err;
        printk(KERN_ERR "watch_target\n");
}

static int balloon_init_watcher(struct notifier_block *notifier,
                                unsigned long event,
                                void *data)
{
        int err;
        printk(KERN_ERR "init_watcher\n");
        err = register_xenbus_watch(&target_watch);
        if (err)
                printk(KERN_ERR "Failed to set balloon watcher\n");

        return NOTIFY_DONE;
}

static struct notifier_block xenstore_notifier;

static int __init balloon_init(void)
{
        printk(KERN_ERR "init\n");
        target_watch.callback = watch_target;
        xenstore_notifier.notifier_call = balloon_init_watcher;

        register_xenstore_notifier(&xenstore_notifier);

        return 0;
}

subsys_initcall(balloon_init);

static void balloon_exit(void)
{
        printk(KERN_ERR "exit\n");
    return;
}

module_exit(balloon_exit);

MODULE_LICENSE("GPL");


Watch not WORK! Compile with make file

obj-m += xenmgm.o

KDIR := /lib/modules/$(shell uname -r)
PWD := $(shell pwd)

all:
        $(MAKE) -C $(KDIR)/build SUBDIRS=$(PWD) M=$(PWD) modules
        
clean:
        $(MAKE) -C $(KDIR)/build SUBDIRS=$(PWD) M=$(PWD) clean
        rm -f modules.order Module.*

install:
        mkdir -p $(KDIR)/kernel/drivers/xen/xenmgm/
        install -m 0644 -o root xenmgm.ko $(KDIR)/kernel/drivers/xen/xenmgm/
        depmod -q


I think, that is becouse i compiled module and not in kernel. Can
somebody check this? (use stable-2.6.32.x commit diff
b92d1ec0a86acd2dfe14d732c6a9304aae0ccf26)
kernel config in attached file

Attachment: 2.6.32.config
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>