Re: [PATCH 0/7] Kexec-tools: Improve RISC-V port

2024-05-18 Thread Simon Horman
On Sat, May 18, 2024 at 11:39:18AM +0800, Dave Young wrote:
> On Wed, 11 Oct 2023 at 13:24, Song Shuai  wrote:
> >
> >
> >
> > 在 2023/9/20 19:56, Simon Horman 写道:
> > > On Fri, Sep 15, 2023 at 11:50:06AM +0800, Song Shuai wrote:
> > >> Hi,
> > >>
> > >> This series is created to improve RISC-V port of kexec-tools,
> > >> and is based on the horms/kexec-tools:build-test-riscv-v2 branch.
> > >
> > > In my mind the big question is how to move RISC-V support
> > > from that branch, to being merged into main.
> > >
> > > IIRC there were some issues that needed to be addressed.
> > > Perhaps they are all addressed by this series, and with
> > > some appropriate squashing we can move forwards with a series
> > > based on main?
> >
> > Hi, Simon and Nick:
> >
> > I squashed the first four patches as a "RISC-V: Some fixes for riscv
> > port" patch and then took the horms/main as the base to collect the 2
> > patches from horms/build-test-riscv-v2 branch and this series togother.
> > These are the Github link and all commits for RISC-V.
> >
> > https://github.com/sugarfillet/kexec-tools/commits/main_rv
> >
> > 5dc133e RISC-V: Support loading Image binary file
> > b042f6d RISC-V: Separate elf_riscv_find_pbase out
> > 8f344c7 RISC-V: Enable kexec_file_load syscall
> > 7d4b982 RISC-V: Some fixes for riscv port
> > 3205c1c local: RISC-V: distribute purgatory/riscv/Makefile
> > 54f9daf RISC-V: Add support for riscv kexec/kdump on kexec-tools
> >
> > Since I didn't found the issues/fixes as Nick mentioned with these
> > commits, I prefer to merge them into horms/main and let more kexec/kdump
> > users to help improve/fixup RISC-V port.
> 
> Hi,  I noticed another pr for Fedora kexec-tools:
> https://src.fedoraproject.org/rpms/kexec-tools/pull-request/24
> 
> It is bad to take it as Fedora only,   I would suggest posting all the
> refreshed patches together here again for review.
> 
> If no enough reviewers can review them my another suggestion is to
> drop the kexec_load support code for the time being, and only enable
> the kexec_file_load support code in kexec-tools, and I assume below
> kernel commit make the kexec_file_load kernel piece of work done.
> Then it will be easier to review and make something working at least.
> commit 6261586e0c91db14c34f894f4bc48f2300cff1d4
> Author: Liao Chang 
> Date:   Fri Apr 8 18:09:11 2022 +0800
> 
> RISC-V: Add kexec_file support

Hi,

I would gladly take a patchset for kexec-tools that adds RISC-V support in
a coherent manner.


___
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec


Re: [PATCH 0/7] Kexec-tools: Improve RISC-V port

2024-05-17 Thread Dave Young
On Wed, 11 Oct 2023 at 13:24, Song Shuai  wrote:
>
>
>
> 在 2023/9/20 19:56, Simon Horman 写道:
> > On Fri, Sep 15, 2023 at 11:50:06AM +0800, Song Shuai wrote:
> >> Hi,
> >>
> >> This series is created to improve RISC-V port of kexec-tools,
> >> and is based on the horms/kexec-tools:build-test-riscv-v2 branch.
> >
> > In my mind the big question is how to move RISC-V support
> > from that branch, to being merged into main.
> >
> > IIRC there were some issues that needed to be addressed.
> > Perhaps they are all addressed by this series, and with
> > some appropriate squashing we can move forwards with a series
> > based on main?
>
> Hi, Simon and Nick:
>
> I squashed the first four patches as a "RISC-V: Some fixes for riscv
> port" patch and then took the horms/main as the base to collect the 2
> patches from horms/build-test-riscv-v2 branch and this series togother.
> These are the Github link and all commits for RISC-V.
>
> https://github.com/sugarfillet/kexec-tools/commits/main_rv
>
> 5dc133e RISC-V: Support loading Image binary file
> b042f6d RISC-V: Separate elf_riscv_find_pbase out
> 8f344c7 RISC-V: Enable kexec_file_load syscall
> 7d4b982 RISC-V: Some fixes for riscv port
> 3205c1c local: RISC-V: distribute purgatory/riscv/Makefile
> 54f9daf RISC-V: Add support for riscv kexec/kdump on kexec-tools
>
> Since I didn't found the issues/fixes as Nick mentioned with these
> commits, I prefer to merge them into horms/main and let more kexec/kdump
> users to help improve/fixup RISC-V port.

Hi,  I noticed another pr for Fedora kexec-tools:
https://src.fedoraproject.org/rpms/kexec-tools/pull-request/24

It is bad to take it as Fedora only,   I would suggest posting all the
refreshed patches together here again for review.

If no enough reviewers can review them my another suggestion is to
drop the kexec_load support code for the time being, and only enable
the kexec_file_load support code in kexec-tools, and I assume below
kernel commit make the kexec_file_load kernel piece of work done.
Then it will be easier to review and make something working at least.
commit 6261586e0c91db14c34f894f4bc48f2300cff1d4
Author: Liao Chang 
Date:   Fri Apr 8 18:09:11 2022 +0800

RISC-V: Add kexec_file support

Thanks
Dave


___
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec


Re: [PATCH 0/7] Kexec-tools: Improve RISC-V port

2023-10-10 Thread Song Shuai



在 2023/9/20 19:56, Simon Horman 写道:

On Fri, Sep 15, 2023 at 11:50:06AM +0800, Song Shuai wrote:

Hi,

This series is created to improve RISC-V port of kexec-tools,
and is based on the horms/kexec-tools:build-test-riscv-v2 branch.


In my mind the big question is how to move RISC-V support
from that branch, to being merged into main.

IIRC there were some issues that needed to be addressed.
Perhaps they are all addressed by this series, and with
some appropriate squashing we can move forwards with a series
based on main?


Hi, Simon and Nick:

I squashed the first four patches as a "RISC-V: Some fixes for riscv 
port" patch and then took the horms/main as the base to collect the 2 
patches from horms/build-test-riscv-v2 branch and this series togother. 
These are the Github link and all commits for RISC-V.


https://github.com/sugarfillet/kexec-tools/commits/main_rv

5dc133e RISC-V: Support loading Image binary file
b042f6d RISC-V: Separate elf_riscv_find_pbase out
8f344c7 RISC-V: Enable kexec_file_load syscall
7d4b982 RISC-V: Some fixes for riscv port
3205c1c local: RISC-V: distribute purgatory/riscv/Makefile
54f9daf RISC-V: Add support for riscv kexec/kdump on kexec-tools

Since I didn't found the issues/fixes as Nick mentioned with these 
commits, I prefer to merge them into horms/main and let more kexec/kdump 
users to help improve/fixup RISC-V port.


I would like to listen to your advice.





For your convenience, here is my Github branch for kexec-tools:
https://github.com/sugarfillet/kexec-tools/commits/rv-Image

The first four patches fixes some build or runtime issues:

   RISC-V: Use linux,usable-memory-range for crash kernel
   RISC-V: Fix the undeclared ‘EM_RISCV’ build failure
   RISC-V: Get memory ranges from iomem
   RISC-V: Correct the usage of command line option

The last three patches enable the kexec_file_load syscall to load
vmlinux and support loading Image binary file for two syscalls.

   RISC-V: Enable kexe_file_load
   RISC-V: Separate elf_riscv_find_pbase out
   RISC-V: Support loading Image binary file

Note that:

RISC-V Linux kexec_load_file's support for Image file has been sent out but not 
merged [1].

[1]: 
https://lore.kernel.org/linux-riscv/20230914020044.1397356-1-songshuaish...@tinylab.org/T/#t

Li Zhengyu (1):
   RISC-V: Enable kexe_file_load

Song Shuai (6):
   RISC-V: Use linux,usable-memory-range for crash kernel
   RISC-V: Fix the undeclared ‘EM_RISCV’ build failure
   RISC-V: Get memory ranges from iomem
   RISC-V: Correct the usage of command line option
   RISC-V: Separate elf_riscv_find_pbase out
   RISC-V: Support loading Image binary file

  kexec/arch/riscv/Makefile|   2 +
  kexec/arch/riscv/crashdump-riscv.c   |   2 +-
  kexec/arch/riscv/image-header.h  |  88 ++
  kexec/arch/riscv/iomem.h |  10 ++
  kexec/arch/riscv/kexec-elf-riscv.c   |  77 +---
  kexec/arch/riscv/kexec-image-riscv.c |  95 +++
  kexec/arch/riscv/kexec-riscv.c   | 176 ++-
  kexec/arch/riscv/kexec-riscv.h   |  21 
  kexec/kexec-syscall.h|   3 +
  9 files changed, 368 insertions(+), 106 deletions(-)
  create mode 100644 kexec/arch/riscv/image-header.h
  create mode 100644 kexec/arch/riscv/iomem.h
  create mode 100644 kexec/arch/riscv/kexec-image-riscv.c

--
2.20.1





--
Thanks
Song Shuai

___
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec


Re: [PATCH 0/7] Kexec-tools: Improve RISC-V port

2023-09-20 Thread Nick Kossifidis

On 9/15/23 06:50, Song Shuai wrote:

Hi,

This series is created to improve RISC-V port of kexec-tools,
and is based on the horms/kexec-tools:build-test-riscv-v2 branch.

For your convenience, here is my Github branch for kexec-tools:
https://github.com/sugarfillet/kexec-tools/commits/rv-Image

The first four patches fixes some build or runtime issues:

   RISC-V: Use linux,usable-memory-range for crash kernel
   RISC-V: Fix the undeclared ‘EM_RISCV’ build failure
   RISC-V: Get memory ranges from iomem
   RISC-V: Correct the usage of command line option

The last three patches enable the kexec_file_load syscall to load
vmlinux and support loading Image binary file for two syscalls.

   RISC-V: Enable kexe_file_load
   RISC-V: Separate elf_riscv_find_pbase out
   RISC-V: Support loading Image binary file



A few years back I did the initial work for kexec on riscv, and the idea 
was to work on the kexec-tools repo on riscv github:


https://github.com/riscv-collab/kexec-tools/tree/riscv

and then when we have something in a good shape, to push our work 
upstream. People keep sending patches to the kexec mailing list (the 
riscv port of kexec-tools is not upstream so this patch series won't 
apply), instead of pull requests to the above repo.


You have an X set of updates, some other people have posted another set 
of fixes (e.g. I rememver a fix for initramfs/initrd), please let's work 
on the github repo, get something that looks ok and then push our work 
upstream. If you want access to the github repo instead of doing pull 
requests etc let me know.


I'm sorry I didn't have the time to work on this further.

Regards,
Nick

___
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec


Re: [PATCH 0/7] Kexec-tools: Improve RISC-V port

2023-09-20 Thread Simon Horman
On Fri, Sep 15, 2023 at 11:50:06AM +0800, Song Shuai wrote:
> Hi,
> 
> This series is created to improve RISC-V port of kexec-tools,
> and is based on the horms/kexec-tools:build-test-riscv-v2 branch.

In my mind the big question is how to move RISC-V support
from that branch, to being merged into main.

IIRC there were some issues that needed to be addressed.
Perhaps they are all addressed by this series, and with
some appropriate squashing we can move forwards with a series
based on main?

> 
> For your convenience, here is my Github branch for kexec-tools:
> https://github.com/sugarfillet/kexec-tools/commits/rv-Image
> 
> The first four patches fixes some build or runtime issues:  
> 
>   RISC-V: Use linux,usable-memory-range for crash kernel
>   RISC-V: Fix the undeclared ‘EM_RISCV’ build failure
>   RISC-V: Get memory ranges from iomem
>   RISC-V: Correct the usage of command line option
> 
> The last three patches enable the kexec_file_load syscall to load
> vmlinux and support loading Image binary file for two syscalls.
> 
>   RISC-V: Enable kexe_file_load
>   RISC-V: Separate elf_riscv_find_pbase out
>   RISC-V: Support loading Image binary file
> 
> Note that: 
> 
> RISC-V Linux kexec_load_file's support for Image file has been sent out but 
> not merged [1].
> 
> [1]: 
> https://lore.kernel.org/linux-riscv/20230914020044.1397356-1-songshuaish...@tinylab.org/T/#t
>  
> 
> Li Zhengyu (1):
>   RISC-V: Enable kexe_file_load
> 
> Song Shuai (6):
>   RISC-V: Use linux,usable-memory-range for crash kernel
>   RISC-V: Fix the undeclared ‘EM_RISCV’ build failure
>   RISC-V: Get memory ranges from iomem
>   RISC-V: Correct the usage of command line option
>   RISC-V: Separate elf_riscv_find_pbase out
>   RISC-V: Support loading Image binary file
> 
>  kexec/arch/riscv/Makefile|   2 +
>  kexec/arch/riscv/crashdump-riscv.c   |   2 +-
>  kexec/arch/riscv/image-header.h  |  88 ++
>  kexec/arch/riscv/iomem.h |  10 ++
>  kexec/arch/riscv/kexec-elf-riscv.c   |  77 +---
>  kexec/arch/riscv/kexec-image-riscv.c |  95 +++
>  kexec/arch/riscv/kexec-riscv.c   | 176 ++-
>  kexec/arch/riscv/kexec-riscv.h   |  21 
>  kexec/kexec-syscall.h|   3 +
>  9 files changed, 368 insertions(+), 106 deletions(-)
>  create mode 100644 kexec/arch/riscv/image-header.h
>  create mode 100644 kexec/arch/riscv/iomem.h
>  create mode 100644 kexec/arch/riscv/kexec-image-riscv.c
> 
> -- 
> 2.20.1
> 

___
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec


[PATCH 0/7] Kexec-tools: Improve RISC-V port

2023-09-14 Thread Song Shuai
Hi,

This series is created to improve RISC-V port of kexec-tools,
and is based on the horms/kexec-tools:build-test-riscv-v2 branch.

For your convenience, here is my Github branch for kexec-tools:
https://github.com/sugarfillet/kexec-tools/commits/rv-Image

The first four patches fixes some build or runtime issues:  

  RISC-V: Use linux,usable-memory-range for crash kernel
  RISC-V: Fix the undeclared ‘EM_RISCV’ build failure
  RISC-V: Get memory ranges from iomem
  RISC-V: Correct the usage of command line option

The last three patches enable the kexec_file_load syscall to load
vmlinux and support loading Image binary file for two syscalls.

  RISC-V: Enable kexe_file_load
  RISC-V: Separate elf_riscv_find_pbase out
  RISC-V: Support loading Image binary file

Note that: 

RISC-V Linux kexec_load_file's support for Image file has been sent out but not 
merged [1].

[1]: 
https://lore.kernel.org/linux-riscv/20230914020044.1397356-1-songshuaish...@tinylab.org/T/#t
 

Li Zhengyu (1):
  RISC-V: Enable kexe_file_load

Song Shuai (6):
  RISC-V: Use linux,usable-memory-range for crash kernel
  RISC-V: Fix the undeclared ‘EM_RISCV’ build failure
  RISC-V: Get memory ranges from iomem
  RISC-V: Correct the usage of command line option
  RISC-V: Separate elf_riscv_find_pbase out
  RISC-V: Support loading Image binary file

 kexec/arch/riscv/Makefile|   2 +
 kexec/arch/riscv/crashdump-riscv.c   |   2 +-
 kexec/arch/riscv/image-header.h  |  88 ++
 kexec/arch/riscv/iomem.h |  10 ++
 kexec/arch/riscv/kexec-elf-riscv.c   |  77 +---
 kexec/arch/riscv/kexec-image-riscv.c |  95 +++
 kexec/arch/riscv/kexec-riscv.c   | 176 ++-
 kexec/arch/riscv/kexec-riscv.h   |  21 
 kexec/kexec-syscall.h|   3 +
 9 files changed, 368 insertions(+), 106 deletions(-)
 create mode 100644 kexec/arch/riscv/image-header.h
 create mode 100644 kexec/arch/riscv/iomem.h
 create mode 100644 kexec/arch/riscv/kexec-image-riscv.c

-- 
2.20.1


___
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec