Skip to contentSkip to conversation

new gnttab_end_foreign_access?

DISCUSSION NAHieu 2 participants 4 messages Nov 3, 2005

lore
Share & tools
lore

NAHieu

author
#0 lore raw

Hi,

In grant-table API, gnttab_end_foreign_access() is used to end the access to grant reference got from gnttab_grant_foreign_access(domid, mfn, readonly)

But the new gnttab_end_foreign_access(ref, page, readonly) (checked in few days ago) required the new "page" arg. I understand that this"page " is actually the arg "mfn" from the above gnttab_grant_foreign_access function(), right?

If that is the case, there is only one ref corresponding to a page, why we need this new arg?

Many thanks.
Hieu

author
#1 lore raw

I have one more question:why gnttab_end_foreign_access_ref(grant_ref_t ref, int readonly) needs the "readonly" arg?

Is gnttab_end_foreign_access_ref(grant_ref_t ref) not OK?

Thanks.
Hieu

author
#2 lore raw
Quoted 5 lines · NAHieu

I have one more question:why gnttab_end_foreign_access_ref(grant_ref_t ref, int readonly) needs the "readonly" arg?

Is gnttab_end_foreign_access_ref(grant_ref_t ref) not OK?

I took another look, and it seems we should remove "readonly" arg of gnttab_end_foreign_access*, as they are not in use.

So those API should be:

int gnttab_end_foreign_access_ref(grant_ref_t ref);
void gnttab_end_foreign_access(grant_ref_t ref, unsigned long page);

I still have some doubt about the "page" arg, however.

Thanks
Hieu

#3 lore raw

The readonly arg isn't used but was originally intended to allow you to drop a grant from allowing readwrite access to just readonly.

Haven't had a look at the new interface changes yet.

Christopher

Quoted 20 lines · NAHieu
Quoted 5 lines · NAHieu

I have one more question:why gnttab_end_foreign_access_ref(grant_ref_t ref, int readonly) needs the "readonly" arg?

Is gnttab_end_foreign_access_ref(grant_ref_t ref) not OK?

I took another look, and it seems we should remove "readonly" arg of gnttab_end_foreign_access*, as they are not in use.

So those API should be:

int gnttab_end_foreign_access_ref(grant_ref_t ref);
void gnttab_end_foreign_access(grant_ref_t ref, unsigned long page);

I still have some doubt about the "page" arg, however.

Quoted 8 lines

Thanks
Hieu

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel