[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 Mon, 13 Aug 2012, Jan Beulich wrote: > >>> On 13.08.12 at 13:24, Stefano Stabellini > >>> <stefano.stabellini@xxxxxxxxxxxxx> wrote: > > 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. > > So you obviously need a cast from "normal" to _PARAM (so that > you can pass embedded fields to functions). In practice embedded fields are in guest memory, so the first thing Xen does is calling copy_from_guest and work with the struct pointer directly from that point on. However I do see how a function like that might make the distinction between XEN_GUEST_HANDLE and XEN_GUEST_HANDLE_PARAMs clearer, so I'll add one. The implementation is going to identical to guest_handle_cast though. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |