From: ANNIE LI <annie.li@oracle.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>,
"jeremy@goop.org" <jeremy@goop.org>,
Paul Durrant <Paul.Durrant@citrix.com>,
"kurt.hackel@oracle.com" <kurt.hackel@oracle.com>
Subject: Re: [PATCH V3 1/2] xen/granttable: Support sub-page grants
Date: Mon, 12 Dec 2011 11:16:20 +0800 [thread overview]
Message-ID: <4EE57204.4030509@oracle.com> (raw)
In-Reply-To: <1323452339.20077.92.camel@zakaz.uk.xensource.com>
> Please can you name the arguments here and then refer to them by name in
> the comments instead of all this "First parameter", "second one" stuff.
>
> Similarly for the existing comments sorry I didn't notice this in
> previous review.
Please check following comments in gnttab_ops, I changed the "First
parameter", "second one" into parameter name. However, it looks not very
consistent with parameters format of function fn since only parameter
type exists, not name.
struct gnttab_ops {
/*
* Mapping a list of frames for storing grant entries. Frames
parameter
* is used to store grant table address when grant table being
setup,
* nr_gframes is the number of frames to map grant table. Returning
* GNTST_okay means success and negative value means failure.
*/
int (*map_frames)(unsigned long *, unsigned int);
/*
* Release a list of frames which are mapped in map_frames for
grant
* entry status.
*/
void (*unmap_frames)(void);
/*
* Introducing a valid entry into the grant table, granting the
frame
* of this grant entry to domain for accessing, or transfering, or
* transitively accessing. Ref parameter is reference of this
introduced
* grant entry, domid is id of granted domain, frame is the
page frame
* to be granted, and flags is status of the grant entry to be
updated.
*/
void (*update_entry)(grant_ref_t, domid_t, unsigned long,
unsigned);
/*
* Stop granting a grant entry to domain for accessing. Ref
parameter is
* reference of a grant entry whose grant access will be stopped,
* readonly is not in use in this function. If the grant entry is
* currently mapped for reading or writing, just return
failure(==0)
* directly and don't tear down the grant access. Otherwise,
stop grant
* access for this entry and return success(==1).
*/
int (*end_foreign_access_ref)(grant_ref_t, int);
/*
* Stop granting a grant entry to domain for transfer. If
tranfer has
* not started, just reclaim the grant entry and return
failure(==0).
* Otherwise, wait for the transfer to complete and then return the
* frame.
*/
unsigned long (*end_foreign_transfer_ref)(grant_ref_t);
/*
* Query the status of a grant entry. Ref parameter is reference of
* queried grant entry, return value is the status of queried
entry.
* Detailed status(writing/reading) can be gotten from the
return value
* by bit operations.
*/
int (*query_foreign_access)(grant_ref_t);
/*
* Grant a domain to access a range of bytes within the page
referred by
* an available grant entry. Ref parameter is grant entry reference
* number, domid is id of grantee domain, frame is frame address of
* subpage grant, flags is grant type and flag information,
page_off is
* offset of the range of bytes, and length is length of bytes
to be
* accessed.
*/
void (*update_subpage_entry)(grant_ref_t, domid_t, unsigned
long, int,
unsigned, unsigned);
/*
* Redirect an available grant entry on domain A to another grant
* reference of domain B, then allow domain C to use grant
reference
* of domain B transitively. Ref parameter is an available
grant entry
* reference on domain A, domid is id of domain C which
accesses grant
* entry transitively, flags is grant type and flag information,
* trans_domid is id of domain B whose grant entry is finally
accessed
* transitively, trans_gref is grant entry transitive reference of
* domain B.
*/
void (*update_trans_entry)(grant_ref_t, domid_t, int, domid_t,
grant_ref_t);
Thanks
Annie
> Ian.
>
>
next prev parent reply other threads:[~2011-12-12 3:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-09 11:32 [PATCH V3 0/2] xen: patches for supporting sub-page and transitive grants annie.li
2011-12-09 11:32 ` [PATCH V3 1/2] xen/granttable: Support sub-page grants annie.li
2011-12-09 17:38 ` Ian Campbell
2011-12-11 6:05 ` ANNIE LI
2011-12-12 3:16 ` ANNIE LI [this message]
2011-12-12 7:10 ` Ian Campbell
2011-12-12 7:32 ` ANNIE LI
2011-12-09 11:33 ` [PATCH V3 2/2] xen/granttable: Support transitive grants annie.li
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=4EE57204.4030509@oracle.com \
--to=annie.li@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=Paul.Durrant@citrix.com \
--cc=jeremy@goop.org \
--cc=konrad.wilk@oracle.com \
--cc=kurt.hackel@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--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.