Re: [Xen-devel] [PATCH 1/2] xen, libxc: Introduced XEN_DOMCTL_emulate_each_rep

2015-09-17 Thread Razvan Cojocaru
On 09/17/2015 03:59 PM, Andrew Cooper wrote:
> On 15/09/15 10:19, Razvan Cojocaru wrote:
>> Previously, if vm_event emulation support was enabled, then REP
>> optimizations were disabled when emulating REP-compatible
>> instructions. This patch allows fine-tuning of this behaviour by
>> providing a dedicated libxc helper function.
>>
>> Signed-off-by: Razvan Cojocaru 
> 
> This disables all rep optimisations by default, so on its own is
> inappropriate.

REP optimizations are enabled by default. Emulate_each_rep is initially
set to 0, when struct hvm_domain is being initialized, which means that
REP optimizations are enabled. I've tested this and it does work, am I
missing something?

> I am also not sure that an individual domctl subop is appropriate.  Its
> purpose is to undo a performance hit caused by introspection, so should
> live as an introspection subop IMO.

Do you mean xc_monitor_emulate_each_rep() instead of
xc_domain_emulate_each_rep()?

I've placed this in its own domctl subop because it's not introspection
(or vm_event) specific. The change in
xen/arch/x86/hvm/emulate.c enables / disables REP emulation
optimizations regardless of whether there's a vm_event client or not. I
thought this might come handy for somebody else too.

>> ---
>>  tools/libxc/include/xenctrl.h|   11 +++
>>  tools/libxc/xc_domain.c  |   18 ++
>>  xen/arch/x86/hvm/emulate.c   |2 +-
>>  xen/common/domctl.c  |5 +
>>  xen/include/asm-x86/hvm/domain.h |1 +
>>  xen/include/public/domctl.h  |8 
>>  6 files changed, 44 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
>> index 3482544..4ece851 100644
>> --- a/tools/libxc/include/xenctrl.h
>> +++ b/tools/libxc/include/xenctrl.h
>> @@ -643,6 +643,17 @@ int xc_domain_node_getaffinity(xc_interface *xch,
>> xc_nodemap_t nodemap);
>>  
>>  /**
>> + * This function enables / disables emulation for each REP for a
>> + * REP-compatible instruction.
>> + *
>> + * @parm xch a handle to an open hypervisor interface.
>> + * @parm domid 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_domain_emulate_each_rep(xc_interface *xch, uint32_t domid, int 
>> enable);
>> +
>> +/**
>>   * This function specifies the CPU affinity for a vcpu.
>>   *
>>   * There are two kinds of affinity. Soft affinity is on what CPUs a vcpu
>> diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
>> index e7278dd..19b2e46 100644
>> --- a/tools/libxc/xc_domain.c
>> +++ b/tools/libxc/xc_domain.c
>> @@ -2555,6 +2555,24 @@ int xc_domain_soft_reset(xc_interface *xch,
>>  domctl.domain = (domid_t)domid;
>>  return do_domctl(xch, );
>>  }
>> +
>> +int xc_domain_emulate_each_rep(xc_interface *xch, uint32_t domid, int 
>> enable)
>> +{
>> +int ret = -1;
>> +DECLARE_DOMCTL;
>> +
>> +domctl.cmd = XEN_DOMCTL_emulate_each_rep;
>> +domctl.domain = (domid_t)domid;
>> +domctl.u.emulate_each_rep.op = enable;
>> +
>> +ret = do_domctl(xch, );
>> +
>> +if ( ret == -ESRCH )
>> +errno = ENOENT;
> 
> Why do you override ESRCH?  ESRCH is the expected error for a missing
> domain.

I shouldn't, really. This is a copy/paste issue - I've copied and
changed a similar function in Xen 4.4, and that code just got carried
over to this patch. I'll remove that check.


Thanks,
Razvan

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


Re: [Xen-devel] [PATCH 1/2] xen, libxc: Introduced XEN_DOMCTL_emulate_each_rep

2015-09-17 Thread Andrew Cooper
On 15/09/15 10:19, Razvan Cojocaru wrote:
> Previously, if vm_event emulation support was enabled, then REP
> optimizations were disabled when emulating REP-compatible
> instructions. This patch allows fine-tuning of this behaviour by
> providing a dedicated libxc helper function.
>
> Signed-off-by: Razvan Cojocaru 

This disables all rep optimisations by default, so on its own is
inappropriate.

I am also not sure that an individual domctl subop is appropriate.  Its
purpose is to undo a performance hit caused by introspection, so should
live as an introspection subop IMO.

> ---
>  tools/libxc/include/xenctrl.h|   11 +++
>  tools/libxc/xc_domain.c  |   18 ++
>  xen/arch/x86/hvm/emulate.c   |2 +-
>  xen/common/domctl.c  |5 +
>  xen/include/asm-x86/hvm/domain.h |1 +
>  xen/include/public/domctl.h  |8 
>  6 files changed, 44 insertions(+), 1 deletion(-)
>
> diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
> index 3482544..4ece851 100644
> --- a/tools/libxc/include/xenctrl.h
> +++ b/tools/libxc/include/xenctrl.h
> @@ -643,6 +643,17 @@ int xc_domain_node_getaffinity(xc_interface *xch,
> xc_nodemap_t nodemap);
>  
>  /**
> + * This function enables / disables emulation for each REP for a
> + * REP-compatible instruction.
> + *
> + * @parm xch a handle to an open hypervisor interface.
> + * @parm domid 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_domain_emulate_each_rep(xc_interface *xch, uint32_t domid, int 
> enable);
> +
> +/**
>   * This function specifies the CPU affinity for a vcpu.
>   *
>   * There are two kinds of affinity. Soft affinity is on what CPUs a vcpu
> diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
> index e7278dd..19b2e46 100644
> --- a/tools/libxc/xc_domain.c
> +++ b/tools/libxc/xc_domain.c
> @@ -2555,6 +2555,24 @@ int xc_domain_soft_reset(xc_interface *xch,
>  domctl.domain = (domid_t)domid;
>  return do_domctl(xch, );
>  }
> +
> +int xc_domain_emulate_each_rep(xc_interface *xch, uint32_t domid, int enable)
> +{
> +int ret = -1;
> +DECLARE_DOMCTL;
> +
> +domctl.cmd = XEN_DOMCTL_emulate_each_rep;
> +domctl.domain = (domid_t)domid;
> +domctl.u.emulate_each_rep.op = enable;
> +
> +ret = do_domctl(xch, );
> +
> +if ( ret == -ESRCH )
> +errno = ENOENT;

Why do you override ESRCH?  ESRCH is the expected error for a missing
domain.

~Andrew

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


Re: [Xen-devel] [PATCH 1/2] xen, libxc: Introduced XEN_DOMCTL_emulate_each_rep

2015-09-17 Thread Andrew Cooper
On 17/09/15 14:20, Razvan Cojocaru wrote:
> On 09/17/2015 03:59 PM, Andrew Cooper wrote:
>> On 15/09/15 10:19, Razvan Cojocaru wrote:
>>> Previously, if vm_event emulation support was enabled, then REP
>>> optimizations were disabled when emulating REP-compatible
>>> instructions. This patch allows fine-tuning of this behaviour by
>>> providing a dedicated libxc helper function.
>>>
>>> Signed-off-by: Razvan Cojocaru 
>> This disables all rep optimisations by default, so on its own is
>> inappropriate.
> REP optimizations are enabled by default. Emulate_each_rep is initially
> set to 0, when struct hvm_domain is being initialized, which means that
> REP optimizations are enabled. I've tested this and it does work, am I
> missing something?

Oops - you are completely correct.  I got the logic reversed in my
head.  Sorry for the noise.

>
>> I am also not sure that an individual domctl subop is appropriate.  Its
>> purpose is to undo a performance hit caused by introspection, so should
>> live as an introspection subop IMO.
> Do you mean xc_monitor_emulate_each_rep() instead of
> xc_domain_emulate_each_rep()?
>
> I've placed this in its own domctl subop because it's not introspection
> (or vm_event) specific. The change in
> xen/arch/x86/hvm/emulate.c enables / disables REP emulation
> optimizations regardless of whether there's a vm_event client or not. I
> thought this might come handy for somebody else too.

I can't think of a rational reason for anyone to disable rep
optimisations for the sake of it.

I am concerned about introducing options with which people can
needlessly shoot themselves in the foot.  On the other hand, there are
already enough of those.

~Andrew

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


Re: [Xen-devel] [PATCH 1/2] xen, libxc: Introduced XEN_DOMCTL_emulate_each_rep

2015-09-17 Thread Razvan Cojocaru
On 09/17/2015 04:37 PM, Andrew Cooper wrote:
> On 17/09/15 14:20, Razvan Cojocaru wrote:
>> On 09/17/2015 03:59 PM, Andrew Cooper wrote:
>>> On 15/09/15 10:19, Razvan Cojocaru wrote:
 Previously, if vm_event emulation support was enabled, then REP
 optimizations were disabled when emulating REP-compatible
 instructions. This patch allows fine-tuning of this behaviour by
 providing a dedicated libxc helper function.

 Signed-off-by: Razvan Cojocaru 
>>> This disables all rep optimisations by default, so on its own is
>>> inappropriate.
>> REP optimizations are enabled by default. Emulate_each_rep is initially
>> set to 0, when struct hvm_domain is being initialized, which means that
>> REP optimizations are enabled. I've tested this and it does work, am I
>> missing something?
> 
> Oops - you are completely correct.  I got the logic reversed in my
> head.  Sorry for the noise.

No problem at all, thanks for the review!

>>> I am also not sure that an individual domctl subop is appropriate.  Its
>>> purpose is to undo a performance hit caused by introspection, so should
>>> live as an introspection subop IMO.
>> Do you mean xc_monitor_emulate_each_rep() instead of
>> xc_domain_emulate_each_rep()?
>>
>> I've placed this in its own domctl subop because it's not introspection
>> (or vm_event) specific. The change in
>> xen/arch/x86/hvm/emulate.c enables / disables REP emulation
>> optimizations regardless of whether there's a vm_event client or not. I
>> thought this might come handy for somebody else too.
> 
> I can't think of a rational reason for anyone to disable rep
> optimisations for the sake of it.
> 
> I am concerned about introducing options with which people can
> needlessly shoot themselves in the foot.  On the other hand, there are
> already enough of those.

Understood, in that case I'll move it to an xc_monitor_() function and
add an extra check for that in emulate.c in V2 (unless anyone has an
objection to that?).


Thanks,
Razvan

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


[Xen-devel] [PATCH 1/2] xen, libxc: Introduced XEN_DOMCTL_emulate_each_rep

2015-09-15 Thread Razvan Cojocaru
Previously, if vm_event emulation support was enabled, then REP
optimizations were disabled when emulating REP-compatible
instructions. This patch allows fine-tuning of this behaviour by
providing a dedicated libxc helper function.

Signed-off-by: Razvan Cojocaru 
---
 tools/libxc/include/xenctrl.h|   11 +++
 tools/libxc/xc_domain.c  |   18 ++
 xen/arch/x86/hvm/emulate.c   |2 +-
 xen/common/domctl.c  |5 +
 xen/include/asm-x86/hvm/domain.h |1 +
 xen/include/public/domctl.h  |8 
 6 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index 3482544..4ece851 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -643,6 +643,17 @@ int xc_domain_node_getaffinity(xc_interface *xch,
xc_nodemap_t nodemap);
 
 /**
+ * This function enables / disables emulation for each REP for a
+ * REP-compatible instruction.
+ *
+ * @parm xch a handle to an open hypervisor interface.
+ * @parm domid 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_domain_emulate_each_rep(xc_interface *xch, uint32_t domid, int enable);
+
+/**
  * This function specifies the CPU affinity for a vcpu.
  *
  * There are two kinds of affinity. Soft affinity is on what CPUs a vcpu
diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
index e7278dd..19b2e46 100644
--- a/tools/libxc/xc_domain.c
+++ b/tools/libxc/xc_domain.c
@@ -2555,6 +2555,24 @@ int xc_domain_soft_reset(xc_interface *xch,
 domctl.domain = (domid_t)domid;
 return do_domctl(xch, );
 }
+
+int xc_domain_emulate_each_rep(xc_interface *xch, uint32_t domid, int enable)
+{
+int ret = -1;
+DECLARE_DOMCTL;
+
+domctl.cmd = XEN_DOMCTL_emulate_each_rep;
+domctl.domain = (domid_t)domid;
+domctl.u.emulate_each_rep.op = enable;
+
+ret = do_domctl(xch, );
+
+if ( ret == -ESRCH )
+errno = ENOENT;
+
+return ret;
+}
+
 /*
  * Local variables:
  * mode: C
diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index 5934c72..649eb7f 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -514,7 +514,7 @@ static int hvmemul_virtual_to_linear(
  * being triggered for repeated writes to a whole page.
  */
 *reps = min_t(unsigned long, *reps,
-  unlikely(current->domain->arch.mem_access_emulate_enabled)
+  unlikely(current->domain->arch.hvm_domain.emulate_each_rep)
? 1 : 4096);
 
 reg = hvmemul_get_seg_reg(seg, hvmemul_ctxt);
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 9e0fef5..214a22a 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -1180,6 +1180,11 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
u_domctl)
 copyback = 1;
 break;
 
+case XEN_DOMCTL_emulate_each_rep:
+d->arch.hvm_domain.emulate_each_rep = !!op->u.emulate_each_rep.op;
+ret = 0;
+break;
+
 default:
 ret = arch_do_domctl(op, d, u_domctl);
 break;
diff --git a/xen/include/asm-x86/hvm/domain.h b/xen/include/asm-x86/hvm/domain.h
index 992d5d1..b8fbe5e 100644
--- a/xen/include/asm-x86/hvm/domain.h
+++ b/xen/include/asm-x86/hvm/domain.h
@@ -136,6 +136,7 @@ struct hvm_domain {
 bool_t mem_sharing_enabled;
 bool_t qemu_mapcache_invalidate;
 bool_t is_s3_suspended;
+bool_t emulate_each_rep;
 
 /*
  * TSC value that VCPUs use to calculate their tsc_offset value.
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index 794d4d5..efc42a8 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -1063,6 +1063,12 @@ struct xen_domctl_psr_cat_op {
 typedef struct xen_domctl_psr_cat_op xen_domctl_psr_cat_op_t;
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_psr_cat_op_t);
 
+struct xen_domctl_emulate_each_rep {
+int32_t op;
+};
+typedef struct xen_domctl_emulate_each_rep xen_domctl_emulate_each_rep_t;
+DEFINE_XEN_GUEST_HANDLE(xen_domctl_emulate_each_rep_t);
+
 struct xen_domctl {
 uint32_t cmd;
 #define XEN_DOMCTL_createdomain   1
@@ -1140,6 +1146,7 @@ struct xen_domctl {
 #define XEN_DOMCTL_monitor_op77
 #define XEN_DOMCTL_psr_cat_op78
 #define XEN_DOMCTL_soft_reset79
+#define XEN_DOMCTL_emulate_each_rep  80
 #define XEN_DOMCTL_gdbsx_guestmemio1000
 #define XEN_DOMCTL_gdbsx_pausevcpu 1001
 #define XEN_DOMCTL_gdbsx_unpausevcpu   1002
@@ -1202,6 +1209,7 @@ struct xen_domctl {
 struct xen_domctl_psr_cmt_oppsr_cmt_op;
 struct xen_domctl_monitor_opmonitor_op;
 

Re: [Xen-devel] [PATCH 1/2] xen, libxc: Introduced XEN_DOMCTL_emulate_each_rep

2015-09-15 Thread Ian Campbell
On Tue, 2015-09-15 at 12:19 +0300, Razvan Cojocaru wrote:
> Previously, if vm_event emulation support was enabled, then REP
> optimizations were disabled when emulating REP-compatible
> instructions. This patch allows fine-tuning of this behaviour by
> providing a dedicated libxc helper function.
> 
> Signed-off-by: Razvan Cojocaru 

Tools side is trivial and correct, so assuming the interface is agreed by
the hypervisor guys:
Acked-by: Ian Campbell 


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


Re: [Xen-devel] [PATCH 1/2] xen, libxc: Introduced XEN_DOMCTL_emulate_each_rep

2015-09-15 Thread Julien Grall
Hi Razvan,

On 15/09/15 10:19, Razvan Cojocaru wrote:
> diff --git a/xen/common/domctl.c b/xen/common/domctl.c
> index 9e0fef5..214a22a 100644
> --- a/xen/common/domctl.c
> +++ b/xen/common/domctl.c
> @@ -1180,6 +1180,11 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
> u_domctl)
>  copyback = 1;
>  break;
>  
> +case XEN_DOMCTL_emulate_each_rep:
> +d->arch.hvm_domain.emulate_each_rep = !!op->u.emulate_each_rep.op;

The common code should never access directly to an arch field.

Actually this will break on ARM because you introduced the field only
for x86.

Please move this new domctl in arch_do_domctl.

> +ret = 0;
> +break;
> +
>  default:
>  ret = arch_do_domctl(op, d, u_domctl);
>  break;
> diff --git a/xen/include/asm-x86/hvm/domain.h 
> b/xen/include/asm-x86/hvm/domain.h
> index 992d5d1..b8fbe5e 100644
> --- a/xen/include/asm-x86/hvm/domain.h
> +++ b/xen/include/asm-x86/hvm/domain.h
> @@ -136,6 +136,7 @@ struct hvm_domain {
>  bool_t mem_sharing_enabled;
>  bool_t qemu_mapcache_invalidate;
>  bool_t is_s3_suspended;
> +bool_t emulate_each_rep;
>  
>  /*
>   * TSC value that VCPUs use to calculate their tsc_offset value.
> diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
> index 794d4d5..efc42a8 100644
> --- a/xen/include/public/domctl.h
> +++ b/xen/include/public/domctl.h
> @@ -1063,6 +1063,12 @@ struct xen_domctl_psr_cat_op {
>  typedef struct xen_domctl_psr_cat_op xen_domctl_psr_cat_op_t;
>  DEFINE_XEN_GUEST_HANDLE(xen_domctl_psr_cat_op_t);
>  
> +struct xen_domctl_emulate_each_rep {
> +int32_t op;
> +};
> +typedef struct xen_domctl_emulate_each_rep xen_domctl_emulate_each_rep_t;
> +DEFINE_XEN_GUEST_HANDLE(xen_domctl_emulate_each_rep_t);
> +
>  struct xen_domctl {
>  uint32_t cmd;
>  #define XEN_DOMCTL_createdomain   1
> @@ -1140,6 +1146,7 @@ struct xen_domctl {
>  #define XEN_DOMCTL_monitor_op77
>  #define XEN_DOMCTL_psr_cat_op78
>  #define XEN_DOMCTL_soft_reset79
> +#define XEN_DOMCTL_emulate_each_rep  80
>  #define XEN_DOMCTL_gdbsx_guestmemio1000
>  #define XEN_DOMCTL_gdbsx_pausevcpu 1001
>  #define XEN_DOMCTL_gdbsx_unpausevcpu   1002
> @@ -1202,6 +1209,7 @@ struct xen_domctl {
>  struct xen_domctl_psr_cmt_oppsr_cmt_op;
>  struct xen_domctl_monitor_opmonitor_op;
>  struct xen_domctl_psr_cat_oppsr_cat_op;
> +struct xen_domctl_emulate_each_rep  emulate_each_rep;

IHMO this should be exposed only for x86 as we don't have a such
instruction on ARM.

>  uint8_t pad[128];
>  } u;
>  };
> 

Regards,

-- 
Julien Grall

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


Re: [Xen-devel] [PATCH 1/2] xen, libxc: Introduced XEN_DOMCTL_emulate_each_rep

2015-09-15 Thread Razvan Cojocaru
On 09/15/2015 06:36 PM, Julien Grall wrote:
> Hi Razvan,
> 
> On 15/09/15 10:19, Razvan Cojocaru wrote:
>> diff --git a/xen/common/domctl.c b/xen/common/domctl.c
>> index 9e0fef5..214a22a 100644
>> --- a/xen/common/domctl.c
>> +++ b/xen/common/domctl.c
>> @@ -1180,6 +1180,11 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
>> u_domctl)
>>  copyback = 1;
>>  break;
>>  
>> +case XEN_DOMCTL_emulate_each_rep:
>> +d->arch.hvm_domain.emulate_each_rep = !!op->u.emulate_each_rep.op;
> 
> The common code should never access directly to an arch field.
> 
> Actually this will break on ARM because you introduced the field only
> for x86.
> 
> Please move this new domctl in arch_do_domctl.

Of course, thanks for pointing that out!

>> +ret = 0;
>> +break;
>> +
>>  default:
>>  ret = arch_do_domctl(op, d, u_domctl);
>>  break;
>> diff --git a/xen/include/asm-x86/hvm/domain.h 
>> b/xen/include/asm-x86/hvm/domain.h
>> index 992d5d1..b8fbe5e 100644
>> --- a/xen/include/asm-x86/hvm/domain.h
>> +++ b/xen/include/asm-x86/hvm/domain.h
>> @@ -136,6 +136,7 @@ struct hvm_domain {
>>  bool_t mem_sharing_enabled;
>>  bool_t qemu_mapcache_invalidate;
>>  bool_t is_s3_suspended;
>> +bool_t emulate_each_rep;
>>  
>>  /*
>>   * TSC value that VCPUs use to calculate their tsc_offset value.
>> diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
>> index 794d4d5..efc42a8 100644
>> --- a/xen/include/public/domctl.h
>> +++ b/xen/include/public/domctl.h
>> @@ -1063,6 +1063,12 @@ struct xen_domctl_psr_cat_op {
>>  typedef struct xen_domctl_psr_cat_op xen_domctl_psr_cat_op_t;
>>  DEFINE_XEN_GUEST_HANDLE(xen_domctl_psr_cat_op_t);
>>  
>> +struct xen_domctl_emulate_each_rep {
>> +int32_t op;
>> +};
>> +typedef struct xen_domctl_emulate_each_rep xen_domctl_emulate_each_rep_t;
>> +DEFINE_XEN_GUEST_HANDLE(xen_domctl_emulate_each_rep_t);
>> +
>>  struct xen_domctl {
>>  uint32_t cmd;
>>  #define XEN_DOMCTL_createdomain   1
>> @@ -1140,6 +1146,7 @@ struct xen_domctl {
>>  #define XEN_DOMCTL_monitor_op77
>>  #define XEN_DOMCTL_psr_cat_op78
>>  #define XEN_DOMCTL_soft_reset79
>> +#define XEN_DOMCTL_emulate_each_rep  80
>>  #define XEN_DOMCTL_gdbsx_guestmemio1000
>>  #define XEN_DOMCTL_gdbsx_pausevcpu 1001
>>  #define XEN_DOMCTL_gdbsx_unpausevcpu   1002
>> @@ -1202,6 +1209,7 @@ struct xen_domctl {
>>  struct xen_domctl_psr_cmt_oppsr_cmt_op;
>>  struct xen_domctl_monitor_opmonitor_op;
>>  struct xen_domctl_psr_cat_oppsr_cat_op;
>> +struct xen_domctl_emulate_each_rep  emulate_each_rep;
> 
> IHMO this should be exposed only for x86 as we don't have a such
> instruction on ARM.

Sure, I'll #ifdef it with the other __i386__ and __x86_64__ things.


Thanks for the quick review,
Razvan

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