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

Re: [Xen-devel] [PATCH V2 1/2] xen, libxc: Fine grained control of REP emulation optimizations



On Mon, 2015-09-21 at 16:31 +0300, Razvan Cojocaru wrote:
> diff --git a/tools/libxc/include/xenctrl.h
> b/tools/libxc/include/xenctrl.h
> index 3482544..3bfa00b 100644
> --- a/tools/libxc/include/xenctrl.h
> +++ b/tools/libxc/include/xenctrl.h
> @@ -2428,6 +2428,18 @@ int xc_monitor_software_breakpoint(xc_interface
> *xch, domid_t domain_id,
>  int xc_monitor_guest_request(xc_interface *xch, domid_t domain_id,
>                               bool enable, bool sync);
>  
> +/**
> + * This function enables / disables emulation for each REP for a
> + * REP-compatible instruction.
> + *
> + * @parm xch a handle to an open hypervisor interface.
> + * @parm domain_id the domain id one wants to get the node affinity of.
> + * @parm enable if 0 optimize when possible, else emulate each REP.
> + * @return 0 on success, -1 on failure.
> + */
> +int xc_monitor_emulate_each_rep(xc_interface *xch, domid_t domain_id,
> +                                bool enable);
> +
>  /***
>   * Memory sharing operations.
>   *
> diff --git a/tools/libxc/xc_monitor.c b/tools/libxc/xc_monitor.c
> index 065669c..b1705dd 100644
> --- a/tools/libxc/xc_monitor.c
> +++ b/tools/libxc/xc_monitor.c
> @@ -143,3 +143,16 @@ int xc_monitor_guest_request(xc_interface *xch,
> domid_t domain_id, bool enable,
>  
>      return do_domctl(xch, &domctl);
>  }
> +
> +int xc_monitor_emulate_each_rep(xc_interface *xch, domid_t domain_id,
> +                                bool enable)
> +{
> +    DECLARE_DOMCTL;
> +
> +    domctl.cmd = XEN_DOMCTL_monitor_op;
> +    domctl.domain = domain_id;
> +    domctl.u.monitor_op.op = XEN_DOMCTL_MONITOR_OP_EMULATE_EACH_REP;
> +    domctl.u.monitor_op.event = enable;
> +
> +    return do_domctl(xch, &domctl);
> +}

This is a plausible binding of a hypercall interface so from the toolside
if the hypervisor people are happy with the nderlying inteface:

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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