All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>,
	xen-devel@lists.xen.org
Cc: Stefano Stabellini <stefano.stabellini@citrix.com>,
	Daniel De Graaf <dgdegra@tycho.nsa.gov>, Tim Deegan <tim@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [RFC PATCH v3 08/12] xsm: enable xsm_platform_op hook for all architectures
Date: Thu, 23 Oct 2014 17:11:47 +0100	[thread overview]
Message-ID: <544928C3.8070606@linaro.org> (raw)
In-Reply-To: <1414076867-2148-9-git-send-email-oleksandr.dmytryshyn@globallogic.com>

Hi Oleksandr,

You forgot to CC Daniel (CCed him) who is the XSM maintainers.

On 10/23/2014 04:07 PM, Oleksandr Dmytryshyn wrote:
> This hook is used by platform hypercall which will
> be implemented for all architectures.

I don't think it's necessary to have a separate patch for XSM. I would
fold it in #9.

Otherwise, this change looks good to me.

> 
> Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>
> ---
>  xen/include/xsm/dummy.h | 12 ++++++------
>  xen/include/xsm/xsm.h   | 10 +++++-----
>  xen/xsm/flask/hooks.c   |  3 ++-
>  3 files changed, 13 insertions(+), 12 deletions(-)
> 
> diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
> index eb9e1a1..911fb5d 100644
> --- a/xen/include/xsm/dummy.h
> +++ b/xen/include/xsm/dummy.h
> @@ -491,6 +491,12 @@ static XSM_INLINE int xsm_hvm_param_nested(XSM_DEFAULT_ARG struct domain *d)
>      return xsm_default_action(action, current->domain, d);
>  }
>  
> +static XSM_INLINE int xsm_platform_op(XSM_DEFAULT_ARG uint32_t op)
> +{
> +    XSM_ASSERT_ACTION(XSM_PRIV);
> +    return xsm_default_action(action, current->domain, NULL);
> +}
> +
>  #ifdef CONFIG_X86
>  static XSM_INLINE int xsm_shadow_control(XSM_DEFAULT_ARG struct domain *d, uint32_t op)
>  {
> @@ -546,12 +552,6 @@ static XSM_INLINE int xsm_apic(XSM_DEFAULT_ARG struct domain *d, int cmd)
>      return xsm_default_action(action, d, NULL);
>  }
>  
> -static XSM_INLINE int xsm_platform_op(XSM_DEFAULT_ARG uint32_t op)
> -{
> -    XSM_ASSERT_ACTION(XSM_PRIV);
> -    return xsm_default_action(action, current->domain, NULL);
> -}
> -
>  static XSM_INLINE int xsm_machine_memory_map(XSM_DEFAULT_VOID)
>  {
>      XSM_ASSERT_ACTION(XSM_PRIV);
> diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
> index 1939453..5cb1e0d 100644
> --- a/xen/include/xsm/xsm.h
> +++ b/xen/include/xsm/xsm.h
> @@ -509,6 +509,11 @@ static inline int xsm_hvm_param_nested (xsm_default_t def, struct domain *d)
>      return xsm_ops->hvm_param_nested(d);
>  }
>  
> +static inline int xsm_platform_op (xsm_default_t def, uint32_t op)
> +{
> +    return xsm_ops->platform_op(op);
> +}
> +
>  #ifdef CONFIG_X86
>  static inline int xsm_shadow_control (xsm_default_t def, struct domain *d, uint32_t op)
>  {
> @@ -560,11 +565,6 @@ static inline int xsm_memtype (xsm_default_t def, uint32_t access)
>      return xsm_ops->memtype(access);
>  }
>  
> -static inline int xsm_platform_op (xsm_default_t def, uint32_t op)
> -{
> -    return xsm_ops->platform_op(op);
> -}
> -
>  static inline int xsm_machine_memory_map(xsm_default_t def)
>  {
>      return xsm_ops->machine_memory_map();
> diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
> index d94ab77..29126ec 100644
> --- a/xen/xsm/flask/hooks.c
> +++ b/xen/xsm/flask/hooks.c
> @@ -1542,6 +1542,8 @@ static struct xsm_operations flask_ops = {
>      .add_to_physmap = flask_add_to_physmap,
>      .remove_from_physmap = flask_remove_from_physmap,
>  
> +    .platform_op = flask_platform_op,
> +
>  #ifdef CONFIG_X86
>      .shadow_control = flask_shadow_control,
>      .hvm_set_pci_intx_level = flask_hvm_set_pci_intx_level,
> @@ -1552,7 +1554,6 @@ static struct xsm_operations flask_ops = {
>      .mem_event_op = flask_mem_event_op,
>      .mem_sharing_op = flask_mem_sharing_op,
>      .apic = flask_apic,
> -    .platform_op = flask_platform_op,
>      .machine_memory_map = flask_machine_memory_map,
>      .domain_memory_map = flask_domain_memory_map,
>      .mmu_update = flask_mmu_update,
> 


-- 
Julien Grall

  reply	other threads:[~2014-10-23 16:11 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 15:07 [RFC PATCH v3 00/12]xen_cpufreq implementation in Xen hypervisor Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 01/12] cpufreq: move cpufreq.h file to the xen/include/xen location Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 02/12] pm: move processor_perf.h " Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 03/12] pmstat: move pmstat.c file to the xen/drivers/pm/stat.c location Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 04/12] cpufreq: make turbo settings to be configurable Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 05/12] pmstat: make pmstat functions more generalizable Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 06/12] cpufreq: make cpufreq driver " Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 07/12] arch/arm: create device tree nodes for hwdom cpufreq cpu driver Oleksandr Dmytryshyn
2014-10-23 15:49   ` Julien Grall
2014-10-24 10:24     ` Oleksandr Dmytryshyn
2014-10-27 10:52       ` Oleksandr Dmytryshyn
2014-10-27 13:15         ` Julien Grall
2014-10-27 13:32           ` Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 08/12] xsm: enable xsm_platform_op hook for all architectures Oleksandr Dmytryshyn
2014-10-23 16:11   ` Julien Grall [this message]
2014-10-24 10:24     ` Oleksandr Dmytryshyn
2014-10-24 10:27       ` Oleksandr Dmytryshyn
2014-10-24 11:38         ` Julien Grall
2014-10-23 15:07 ` [RFC PATCH v3 09/12] xen: arm: implement platform hypercall Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 10/12] cpufreq: add hwdom-cpufreq driver Oleksandr Dmytryshyn
2014-10-23 16:42   ` Julien Grall
2014-10-24 10:30     ` Oleksandr Dmytryshyn
2014-10-24 11:45       ` Julien Grall
2014-10-24 13:05         ` Oleksandr Dmytryshyn
2014-10-24 13:08           ` Julien Grall
2014-10-27 13:29             ` Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 11/12] xen: arm: implement XEN_SYSCTL_cpufreq_op Oleksandr Dmytryshyn
2014-10-23 16:27   ` Julien Grall
2014-10-24 10:37     ` Oleksandr Dmytryshyn
2014-10-26 17:41   ` Stefano Stabellini
2014-10-27 16:27     ` Oleksandr Dmytryshyn
2014-10-23 15:07 ` [RFC PATCH v3 12/12] xen/arm: enable cpufreq functionality for ARM Oleksandr Dmytryshyn

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=544928C3.8070606@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=ian.campbell@citrix.com \
    --cc=oleksandr.dmytryshyn@globallogic.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.