[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features



On 03.08.2020 20:21, Oleksandr Tyshchenko wrote:
> --- a/xen/include/xsm/dummy.h
> +++ b/xen/include/xsm/dummy.h
> @@ -713,14 +713,14 @@ static XSM_INLINE int xsm_pmu_op (XSM_DEFAULT_ARG 
> struct domain *d, unsigned int
>      }
>  }
>  
> +#endif /* CONFIG_X86 */
> +
>  static XSM_INLINE int xsm_dm_op(XSM_DEFAULT_ARG struct domain *d)
>  {
>      XSM_ASSERT_ACTION(XSM_DM_PRIV);
>      return xsm_default_action(action, current->domain, d);
>  }
>  
> -#endif /* CONFIG_X86 */
> -
>  #ifdef CONFIG_ARGO
>  static XSM_INLINE int xsm_argo_enable(const struct domain *d)
>  {
> diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
> index a80bcf3..2a9b39d 100644
> --- a/xen/include/xsm/xsm.h
> +++ b/xen/include/xsm/xsm.h
> @@ -177,8 +177,8 @@ struct xsm_operations {
>      int (*ioport_permission) (struct domain *d, uint32_t s, uint32_t e, 
> uint8_t allow);
>      int (*ioport_mapping) (struct domain *d, uint32_t s, uint32_t e, uint8_t 
> allow);
>      int (*pmu_op) (struct domain *d, unsigned int op);
> -    int (*dm_op) (struct domain *d);
>  #endif
> +    int (*dm_op) (struct domain *d);
>      int (*xen_version) (uint32_t cmd);
>      int (*domain_resource_map) (struct domain *d);
>  #ifdef CONFIG_ARGO
> @@ -688,13 +688,13 @@ static inline int xsm_pmu_op (xsm_default_t def, struct 
> domain *d, unsigned int
>      return xsm_ops->pmu_op(d, op);
>  }
>  
> +#endif /* CONFIG_X86 */
> +
>  static inline int xsm_dm_op(xsm_default_t def, struct domain *d)
>  {
>      return xsm_ops->dm_op(d);
>  }
>  
> -#endif /* CONFIG_X86 */
> -
>  static inline int xsm_xen_version (xsm_default_t def, uint32_t op)
>  {
>      return xsm_ops->xen_version(op);
> diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
> index d4cce68..e3afd06 100644
> --- a/xen/xsm/dummy.c
> +++ b/xen/xsm/dummy.c
> @@ -148,8 +148,8 @@ void __init xsm_fixup_ops (struct xsm_operations *ops)
>      set_to_dummy_if_null(ops, ioport_permission);
>      set_to_dummy_if_null(ops, ioport_mapping);
>      set_to_dummy_if_null(ops, pmu_op);
> -    set_to_dummy_if_null(ops, dm_op);
>  #endif
> +    set_to_dummy_if_null(ops, dm_op);
>      set_to_dummy_if_null(ops, xen_version);
>      set_to_dummy_if_null(ops, domain_resource_map);
>  #ifdef CONFIG_ARGO
> diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
> index a314bf8..645192a 100644
> --- a/xen/xsm/flask/hooks.c
> +++ b/xen/xsm/flask/hooks.c
> @@ -1662,14 +1662,13 @@ static int flask_pmu_op (struct domain *d, unsigned 
> int op)
>          return -EPERM;
>      }
>  }
> +#endif /* CONFIG_X86 */
>  
>  static int flask_dm_op(struct domain *d)
>  {
>      return current_has_perm(d, SECCLASS_HVM, HVM__DM);
>  }
>  
> -#endif /* CONFIG_X86 */
> -
>  static int flask_xen_version (uint32_t op)
>  {
>      u32 dsid = domain_sid(current->domain);
> @@ -1872,8 +1871,8 @@ static struct xsm_operations flask_ops = {
>      .ioport_permission = flask_ioport_permission,
>      .ioport_mapping = flask_ioport_mapping,
>      .pmu_op = flask_pmu_op,
> -    .dm_op = flask_dm_op,
>  #endif
> +    .dm_op = flask_dm_op,
>      .xen_version = flask_xen_version,
>      .domain_resource_map = flask_domain_resource_map,
>  #ifdef CONFIG_ARGO

All of this looks to belong into patch 2?

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.