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] Mini-OS and Xenstore

To: "Samuel Thibault" <samuel.thibault@xxxxxxxxxxxxx>, "braham othmen" <braham.othmen@xxxxxxxxx>, "Julian Munster" <jmuenster@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Mini-OS and Xenstore
From: "braham othmen" <braham.othmen@xxxxxxxxx>
Date: Tue, 5 Aug 2008 17:20:33 +0200
Cc:
Delivery-date: Tue, 05 Aug 2008 08:20:58 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=XXVVhxRFTtmuQTr9aWyaEf0056wDZbMoH3aXcA3QBtQ=; b=fRTDrbKmlRLX6/T1kEv46blRwkIGduBVppSBmRPkubnZya+3lI2Vskhms18OzFl1/Y 6ONnXJ8K/6fDvFIwulrbHatB5AbB0uBNBAiE93at4o4hYdufHnVXWOV9s/qWcUJQQpJR cnUGWzE3B9riIN0dF+8F3tt1V/lgu67w/5tt4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=b92qD5Ak9gXq3/c93DlTrHk85VmaCWSrq6cAB1Aop14ESiPQYCjoN+wuDHzLSaBDc5 Pq53vlhDFSBDIlnd/9FaxdGYHLJPZSkIlFcjILZu5na2WV5tlssal/7bc4dzGdVit54x ipzR6LtnoRzhhZrjo1qp1v8n7IjOZ5lbdY1Dc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20080805103752.GK4478@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <ed4573ba0808042100q29ca4c49t451040fa4c746cc9@xxxxxxxxxxxxxx> <de90d9af0808050133o37a4fb28ubaaca352d64f2678@xxxxxxxxxxxxxx> <20080805095141.GC4478@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <de90d9af0808050329o55ee788ct15017bff59f9daee@xxxxxxxxxxxxxx> <20080805103752.GK4478@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

Thank you,

 I now understand why it wouldn't work because of the order of  initialization action in start_kernel() function. I make some permitting  and like it used to do, it compiles correctly but the virtual machine don't start at all. I think that the order must respect some chronologies, did any one know some document explaining more about that?

    /* Set up events. */
    init_events();
   
    /* ENABLE EVENT DELIVERY. This is disabled at start of day. */
    __sti();

    arch_print_info();

    setup_xen_features();

    /* Init memory management. */
    init_mm();

    /* Init time and timers. */
    init_time();

    /* Init grant tables */
    init_gnttab();
   
    /* Init scheduler. */
    init_sched();
 
    /* Init XenBus */
    init_xenbus();

    /* Init the console driver. */
   init_console();
    /* Call (possibly overridden) app_main() */

I write this example for those who want to write to xenstore from Mini-OS, I included in periodic_thread of the kernel.c. the value are updated peridicaly. It depends also on the activity of virtual machine. But I want if there a possibility to write
to any part of xenstore like the third case ??:        xenbus_write(XBT_NIL,"/local/count_example3",buf);
after loading the virtual machine, i did not found what i wrote.

thanks a lot,

static void periodic_thread(void *p)
{
    struct timeval tv;
    unsigned int count = 0;
    char * buf;
    printk("Periodic thread started.\n");
    for(;;)
    {
       //########### counter ###########
       count++;
       sprintf(buf, "%u", count);
       /*  write to /local/domain/number_of_domain  */
       xenbus_write(XBT_NIL,"count_example1",buf);
       /*  write to /local/domain/number_of_domain/domain  */
       xenbus_write(XBT_NIL,"domain/count_example2",buf);
       /* do not write any thing !! and do not invoke error !!!!! */
       xenbus_write(XBT_NIL,"/local/count_example3",buf);
       //######### end counter ##########
       gettimeofday(&tv);
        printk("T(s=%ld us=%ld)\n", tv.tv_sec, tv.tv_usec);
        sleep(1000);
    }
}

best regards
Braham Othmen



2008/8/5 Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
braham othmen, le Tue 05 Aug 2008 12:29:17 +0200, a �it :
> this code
>     xenbus_write(XBT_NIL,"/local/example","val_example");
> which is included in events.c

Where did you add that code in events.c?  Take care that the xenbus
stuff may not be initialized at that point...  See the initialization
steps in kernel.c's start_kernel.

Samuel

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