return xc_memshr_memop(xch, domid, &mso);
}
-int xc_memshr_debug_mfn(xc_interface *xch,
- domid_t domid,
- unsigned long mfn)
-{
- xen_mem_sharing_op_t mso;
-
- memset(&mso, 0, sizeof(mso));
-
- mso.op = XENMEM_sharing_op_debug_mfn;
- mso.u.debug.u.mfn = mfn;
-
- return xc_memshr_memop(xch, domid, &mso);
-}
-
int xc_memshr_debug_gref(xc_interface *xch,
domid_t domid,
grant_ref_t gref)
int xc_memshr_debug_gfn(xc_interface *xch,
domid_t domid,
unsigned long gfn);
-int xc_memshr_debug_mfn(xc_interface *xch,
- domid_t domid,
- unsigned long mfn);
int xc_memshr_debug_gref(xc_interface *xch,
domid_t domid,
grant_ref_t gref);
if ( (page = __grab_shared_page(mfn)) == NULL)
{
gdprintk(XENLOG_ERR, "Invalid MFN=%lx\n", mfn_x(mfn));
- return -1;
+ return -EINVAL;
}
MEM_SHARING_DEBUG(
MEM_SHARING_DEBUG(
"Asked to debug [dom=%d,gref=%d], but not yet inited.\n",
d->domain_id, ref);
- return -1;
+ return -EINVAL;
}
(void)mem_sharing_gref_to_gfn(d, ref, &gfn);
shah = shared_entry_header(d->grant_table, ref);
}
break;
- case XENMEM_sharing_op_debug_mfn:
- {
- unsigned long mfn = mec->u.debug.u.mfn;
- rc = mem_sharing_debug_mfn(_mfn(mfn));
- }
- break;
-
case XENMEM_sharing_op_debug_gref:
{
grant_ref_t gref = mec->u.debug.u.gref;