[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1 of 2] Use memops for mem paging, sharing, and access, instead of domctls
On Wed, 2012-02-01 at 20:09 +0000, Andres Lagar-Cavilla wrote: > > > +int xc_mem_event_memop(xc_interface *xch, domid_t domain_id, > + unsigned int op, unsigned int mode, > + uint64_t gfn, void *buffer) > +{ > + xen_mem_event_op_t meo; > + > + memset(&meo, 0, sizeof(meo)); > + > + meo.op = op; > + meo.domain = domain_id; > + meo.gfn = gfn; > + meo.buffer = (unsigned long) buffer; Hypercall arguments need to use the xc_hypercall_buffer stuff in order to ensure that the memory is safe to access from a hypercall (in particular that it is mlocked or similar)-- I don't see where that happens for this buffer. meo itself is bounced by do_memory_op so that is OK. I was also a little suspicious of ring_addr and shared_addr in xc_mem_event_control in this regard. Or does the mem sharing code make it's own arrangements for these sorts of things somewhere? Ian. > + > + return do_memory_op(xch, mode, &meo, sizeof(meo)); > +} _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |