[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH XTF v2 4/4] xtf: Add monitor mem_access test
> +static int mem_access_init() > +{ > + int rc = 0; > + mem_access_monitor_t *pmon = (mem_access_monitor_t *)monitor; > + > + if ( !pmon ) > + return -EINVAL; > + > + rc = xc_domain_set_access_required(monitor->xch, monitor->domain_id, 1); > + if ( rc < 0 ) > + { > + XTF_MON_ERROR("Error %d setting mem_access listener required\n", rc); > + return rc; > + } > + > + pmon->gfn = xc_translate_foreign_address(monitor->xch, > monitor->domain_id, > + 0, pmon->address); Check that the gfn returned is not 0 before continuing. > + > + rc = xc_set_mem_access(monitor->xch, monitor->domain_id, > XENMEM_access_rw, > + pmon->gfn, 1); > + if ( rc < 0 ) > + { > + XTF_MON_ERROR("Error %d setting memory access!\n", rc); > + return rc; > + } > + > + return 0; > +} _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |