mbox series

[Xen-devel,v2,00/24] xen/arm: Memory subsystem clean-up

Message ID 20170912100330.2168-1-julien.grall@arm.com
Headers show
Series xen/arm: Memory subsystem clean-up | expand

Message

Julien Grall Sept. 12, 2017, 10:03 a.m. UTC
Hi all,

This patch series contains clean-up for the ARM memory subsystem in preparation
of reworking the page tables handling.

A branch with the patches can be found on xenbits:

https://xenbits.xen.org/git-http/people/julieng/xen-unstable.git
branch mm-cleanup-v2

For all the changes see in each patch.

Cheers,

Julien Grall (24):
  xen/x86: mm: Introduce {G,M}FN <-> {G,M}ADDR helpers
  xen/mm: Use typesafe MFN for alloc_boot_pages return
  xen/mm: Use __virt_to_mfn in map_domain_page instead of virt_to_mfn
  xen/arm: mm: Redefine mfn_to_virt to use typesafe
  xen/arm: hsr_iabt: Document RES0 field
  xen/arm: traps: Don't define FAR_EL2 for ARM32
  xen/arm: arm32: Don't define FAR_EL1
  xen/arm: Add FnV field in hsr_*abt
  xen/arm: Introduce hsr_xabt to gather common bits between hsr_dabt and
  xen/arm: traps: Introduce a helper to read the hypersivor fault
    register
  xen/arm: traps: Improve logging for data/prefetch abort fault
  xen/arm: Replace ioremap_attr(PAGE_HYPERVISOR_NOCACHE) call by
    ioremap_nocache
  xen/arm: page: Remove unused attributes DEV_NONSHARED and DEV_CACHED
  xen/arm: page: Use directly BUFFERABLE and drop DEV_WC
  xen/arm: page: Prefix memory types with MT_
  xen/arm: page: Use ARMv8 naming to improve readability
  xen/arm: page: Clean-up the definition of MAIRVAL
  xen/arm: mm: Rename and clarify AP[1] in the stage-1 page table
  xen/arm: Switch to SYS_STATE_boot just after end_boot_allocator()
  xen/arm: mm: Rename 'ai' into 'flags' in create_xen_entries
  xen/arm: page: Describe the layout of flags used to update page tables
  xen/arm: mm: Embed permission in the flags
  xen/arm: mm: Handle permission flags when adding a new mapping
  xen/arm: mm: Use memory flags for modify_xen_mappings rather than
    custom one

 xen/arch/arm/kernel.c             |  2 +-
 xen/arch/arm/livepatch.c          |  6 +--
 xen/arch/arm/mm.c                 | 74 +++++++++++++++--------------
 xen/arch/arm/platforms/exynos5.c  |  2 +-
 xen/arch/arm/platforms/omap5.c    |  6 +--
 xen/arch/arm/platforms/vexpress.c |  2 +-
 xen/arch/arm/setup.c              | 12 +++--
 xen/arch/arm/traps.c              | 52 +++++++++++++++++---
 xen/arch/x86/mm.c                 |  7 +--
 xen/arch/x86/numa.c               |  2 +-
 xen/arch/x86/srat.c               |  5 +-
 xen/common/page_alloc.c           |  7 ++-
 xen/drivers/acpi/osl.c            |  2 +-
 xen/drivers/video/arm_hdlcd.c     |  2 +-
 xen/include/asm-arm/cpregs.h      |  2 -
 xen/include/asm-arm/lpae.h        |  2 +-
 xen/include/asm-arm/mm.h          |  3 +-
 xen/include/asm-arm/page.h        | 99 ++++++++++++++++++++++-----------------
 xen/include/asm-arm/processor.h   | 25 ++++++++--
 xen/include/asm-x86/page.h        |  4 ++
 xen/include/xen/domain_page.h     |  2 +-
 xen/include/xen/mm.h              |  3 +-
 22 files changed, 200 insertions(+), 121 deletions(-)

Comments

Stefano Stabellini Sept. 20, 2017, 12:29 a.m. UTC | #1
On Tue, 12 Sep 2017, Julien Grall wrote:
> Hi all,
> 
> This patch series contains clean-up for the ARM memory subsystem in preparation
> of reworking the page tables handling.
> 
> A branch with the patches can be found on xenbits:
> 
> https://xenbits.xen.org/git-http/people/julieng/xen-unstable.git
> branch mm-cleanup-v2

All patches up to patch #12 are committed. There was a minor suggestion
about adding few simple comments on patch #9, which I did on commit.


> For all the changes see in each patch.
> 
> Cheers,
> 
> Julien Grall (24):
>   xen/x86: mm: Introduce {G,M}FN <-> {G,M}ADDR helpers
>   xen/mm: Use typesafe MFN for alloc_boot_pages return
>   xen/mm: Use __virt_to_mfn in map_domain_page instead of virt_to_mfn
>   xen/arm: mm: Redefine mfn_to_virt to use typesafe
>   xen/arm: hsr_iabt: Document RES0 field
>   xen/arm: traps: Don't define FAR_EL2 for ARM32
>   xen/arm: arm32: Don't define FAR_EL1
>   xen/arm: Add FnV field in hsr_*abt
>   xen/arm: Introduce hsr_xabt to gather common bits between hsr_dabt and
>   xen/arm: traps: Introduce a helper to read the hypersivor fault
>     register
>   xen/arm: traps: Improve logging for data/prefetch abort fault
>   xen/arm: Replace ioremap_attr(PAGE_HYPERVISOR_NOCACHE) call by
>     ioremap_nocache
>   xen/arm: page: Remove unused attributes DEV_NONSHARED and DEV_CACHED
>   xen/arm: page: Use directly BUFFERABLE and drop DEV_WC
>   xen/arm: page: Prefix memory types with MT_
>   xen/arm: page: Use ARMv8 naming to improve readability
>   xen/arm: page: Clean-up the definition of MAIRVAL
>   xen/arm: mm: Rename and clarify AP[1] in the stage-1 page table
>   xen/arm: Switch to SYS_STATE_boot just after end_boot_allocator()
>   xen/arm: mm: Rename 'ai' into 'flags' in create_xen_entries
>   xen/arm: page: Describe the layout of flags used to update page tables
>   xen/arm: mm: Embed permission in the flags
>   xen/arm: mm: Handle permission flags when adding a new mapping
>   xen/arm: mm: Use memory flags for modify_xen_mappings rather than
>     custom one
> 
>  xen/arch/arm/kernel.c             |  2 +-
>  xen/arch/arm/livepatch.c          |  6 +--
>  xen/arch/arm/mm.c                 | 74 +++++++++++++++--------------
>  xen/arch/arm/platforms/exynos5.c  |  2 +-
>  xen/arch/arm/platforms/omap5.c    |  6 +--
>  xen/arch/arm/platforms/vexpress.c |  2 +-
>  xen/arch/arm/setup.c              | 12 +++--
>  xen/arch/arm/traps.c              | 52 +++++++++++++++++---
>  xen/arch/x86/mm.c                 |  7 +--
>  xen/arch/x86/numa.c               |  2 +-
>  xen/arch/x86/srat.c               |  5 +-
>  xen/common/page_alloc.c           |  7 ++-
>  xen/drivers/acpi/osl.c            |  2 +-
>  xen/drivers/video/arm_hdlcd.c     |  2 +-
>  xen/include/asm-arm/cpregs.h      |  2 -
>  xen/include/asm-arm/lpae.h        |  2 +-
>  xen/include/asm-arm/mm.h          |  3 +-
>  xen/include/asm-arm/page.h        | 99 ++++++++++++++++++++++-----------------
>  xen/include/asm-arm/processor.h   | 25 ++++++++--
>  xen/include/asm-x86/page.h        |  4 ++
>  xen/include/xen/domain_page.h     |  2 +-
>  xen/include/xen/mm.h              |  3 +-
>  22 files changed, 200 insertions(+), 121 deletions(-)
> 
> -- 
> 2.11.0
>
Stefano Stabellini Sept. 20, 2017, 9:12 p.m. UTC | #2
On Tue, 19 Sep 2017, Stefano Stabellini wrote:
> On Tue, 12 Sep 2017, Julien Grall wrote:
> > Hi all,
> > 
> > This patch series contains clean-up for the ARM memory subsystem in preparation
> > of reworking the page tables handling.
> > 
> > A branch with the patches can be found on xenbits:
> > 
> > https://xenbits.xen.org/git-http/people/julieng/xen-unstable.git
> > branch mm-cleanup-v2
> 
> All patches up to patch #12 are committed. There was a minor suggestion
> about adding few simple comments on patch #9, which I did on commit.

I committed patches #13, #14 and #15.


> > For all the changes see in each patch.
> > 
> > Cheers,
> > 
> > Julien Grall (24):
> >   xen/x86: mm: Introduce {G,M}FN <-> {G,M}ADDR helpers
> >   xen/mm: Use typesafe MFN for alloc_boot_pages return
> >   xen/mm: Use __virt_to_mfn in map_domain_page instead of virt_to_mfn
> >   xen/arm: mm: Redefine mfn_to_virt to use typesafe
> >   xen/arm: hsr_iabt: Document RES0 field
> >   xen/arm: traps: Don't define FAR_EL2 for ARM32
> >   xen/arm: arm32: Don't define FAR_EL1
> >   xen/arm: Add FnV field in hsr_*abt
> >   xen/arm: Introduce hsr_xabt to gather common bits between hsr_dabt and
> >   xen/arm: traps: Introduce a helper to read the hypersivor fault
> >     register
> >   xen/arm: traps: Improve logging for data/prefetch abort fault
> >   xen/arm: Replace ioremap_attr(PAGE_HYPERVISOR_NOCACHE) call by
> >     ioremap_nocache
> >   xen/arm: page: Remove unused attributes DEV_NONSHARED and DEV_CACHED
> >   xen/arm: page: Use directly BUFFERABLE and drop DEV_WC
> >   xen/arm: page: Prefix memory types with MT_
> >   xen/arm: page: Use ARMv8 naming to improve readability
> >   xen/arm: page: Clean-up the definition of MAIRVAL
> >   xen/arm: mm: Rename and clarify AP[1] in the stage-1 page table
> >   xen/arm: Switch to SYS_STATE_boot just after end_boot_allocator()
> >   xen/arm: mm: Rename 'ai' into 'flags' in create_xen_entries
> >   xen/arm: page: Describe the layout of flags used to update page tables
> >   xen/arm: mm: Embed permission in the flags
> >   xen/arm: mm: Handle permission flags when adding a new mapping
> >   xen/arm: mm: Use memory flags for modify_xen_mappings rather than
> >     custom one
> > 
> >  xen/arch/arm/kernel.c             |  2 +-
> >  xen/arch/arm/livepatch.c          |  6 +--
> >  xen/arch/arm/mm.c                 | 74 +++++++++++++++--------------
> >  xen/arch/arm/platforms/exynos5.c  |  2 +-
> >  xen/arch/arm/platforms/omap5.c    |  6 +--
> >  xen/arch/arm/platforms/vexpress.c |  2 +-
> >  xen/arch/arm/setup.c              | 12 +++--
> >  xen/arch/arm/traps.c              | 52 +++++++++++++++++---
> >  xen/arch/x86/mm.c                 |  7 +--
> >  xen/arch/x86/numa.c               |  2 +-
> >  xen/arch/x86/srat.c               |  5 +-
> >  xen/common/page_alloc.c           |  7 ++-
> >  xen/drivers/acpi/osl.c            |  2 +-
> >  xen/drivers/video/arm_hdlcd.c     |  2 +-
> >  xen/include/asm-arm/cpregs.h      |  2 -
> >  xen/include/asm-arm/lpae.h        |  2 +-
> >  xen/include/asm-arm/mm.h          |  3 +-
> >  xen/include/asm-arm/page.h        | 99 ++++++++++++++++++++++-----------------
> >  xen/include/asm-arm/processor.h   | 25 ++++++++--
> >  xen/include/asm-x86/page.h        |  4 ++
> >  xen/include/xen/domain_page.h     |  2 +-
> >  xen/include/xen/mm.h              |  3 +-
> >  22 files changed, 200 insertions(+), 121 deletions(-)
> > 
> > -- 
> > 2.11.0
> > 
>