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

Re: [Xen-devel] [PATCH v2 5/5] xen: replace XEN_GUEST_HANDLE with XEN_GUEST_HANDLE_PARAM when appropriate



On Fri, 10 Aug 2012, Jan Beulich wrote:
> >>> On 10.08.12 at 14:10, Stefano Stabellini 
> >>> <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> > Note: these changes don't make any difference on x86 and ia64.
> 
> I can see your point in doing this in the x86 files nevertheless for
> cosmetic/consistency reasons, but I'm really uncertain about this
> uglification when it's not really necessary (plus it would shrink the
> patch quite a bit).

I don't have a strong opinion on this.
However it is going to be difficult to enforce XEN_GUEST_HANDLE_PARAM on
parameters anyway (because we don't have a simple way to make it fail at
compile time), if we make the change only in xen/commons, it is going to be
even harder.


> > Replace XEN_GUEST_HANDLE with XEN_GUEST_HANDLE_PARAM when it is used as
> > an hypercall argument.
> 
> I didn't look in too close detail, as this isn't intended for the main
> branch yet, but I still wasn't able to spot any conversion method
> in at least one direction (so that internally these can be passed
> around irrespective of their origin).

I thought that guest_handle_cast was supposed to be used to cast
XEN_GUEST_HANDLE_PARAMs into proper structs.
Also copy_from_guest can be used to get the struct from memory.

On the other hand if you mean casting a XEN_GUEST_HANDLE_PARAM into a
XEN_GUEST_HANDLE to pass it to other internal functions, I don't think
there is any point in that because the other internal functions should
also have XEN_GUEST_HANDLE_PARAMs as parameters.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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