All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Jacob Gorm Hansen <jacobg@diku.dk>
Cc: harry <harry@hebutterworth.freeserve.co.uk>,
	xen-devel@lists.xensource.com
Subject: Re: xenstore documentation
Date: Tue, 04 Oct 2005 10:05:00 -0500	[thread overview]
Message-ID: <43429A1C.1090006@us.ibm.com> (raw)
In-Reply-To: <e08041f30510040631j5eca8a81j1d3d67e40847b2f0@mail.gmail.com>

Jacob Gorm Hansen wrote:

>Sorry about that too, whoever dreamed this whole thing up has not been
>able to answer my increasingly desperate cries for help recently, and
>I am a little frustrated with the amount of time I have spent just
>getting a simple block device attached.
>  
>
1) Create domain
    domid = 0
    xc_domain_create(&domid)
    xc_domain_maxmem(domid, memory >> 10);
    xc_domain_memory_increase_reservation(domid, memory >> 12);

2) Build domain
    lconsole = rconsole = 0;
    xc_evtchn_bind_interdomain(0, domid, &lconsole, &rconsole);
    lstore = rstore = 0;
    xc_evtchn_bind_interdomain(0, domid, &lconsole, &rconsole);

    xc_linux_build(domid, kernel, ramdisk, cmdline, 0, vcpus, rstore, 
&mfn_store, rconsole, &mfn_console)
    home = "/tools/<yourtool>/domain/%d" % domid
    xs_domain_introduce(domid, mfn_store, lstore, home);
    xs_write(home + "/console/ring-ref", mfn_console)
    xs_write(home + "/console/port", lconsole)

3) Create block device (pdev, vdev)
    static int uuid;

    dom0_home = xs_get_domain_path(0)

    backend = dom0_home + "/backend/vbd/%s/%s' % (uuid, domid)
    frontend = home + "/device/vbd/%s' % uuid

    transaction_start()
    xs_write(backend + "/frontend", frontend);
    xs_write(backend + "/frontend-id", domid);
    transaction_end()

    transaction_start()
    xs_write(frontend + "/backend", backend);
    xs_write(frontend + "/backend-id", 0);
    xs_write(frontend + "/virtual-device", vdev)
    transaction_end()

    xs_write(backend + "/physical-device", pdev)

This might seem complicated, but compared to what you had to do under 
2.0.x, it's a 1000x times easier.

Regards,

Anthony Liguori

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

  reply	other threads:[~2005-10-04 15:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-03 17:03 xenstore documentation Jacob Gorm Hansen
2005-10-04  6:27 ` Rami Rosen
2005-10-04 12:20   ` Jacob Gorm Hansen
2005-10-04 12:42     ` harry
2005-10-04 12:48       ` harry
2005-10-04 12:56         ` Jacob Gorm Hansen
2005-10-04 13:17           ` harry
2005-10-04 13:31             ` Jacob Gorm Hansen
2005-10-04 15:05               ` Anthony Liguori [this message]
2005-10-04 15:28                 ` Nivedita Singhvi
2005-10-04 15:46                   ` Anthony Liguori
2005-10-04 15:33                 ` Jacob Gorm Hansen
2005-10-04 15:55                   ` Anthony Liguori
2005-10-04 18:13                 ` Jacob Gorm Hansen
2005-10-04 18:20                   ` Anthony Liguori
2005-10-04 22:12                   ` Jacob Gorm Hansen
2005-10-05 17:17                   ` Anthony Liguori
2005-10-05 17:22                     ` Jacob Gorm Hansen
2005-10-04 12:55       ` NAHieu
2005-10-04 13:25         ` harry
2005-10-04 14:42           ` Rolf Neugebauer
2005-10-04 17:24             ` NAHieu
2005-10-04 17:36               ` Rolf Neugebauer
2005-10-04 17:42               ` Anthony Liguori
2005-10-04 18:00                 ` NAHieu
2005-10-04 18:06                   ` Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2005-10-04 21:47 Neugebauer, Rolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43429A1C.1090006@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=harry@hebutterworth.freeserve.co.uk \
    --cc=jacobg@diku.dk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.