From: Julien Grall <julien.grall@citrix.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>, xen-devel@lists.xen.org
Cc: tamas@tklengyel.com, keir@xen.org, ian.campbell@citrix.com,
stefano.stabellini@eu.citrix.com, george.dunlap@eu.citrix.com,
andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com,
jbeulich@suse.com, wei.liu2@citrix.com
Subject: Re: [PATCH 1/2] xen, libxc: Introduced XEN_DOMCTL_emulate_each_rep
Date: Tue, 15 Sep 2015 16:36:07 +0100 [thread overview]
Message-ID: <55F83AE7.9090805@citrix.com> (raw)
In-Reply-To: <1442308784-10419-2-git-send-email-rcojocaru@bitdefender.com>
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_op 77
> #define XEN_DOMCTL_psr_cat_op 78
> #define XEN_DOMCTL_soft_reset 79
> +#define XEN_DOMCTL_emulate_each_rep 80
> #define XEN_DOMCTL_gdbsx_guestmemio 1000
> #define XEN_DOMCTL_gdbsx_pausevcpu 1001
> #define XEN_DOMCTL_gdbsx_unpausevcpu 1002
> @@ -1202,6 +1209,7 @@ struct xen_domctl {
> struct xen_domctl_psr_cmt_op psr_cmt_op;
> struct xen_domctl_monitor_op monitor_op;
> struct xen_domctl_psr_cat_op psr_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
next prev parent reply other threads:[~2015-09-15 15:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 9:19 [PATCH 0/2] Introspection optimization helpers Razvan Cojocaru
2015-09-15 9:19 ` [PATCH 1/2] xen, libxc: Introduced XEN_DOMCTL_emulate_each_rep Razvan Cojocaru
2015-09-15 9:51 ` Ian Campbell
2015-09-15 15:36 ` Julien Grall [this message]
2015-09-15 15:46 ` Razvan Cojocaru
2015-09-17 12:59 ` Andrew Cooper
2015-09-17 13:20 ` Razvan Cojocaru
2015-09-17 13:37 ` Andrew Cooper
2015-09-17 13:45 ` Razvan Cojocaru
2015-09-15 9:19 ` [PATCH 2/2] xen: Introduce VM_EVENT_FLAG_SET_EIP Razvan Cojocaru
2015-09-16 15:57 ` Tamas K Lengyel
2015-09-16 16:12 ` Razvan Cojocaru
2015-09-18 19:19 ` Tamas K Lengyel
2015-09-21 8:53 ` Jan Beulich
2015-09-21 9:05 ` Razvan Cojocaru
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=55F83AE7.9090805@citrix.com \
--to=julien.grall@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=rcojocaru@bitdefender.com \
--cc=stefano.stabellini@eu.citrix.com \
--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).