[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 1/9] libxc: add DECLARE_HYPERCALL_BUFFER_SHADOW()
On 07/05/14 12:45, Ian Campbell wrote: > On Wed, 2014-04-30 at 19:36 +0100, Andrew Cooper wrote: >> From: David Vrabel <david.vrabel@xxxxxxxxxx> >> >> DECLARE_HYPERCALL_BUFFER_SHADOW() is like DECLARE_HYPERCALL_BUFFER() >> except it is backed by an already allocated hypercall buffer. > > I suppose enhancing DECLARE_HYPERCALL_BUFFER_ARGUMENT to have this > property has issues with unused variables? Yes, I think so. Although I didn't actually try it... Perhaps I should. > HYPERCALL_BUFFER_AS_PTR() would have been an alternative implementation > (similar to AS_ARG), I suppose there is no particular reason to prefer > one over the other? Usage of the buffer wouldn't be consistent with a regular DECLARE_HYPERCALL_BUFFER(). It would lead to slightly more confusing code like: DECLARE_HYPERCALL_BUFFER(hbuf); unsigned long *to_send = HYPERCALL_BUFFER_AS_PTR(hbuf); ... if ( test_bit(p, to_send) ) ... rc = xc_shadow_control(xch, ctx->domid, XEN_DOMCTL_SHADOW_OP_CLEAN, hbuf, ctx->save.p2m_size NULL, 0, shadow_stats); And it's not as obvious that hbuf and to_send are really the same buffer without going back to the declarations. David _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |