From: ramsdell@mitre.org (John D. Ramsdell)
To: Harry Butterworth <harry@hebutterworth.freeserve.co.uk>
Cc: ramsdell@mitre.org, xen-devel@lists.xensource.com
Subject: High-Level API
Date: 19 Jul 2006 13:54:50 -0400 [thread overview]
Message-ID: <ogtzmf51nv9.fsf@divan.mitre.org> (raw)
In-Reply-To: <E1G3Ais-0005It-IH@host-192-168-0-1-bcn-london>
> From: Harry Butterworth <harry@hebutterworth.freeserve.co.uk>
...
> But, whatever the low-level API, whether grant-tables or something
> which has better support for revocation and n-way communication, I
> think there needs to be a small library to implement a higher level
> API that is more convenient for driver authors to use directly.
Harry,
I curious to know what abstractions you would want to collected
together in a high-level API. Is there a common pattern of usage that
can be easily packaged as a high-level API? I tried the think of a
generic, but high-level API for establishing communication between
domains, which I have enclosed. Is this the kind of API you're
talking about? Rather than dwelling on my proposal, perhaps it would
be most interesting if you proposed an API at the same level of detail.
John
Name: advertise_endpoint
Inputs:
domid_t buddy // The domain with which to share information
void (*a_handler)(domid_t buddy, void *data) // Handler invoked
// when a notification is received on the read port
void *data // Application specific data given to handlers
Outputs:
void *write_page // Page written in this domain, and read by the buddy
evtchn_port_t read_port // port used to notify the buddy that data
// in the read page has been read.
Implementation:
The write_page and an unbound port is allocated. A grant ref is
generated for the write page, and the ref and the port is
published using XenBus.
Name: connect_to_endpoint
Inputs:
domid_t buddy // The domain with which to share information
void (*a_handler)(domid_t buddy, void *data) // Handler invoked
// when a notification is received on the write port
void *data // Application specific data given to handlers
Outputs:
void *read_page // Page read in this domain, and written by the buddy
evtchn_port_t write_port // port used to notify that data is ready
// for the other domain in the write page
grant_handle_t handle // Handle for mapped read page
Implementation:
A grant ref and port associated with the buddy domain is obtained
via XenBus. The mapped page is returned as the read page, and the
result of performing an interdomain bind is the write port.
next parent reply other threads:[~2006-07-19 17:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1G3Ais-0005It-IH@host-192-168-0-1-bcn-london>
2006-07-19 17:54 ` John D. Ramsdell [this message]
2006-07-19 18:54 ` High-Level API Harry Butterworth
2006-07-19 19:31 ` John D. Ramsdell
2006-07-19 20:41 ` Understanding capabilites of xenoprof shobha ranganathan
2006-07-20 3:42 ` Santos, Jose Renato G
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=ogtzmf51nv9.fsf@divan.mitre.org \
--to=ramsdell@mitre.org \
--cc=harry@hebutterworth.freeserve.co.uk \
--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.