On Feb 15, 2006, at 5:23 AM, Keir Fraser wrote:
On 15 Feb 2006, at 10:48, Hollis Blanchard wrote:
I will be busy for a week or so, but I will try to come up with a
patch
that converts x86 and ia64 and all common code to the proposed API:
get_user_offset(val, base, offset)
put_user_offset(val, base, offset)
get_user_array(val, array, index)
put_user_array(val, array, index)
copy_to_user(to, from, len)
copy_from_user(to, from, len)
... plus __ variants of all of these, with identical arguments
... plus arch-specific get/put_user for e.g. xen/arch/x86/domain.c,
since some of those usages don't seem to fit above.
If you don't like the API, please speak up now.
Should be called get_guest/put_guest/copy_from_guest/copy_to_guest.
Better names, and the arch-specific old functions can still keep their
old names.
"guest" not "domain"? Either way is fine with me. If we do leave the
old names in, though, I'm sure people will slip them into common
code...
What's the difference between foo_offset() and foo_array()?
Just convenience: many (most?) users of get/put_user() are to an
address like "&array[index]". If we only had _offset(), those callers
would look like:
put_user(val, array, sizeof(*array)*index);
Actually that doesn't look too bad. :) If you're ok with that, we can
stick with just the "offset" variant.
--
Hollis Blanchard
IBM Linux Technology Center
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|