mbox series

[0/7] xen: Consolidate asm-*/guest_access.h in xen/guest_access.h

Message ID 20200404131017.27330-1-julien@xen.org (mailing list archive)
Headers show
Series xen: Consolidate asm-*/guest_access.h in xen/guest_access.h | expand

Message

Julien Grall April 4, 2020, 1:10 p.m. UTC
From: Julien Grall <jgrall@amazon.com>

Hi all,

A lot of the helpers implemented in asm-*/guest_access.h are implemented
the same way. This series aims to avoid the duplication and implement
them only once in xen/guest_access.h.

Cheers,

Julien Grall (7):
  xen/guest_access: Add missing emacs magics
  xen/arm: kernel: Re-order the includes
  xen/arm: decode: Re-order the includes
  xen/arm: guestcopy: Re-order the includes
  xen: include xen/guest_access.h rather than asm/guest_access.h
  xen/guest_access: Consolidate guest access helpers in
    xen/guest_access.h
  xen/guest_access: Fix coding style in xen/guest_access.h

 xen/arch/arm/decode.c                |   7 +-
 xen/arch/arm/domain.c                |   2 +-
 xen/arch/arm/guest_walk.c            |   3 +-
 xen/arch/arm/guestcopy.c             |   5 +-
 xen/arch/arm/kernel.c                |  12 +--
 xen/arch/arm/vgic-v3-its.c           |   2 +-
 xen/arch/x86/hvm/svm/svm.c           |   2 +-
 xen/arch/x86/hvm/viridian/viridian.c |   2 +-
 xen/arch/x86/hvm/vmx/vmx.c           |   2 +-
 xen/common/libelf/libelf-loader.c    |   2 +-
 xen/include/asm-arm/guest_access.h   | 132 ------------------------
 xen/include/asm-x86/guest_access.h   | 129 ++---------------------
 xen/include/xen/guest_access.h       | 149 +++++++++++++++++++++++++++
 xen/lib/x86/private.h                |   2 +-
 14 files changed, 178 insertions(+), 273 deletions(-)

Comments

Julien Grall April 4, 2020, 1:13 p.m. UTC | #1
On 04/04/2020 14:10, Julien Grall wrote:
> From: Julien Grall <jgrall@amazon.com>
> 
> Hi all,
> 
> A lot of the helpers implemented in asm-*/guest_access.h are implemented
> the same way. This series aims to avoid the duplication and implement
> them only once in xen/guest_access.h.

I forgot to mention this is based on "xen/guest_access: Harden 
*copy_to_guest_offset() to prevent const dest operand" [1].

This will also clash with Jan's patch "guestcopy: evaluate 
{,__}copy{,_field}_to_guest*() arguments just once" [2]. I am happy to 
rebase this series on top of it.

Cheers,

[1] https://lore.kernel.org/xen-devel/20200404130613.26428-1-julien@xen.org/
[2] 
https://lore.kernel.org/xen-devel/9918b339-e914-7228-5f8e-86c82090b5bd@suse.com/

> 
> Cheers,
> 
> Julien Grall (7):
>    xen/guest_access: Add missing emacs magics
>    xen/arm: kernel: Re-order the includes
>    xen/arm: decode: Re-order the includes
>    xen/arm: guestcopy: Re-order the includes
>    xen: include xen/guest_access.h rather than asm/guest_access.h
>    xen/guest_access: Consolidate guest access helpers in
>      xen/guest_access.h
>    xen/guest_access: Fix coding style in xen/guest_access.h
> 
>   xen/arch/arm/decode.c                |   7 +-
>   xen/arch/arm/domain.c                |   2 +-
>   xen/arch/arm/guest_walk.c            |   3 +-
>   xen/arch/arm/guestcopy.c             |   5 +-
>   xen/arch/arm/kernel.c                |  12 +--
>   xen/arch/arm/vgic-v3-its.c           |   2 +-
>   xen/arch/x86/hvm/svm/svm.c           |   2 +-
>   xen/arch/x86/hvm/viridian/viridian.c |   2 +-
>   xen/arch/x86/hvm/vmx/vmx.c           |   2 +-
>   xen/common/libelf/libelf-loader.c    |   2 +-
>   xen/include/asm-arm/guest_access.h   | 132 ------------------------
>   xen/include/asm-x86/guest_access.h   | 129 ++---------------------
>   xen/include/xen/guest_access.h       | 149 +++++++++++++++++++++++++++
>   xen/lib/x86/private.h                |   2 +-
>   14 files changed, 178 insertions(+), 273 deletions(-)
>