xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>, xen-devel@lists.xen.org
Cc: tamas@tklengyel.com, keir@xen.org, andrew.cooper3@citrix.com,
	ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.co,
	stefano.stabellini@citrix.com, jbeulich@suse.com,
	wei.liu2@citrix.com
Subject: Re: [PATCH V2 1/2] xen, libxc: Fine grained control of REP emulation optimizations
Date: Fri, 25 Sep 2015 16:34:48 +0100	[thread overview]
Message-ID: <1443195288.25250.165.camel@citrix.com> (raw)
In-Reply-To: <1442842294-6123-2-git-send-email-rcojocaru@bitdefender.com>

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@citrix.com>

  parent reply	other threads:[~2015-09-25 15:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 13:31 [PATCH V2 0/2] Introspection optimization helpers Razvan Cojocaru
2015-09-21 13:31 ` [PATCH V2 1/2] xen, libxc: Fine grained control of REP emulation optimizations Razvan Cojocaru
2015-09-22 15:17   ` Jan Beulich
2015-09-22 15:28     ` Razvan Cojocaru
2015-09-22 15:39       ` Jan Beulich
2015-09-22 15:41         ` Razvan Cojocaru
2015-09-25 15:34   ` Ian Campbell [this message]
2015-09-21 13:31 ` [PATCH V2 2/2] xen: Introduce VM_EVENT_FLAG_SET_REGISTERS Razvan Cojocaru
2015-09-22 15:19   ` Jan Beulich
2015-09-22 15:34     ` Tamas K Lengyel
2015-09-22 15:39       ` Razvan Cojocaru
2015-09-22 15:35     ` Razvan Cojocaru
2015-09-22 15:39       ` Tamas K Lengyel
2015-09-21 13:58 ` [PATCH V2 0/2] Introspection optimization helpers Razvan Cojocaru
2015-09-21 14:52   ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1443195288.25250.165.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=rcojocaru@bitdefender.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=stefano.stabellini@eu.citrix.co \
    --cc=tamas@tklengyel.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).