Commit 9dbc71d5 authored by Annie Li's avatar Annie Li Committed by Konrad Rzeszutek Wilk

xen/granttable: Improve comments for function pointers

Signed-off-by: default avatarAnnie Li <annie.li@oracle.com>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent 4313d88c
...@@ -76,50 +76,50 @@ static union { ...@@ -76,50 +76,50 @@ static union {
/*This is a structure of function pointers for grant table*/ /*This is a structure of function pointers for grant table*/
struct gnttab_ops { struct gnttab_ops {
/* /*
* Mapping a list of frames for storing grant entries. First input * Mapping a list of frames for storing grant entries. Frames parameter
* parameter is used to storing grant table address when grant table * is used to store grant table address when grant table being setup,
* being setup, second parameter is the number of frames to map grant * nr_gframes is the number of frames to map grant table. Returning
* table. Returning GNTST_okay means success and negative value means * GNTST_okay means success and negative value means failure.
* failure.
*/ */
int (*map_frames)(unsigned long *, unsigned int); int (*map_frames)(unsigned long *frames, unsigned int nr_gframes);
/* /*
* Release a list of frames which are mapped in map_frames for grant * Release a list of frames which are mapped in map_frames for grant
* entry status. * entry status.
*/ */
void (*unmap_frames)(void); void (*unmap_frames)(void);
/* /*
* Introducing a valid entry into the grant table, granting the frame * Introducing a valid entry into the grant table, granting the frame of
* of this grant entry to domain for accessing, or transfering, or * this grant entry to domain for accessing or transfering. Ref
* transitively accessing. First input parameter is reference of this * parameter is reference of this introduced grant entry, domid is id of
* introduced grant entry, second one is domid of granted domain, third * granted domain, frame is the page frame to be granted, and flags is
* one is the frame to be granted, and the last one is status of the * status of the grant entry to be updated.
* grant entry to be updated.
*/ */
void (*update_entry)(grant_ref_t, domid_t, unsigned long, unsigned); void (*update_entry)(grant_ref_t ref, domid_t domid,
unsigned long frame, unsigned flags);
/* /*
* Stop granting a grant entry to domain for accessing. First input * Stop granting a grant entry to domain for accessing. Ref parameter is
* parameter is reference of a grant entry whose grant access will be * reference of a grant entry whose grant access will be stopped,
* stopped, second one is not in use now. If the grant entry is * readonly is not in use in this function. If the grant entry is
* currently mapped for reading or writing, just return failure(==0) * currently mapped for reading or writing, just return failure(==0)
* directly and don't tear down the grant access. Otherwise, stop grant * directly and don't tear down the grant access. Otherwise, stop grant
* access for this entry and return success(==1). * access for this entry and return success(==1).
*/ */
int (*end_foreign_access_ref)(grant_ref_t, int); int (*end_foreign_access_ref)(grant_ref_t ref, int readonly);
/* /*
* Stop granting a grant entry to domain for transfer. If tranfer has * Stop granting a grant entry to domain for transfer. Ref parameter is
* not started, just reclaim the grant entry and return failure(==0). * reference of a grant entry whose grant transfer will be stopped. If
* Otherwise, wait for the transfer to complete and then return the * tranfer has not started, just reclaim the grant entry and return
* frame. * failure(==0). Otherwise, wait for the transfer to complete and then
* return the frame.
*/ */
unsigned long (*end_foreign_transfer_ref)(grant_ref_t); unsigned long (*end_foreign_transfer_ref)(grant_ref_t ref);
/* /*
* Query the status of a grant entry. Input parameter is reference of * Query the status of a grant entry. Ref parameter is reference of
* queried grant entry, return value is the status of queried entry. * queried grant entry, return value is the status of queried entry.
* Detailed status(writing/reading) can be gotten from the return value * Detailed status(writing/reading) can be gotten from the return value
* by bit operations. * by bit operations.
*/ */
int (*query_foreign_access)(grant_ref_t); int (*query_foreign_access)(grant_ref_t ref);
}; };
static struct gnttab_ops *gnttab_interface; static struct gnttab_ops *gnttab_interface;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment