[PATCH v4 00/13] xen/arm: Split MMU code as the prepration of MPU work

Henry Wang posted 13 patches 9 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
xen/arch/arm/Kconfig                    |   16 +-
xen/arch/arm/Makefile                   |    1 +
xen/arch/arm/arm32/head.S               |    4 +-
xen/arch/arm/arm64/Makefile             |    2 +-
xen/arch/arm/arm64/head.S               |  497 +------
xen/arch/arm/arm64/mmu/Makefile         |    2 +
xen/arch/arm/arm64/mmu/head.S           |  471 ++++++
xen/arch/arm/arm64/{ => mmu}/mm.c       |   11 +-
xen/arch/arm/arm64/smpboot.c            |    6 +-
xen/arch/arm/include/asm/arm64/macros.h |   36 +
xen/arch/arm/include/asm/arm64/mm.h     |    7 +-
xen/arch/arm/include/asm/config.h       |  132 +-
xen/arch/arm/include/asm/fixmap.h       |    7 +-
xen/arch/arm/include/asm/mm.h           |   28 +-
xen/arch/arm/include/asm/mmu/layout.h   |  146 ++
xen/arch/arm/include/asm/mmu/mm.h       |   55 +
xen/arch/arm/include/asm/mmu/p2m.h      |   18 +
xen/arch/arm/include/asm/p2m.h          |   33 +-
xen/arch/arm/include/asm/page.h         |   15 -
xen/arch/arm/include/asm/setup.h        |    8 +-
xen/arch/arm/kernel.c                   |   27 -
xen/arch/arm/mm.c                       | 1119 --------------
xen/arch/arm/mmu/Makefile               |    3 +
xen/arch/arm/mmu/mm.c                   | 1153 +++++++++++++++
xen/arch/arm/mmu/p2m.c                  | 1610 ++++++++++++++++++++
xen/arch/arm/mmu/setup.c                |  366 +++++
xen/arch/arm/p2m.c                      | 1772 ++---------------------
xen/arch/arm/setup.c                    |  326 +----
xen/arch/arm/smpboot.c                  |    4 +-
xen/arch/arm/xen.lds.S                  |    1 +
xen/drivers/passthrough/Kconfig         |    3 +-
31 files changed, 4064 insertions(+), 3815 deletions(-)
create mode 100644 xen/arch/arm/arm64/mmu/Makefile
create mode 100644 xen/arch/arm/arm64/mmu/head.S
rename xen/arch/arm/arm64/{ => mmu}/mm.c (95%)
create mode 100644 xen/arch/arm/include/asm/mmu/layout.h
create mode 100644 xen/arch/arm/include/asm/mmu/mm.h
create mode 100644 xen/arch/arm/include/asm/mmu/p2m.h
create mode 100644 xen/arch/arm/mmu/Makefile
create mode 100644 xen/arch/arm/mmu/mm.c
create mode 100644 xen/arch/arm/mmu/p2m.c
create mode 100644 xen/arch/arm/mmu/setup.c
[PATCH v4 00/13] xen/arm: Split MMU code as the prepration of MPU work
Posted by Henry Wang 9 months ago
Based on the discussion in the Xen Summit [1], sending this series out after
addressing the comments in v3 [2] as the preparation work to add MPU support.

Mostly code movement, with some of Kconfig and build system (mainly Makefiles)
adjustment. No functional change expected.

[1] https://lore.kernel.org/xen-devel/AS8PR08MB799122F8B0CB841DED64F4819226A@AS8PR08MB7991.eurprd08.prod.outlook.com/
[2] https://lore.kernel.org/xen-devel/20230626033443.2943270-1-Penny.Zheng@arm.com/

Henry Wang (4):
  xen/arm: Introduce 'choice' for memory system architecture
  xen/arm64: Split and move MMU-specific head.S to mmu/head.S
  xen/arm64: Move setup_fixmap() to create_page_tables()
  xen/arm: Extract MMU-specific code

Penny Zheng (6):
  xen/arm: Fold pmap and fixmap into MMU system
  xen/arm: mm: Use generic variable/function names for extendability
  xen/arm: mmu: move MMU-specific setup_mm to mmu/setup.c
  xen/arm: mmu: move MMU specific P2M code to mmu/p2m.{c,h}
  xen/arm: mmu: relocate copy_from_paddr() to setup.c
  xen/arm: mmu: enable SMMU subsystem only in MMU

Wei Chen (3):
  xen/arm64: head.S: Introduce enable_{boot,secondary}_cpu_mm
  xen/arm64: prepare for moving MMU related code from head.S
  xen/arm: Move MMU related definitions from config.h to mmu/layout.h

 xen/arch/arm/Kconfig                    |   16 +-
 xen/arch/arm/Makefile                   |    1 +
 xen/arch/arm/arm32/head.S               |    4 +-
 xen/arch/arm/arm64/Makefile             |    2 +-
 xen/arch/arm/arm64/head.S               |  497 +------
 xen/arch/arm/arm64/mmu/Makefile         |    2 +
 xen/arch/arm/arm64/mmu/head.S           |  471 ++++++
 xen/arch/arm/arm64/{ => mmu}/mm.c       |   11 +-
 xen/arch/arm/arm64/smpboot.c            |    6 +-
 xen/arch/arm/include/asm/arm64/macros.h |   36 +
 xen/arch/arm/include/asm/arm64/mm.h     |    7 +-
 xen/arch/arm/include/asm/config.h       |  132 +-
 xen/arch/arm/include/asm/fixmap.h       |    7 +-
 xen/arch/arm/include/asm/mm.h           |   28 +-
 xen/arch/arm/include/asm/mmu/layout.h   |  146 ++
 xen/arch/arm/include/asm/mmu/mm.h       |   55 +
 xen/arch/arm/include/asm/mmu/p2m.h      |   18 +
 xen/arch/arm/include/asm/p2m.h          |   33 +-
 xen/arch/arm/include/asm/page.h         |   15 -
 xen/arch/arm/include/asm/setup.h        |    8 +-
 xen/arch/arm/kernel.c                   |   27 -
 xen/arch/arm/mm.c                       | 1119 --------------
 xen/arch/arm/mmu/Makefile               |    3 +
 xen/arch/arm/mmu/mm.c                   | 1153 +++++++++++++++
 xen/arch/arm/mmu/p2m.c                  | 1610 ++++++++++++++++++++
 xen/arch/arm/mmu/setup.c                |  366 +++++
 xen/arch/arm/p2m.c                      | 1772 ++---------------------
 xen/arch/arm/setup.c                    |  326 +----
 xen/arch/arm/smpboot.c                  |    4 +-
 xen/arch/arm/xen.lds.S                  |    1 +
 xen/drivers/passthrough/Kconfig         |    3 +-
 31 files changed, 4064 insertions(+), 3815 deletions(-)
 create mode 100644 xen/arch/arm/arm64/mmu/Makefile
 create mode 100644 xen/arch/arm/arm64/mmu/head.S
 rename xen/arch/arm/arm64/{ => mmu}/mm.c (95%)
 create mode 100644 xen/arch/arm/include/asm/mmu/layout.h
 create mode 100644 xen/arch/arm/include/asm/mmu/mm.h
 create mode 100644 xen/arch/arm/include/asm/mmu/p2m.h
 create mode 100644 xen/arch/arm/mmu/Makefile
 create mode 100644 xen/arch/arm/mmu/mm.c
 create mode 100644 xen/arch/arm/mmu/p2m.c
 create mode 100644 xen/arch/arm/mmu/setup.c

-- 
2.25.1
Re: [PATCH v4 00/13] xen/arm: Split MMU code as the prepration of MPU work
Posted by Julien Grall 9 months ago
Hi,

On 01/08/2023 04:44, Henry Wang wrote:
> Based on the discussion in the Xen Summit [1], sending this series out after
> addressing the comments in v3 [2] as the preparation work to add MPU support.
> 
> Mostly code movement, with some of Kconfig and build system (mainly Makefiles)
> adjustment. No functional change expected.

I can't really review this series without knowing how this will 
integrate with the rest of the MPU work. Can you at least provide a tree 
with all the patches applied (including the MPU one)?

Cheers,

-- 
Julien Grall
RE: [PATCH v4 00/13] xen/arm: Split MMU code as the prepration of MPU work
Posted by Henry Wang 8 months, 4 weeks ago
Hi Julien,

Thanks for your prompt response and your time on the review!

> -----Original Message-----
> From: Julien Grall <julien@xen.org>
> Subject: Re: [PATCH v4 00/13] xen/arm: Split MMU code as the prepration of
> MPU work
> 
> Hi,
> 
> On 01/08/2023 04:44, Henry Wang wrote:
> > Based on the discussion in the Xen Summit [1], sending this series out after
> > addressing the comments in v3 [2] as the preparation work to add MPU
> support.
> >
> > Mostly code movement, with some of Kconfig and build system (mainly
> Makefiles)
> > adjustment. No functional change expected.
> 
> I can't really review this series without knowing how this will
> integrate with the rest of the MPU work. 

Sorry about it, I should have asked before sending the series.

> Can you at least provide a tree
> with all the patches applied (including the MPU one)?

See [1] for the full single core MPU implementation which I've verified
locally about the MMU and MPU single core Linux boot on FVP, and
looks like Gitlab is also not complaining [2].

Note that I've addressed comments from you and Ayan in v3 about the
MMU/MPU helpers duplication and the arm32/arm64 split work. I didn't
address the comment in [3] about the RES0 stuff, but I think this is not
related to the MMU split series I sent yesterday to mailing list and the
formal v4 MPU work sent to the mailing list will contain the fix for this
comment.

[1] https://gitlab.com/xen-project/people/henryw/xen/-/commits/mpu_v4
[2] https://gitlab.com/xen-project/people/henryw/xen/-/pipelines/952742025
[3] https://patchwork.kernel.org/project/xen-devel/patch/20230626033443.2943270-32-Penny.Zheng@arm.com/

Kind regards,
Henry

> 
> Cheers,
> 
> --
> Julien Grall
Re: [PATCH v4 00/13] xen/arm: Split MMU code as the prepration of MPU work
Posted by Julien Grall 8 months, 3 weeks ago
On 02/08/2023 04:59, Henry Wang wrote:
> Hi Julien,

Hi Henry,

-----Original Message-----
>> From: Julien Grall <julien@xen.org>
>> Subject: Re: [PATCH v4 00/13] xen/arm: Split MMU code as the prepration of
>> MPU work
>>
>> Hi,
>>
>> On 01/08/2023 04:44, Henry Wang wrote:
>>> Based on the discussion in the Xen Summit [1], sending this series out after
>>> addressing the comments in v3 [2] as the preparation work to add MPU
>> support.
>>>
>>> Mostly code movement, with some of Kconfig and build system (mainly
>> Makefiles)
>>> adjustment. No functional change expected.
>>
>> I can't really review this series without knowing how this will
>> integrate with the rest of the MPU work.
> 
> Sorry about it, I should have asked before sending the series.
> 
>> Can you at least provide a tree
>> with all the patches applied (including the MPU one)?
> 
> See [1] for the full single core MPU implementation which I've verified
> locally about the MMU and MPU single core Linux boot on FVP, and
> looks like Gitlab is also not complaining [2].

Thanks for the link!

> 
> Note that I've addressed comments from you and Ayan in v3 about the
> MMU/MPU helpers duplication and the arm32/arm64 split work. I didn't
> address the comment in [3] about the RES0 stuff, but I think this is not
> related to the MMU split series I sent yesterday to mailing list and the
> formal v4 MPU work sent to the mailing list will contain the fix for this
> comment.

Agree, the RES0 bit is MPU specific.

Cheers,

-- 
Julien Grall