[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 8 of 8] Tools: Libxc wrapper for the new sharing audit domctl



On Fri, 2011-12-09 at 23:15 +0000, Andres Lagar-Cavilla wrote:
> tools/libxc/xc_memshr.c |  14 ++++++++++++++
>  tools/libxc/xenctrl.h   |   2 ++
>  2 files changed, 16 insertions(+), 0 deletions(-)

This is something you'd trigger manually as a debug aid? Or would the
memshr daemon do it occasionally?

> 
> 
> Signed-off-by: Adin Scannell <adin@xxxxxxxxxxx>
> 
> diff -r 33935769e257 -r 6514004012c7 tools/libxc/xc_memshr.c
> --- a/tools/libxc/xc_memshr.c
> +++ b/tools/libxc/xc_memshr.c
> @@ -211,3 +211,17 @@ int xc_memshr_debug_gref(xc_interface *x
>      return do_domctl(xch, &domctl);
>  }
>  
> +int xc_memshr_audit(xc_interface *xch,
> +                    uint32_t domid)
> +{
> +    DECLARE_DOMCTL;
> +    struct xen_domctl_mem_sharing_op *op;
> +
> +    domctl.cmd = XEN_DOMCTL_mem_sharing_op;
> +    domctl.interface_version = XEN_DOMCTL_INTERFACE_VERSION;
> +    domctl.domain = (domid_t)domid;
> +    op = &(domctl.u.mem_sharing_op);
> +    op->op = XEN_DOMCTL_MEM_EVENT_OP_SHARING_AUDIT;
> +
> +    return do_domctl(xch, &domctl);
> +}
> diff -r 33935769e257 -r 6514004012c7 tools/libxc/xenctrl.h
> --- a/tools/libxc/xenctrl.h
> +++ b/tools/libxc/xenctrl.h
> @@ -1921,6 +1921,8 @@ int xc_memshr_debug_mfn(xc_interface *xc
>  int xc_memshr_debug_gref(xc_interface *xch,
>                           uint32_t domid,
>                           grant_ref_t gref);
> +int xc_memshr_audit(xc_interface *xch,
> +                    uint32_t domid);
>  
>  int xc_flask_load(xc_interface *xc_handle, char *buf, uint32_t size);
>  int xc_flask_context_to_sid(xc_interface *xc_handle, char *buf, uint32_t 
> size, uint32_t *sid);



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.