From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH V2 1/2] xen, libxc: Fine grained control of REP emulation optimizations Date: Fri, 25 Sep 2015 16:34:48 +0100 Message-ID: <1443195288.25250.165.camel@citrix.com> References: <1442842294-6123-1-git-send-email-rcojocaru@bitdefender.com> <1442842294-6123-2-git-send-email-rcojocaru@bitdefender.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1442842294-6123-2-git-send-email-rcojocaru@bitdefender.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Razvan Cojocaru , 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 List-Id: xen-devel@lists.xenproject.org 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