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

Re: [Xen-devel] [PATCH 1/2] xen/arm: add support for vm_assist hypercall



On Fri, 20 May 2016, Juergen Gross wrote:
> Up to now the vm_assist hypercall hasn't been supported on ARM, as
> there are only x86 specific features to switch. Add support of
> vm_assist on ARM for future use.
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> ---
>  xen/arch/arm/traps.c         | 1 +
>  xen/common/domain.c          | 2 --
>  xen/common/kernel.c          | 2 --
>  xen/include/asm-arm/config.h | 2 ++
>  4 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
> index 1828ea1..ccc6351 100644
> --- a/xen/arch/arm/traps.c
> +++ b/xen/arch/arm/traps.c
> @@ -1284,6 +1284,7 @@ static arm_hypercall_t arm_hypercall_table[] = {
>      HYPERCALL(multicall, 2),
>      HYPERCALL(platform_op, 1),
>      HYPERCALL_ARM(vcpu_op, 3),
> +    HYPERCALL(vm_assist, 2),
>  };
>  
>  #ifndef NDEBUG
> diff --git a/xen/common/domain.c b/xen/common/domain.c
> index 45273d4..0afb1ee 100644
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -1408,7 +1408,6 @@ long do_vcpu_op(int cmd, unsigned int vcpuid, 
> XEN_GUEST_HANDLE_PARAM(void) arg)
>      return rc;
>  }
>  
> -#ifdef VM_ASSIST_VALID
>  long vm_assist(struct domain *p, unsigned int cmd, unsigned int type,
>                 unsigned long valid)
>  {
> @@ -1427,7 +1426,6 @@ long vm_assist(struct domain *p, unsigned int cmd, 
> unsigned int type,
>  
>      return -ENOSYS;
>  }
> -#endif
>  
>  struct pirq *pirq_get_info(struct domain *d, int pirq)
>  {
> diff --git a/xen/common/kernel.c b/xen/common/kernel.c
> index 1a6823a..74b6e1f 100644
> --- a/xen/common/kernel.c
> +++ b/xen/common/kernel.c
> @@ -441,12 +441,10 @@ DO(nmi_op)(unsigned int cmd, 
> XEN_GUEST_HANDLE_PARAM(void) arg)
>      return rc;
>  }
>  
> -#ifdef VM_ASSIST_VALID
>  DO(vm_assist)(unsigned int cmd, unsigned int type)
>  {
>      return vm_assist(current->domain, cmd, type, VM_ASSIST_VALID);
>  }
> -#endif
>  
>  DO(ni_hypercall)(void)
>  {
> diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h
> index 2d11b62..563f49b 100644
> --- a/xen/include/asm-arm/config.h
> +++ b/xen/include/asm-arm/config.h
> @@ -199,6 +199,8 @@ extern unsigned long frametable_virt_end;
>  #define watchdog_disable() ((void)0)
>  #define watchdog_enable()  ((void)0)
>  
> +#define VM_ASSIST_VALID          (0)
 
This is a nit, but as VM_ASSIST_VALID is only used with #ifdef, I would
just:

#define VM_ASSIST_VALID

the two previous #define are to 0, because they are replacing functions.

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

 


Rackspace

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