[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] passing hypercall parameters by pointer



On Aug 18, 2005, at 1:56 AM, Tian, Kevin wrote:

From: Hollis Blanchard
Sent: Thursday, August 18, 2005 6:05 AM
       case DOM0_GETMEMLIST:
op->u.getmemlist.buffer = virt_to_phys(op->u.getmemlist.buffer);
           break;

If following Ian's suggestion, you have to create a list of pfn here
instead of only converting start address. There's no guaranty that the
buffer is limited in one page. ;-)

Actually that was an explicitly stated limitation.

But I think I like this scatterlist idea. So for every pointer (buffer in the above example), instead the pseudo-physical address to a scatterlist will be passed to the hypervisor, and then copy_to/from_user expects a scatterlist address instead of a pointer. I think the copy_to/from_user and get/put_user API would need to change though: you'd need the value, the scatterlist pointer, and an offset into the scatterlist.

So x86 would need a slight API change, but could continue without dealing with any scatterlists, i.e. no ABI change.

The PowerPC kernel would need knowledge of every hypercall structure to create and translate the scatterlist. I know that's an idea Jimi isn't fond of, but it really seems like the best solution here.

--
Hollis Blanchard
IBM Linux Technology Center


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.