Re: [PATCH] LoongArch: Load vmlinux.efi to the link address

2023-12-02 Thread Simon Horman
On Sat, Dec 02, 2023 at 10:03:29PM +0800, Huacai Chen wrote:
> On Sat, Dec 2, 2023 at 8:46 PM Simon Horman  wrote:
> >
> > On Sat, Dec 02, 2023 at 08:30:27PM +0800, Huacai Chen wrote:
> > > On Sat, Dec 2, 2023 at 6:11 PM WANG Rui  wrote:
> > > >
> > > > > On Fri, Nov 24, 2023 at 11:46:58PM +0800, WANG Rui wrote:
> > > > > > Currently, kexec loads vmlinux.efi to address 0 instead of the link
> > > > > > address. This causes kexec to fail to boot the new vmlinux.efi on 
> > > > > > qemu.
> > > > > >
> > > > > >   pei_loongarch_load: kernel_segment: 
> > > > > >   pei_loongarch_load: kernel_entry:   015dc000
> > > > > >   pei_loongarch_load: image_size: 01f3
> > > > > >   pei_loongarch_load: text_offset:0020
> > > > > >   pei_loongarch_load: phys_offset:
> > > > > >   pei_loongarch_load: PE format:  yes
> > > > > >   loongarch_load_other_segments:333: command_line: kexec 
> > > > > > console=ttyS0,115200
> > > > > >   kexec_load: entry = 0x15dc000 flags = 0x102
> > > > > >   nr_segments = 2
> > > > > >   segment[0].buf   = 0x7fffef664010
> > > > > >   segment[0].bufsz = 0x1de9a00
> > > > > >   segment[0].mem   = (nil)
> > > > > >   segment[0].memsz = 0x1f3
> > > > > >   segment[1].buf   = 0x55e480b0
> > > > > >   segment[1].bufsz = 0x200
> > > > > >   segment[1].mem   = 0x1f3
> > > > > >   segment[1].memsz = 0x4000
> > > > > >
> > > > > > This patch adds `text_offset` when adding kernel segment to load
> > > > > > vmlinux.efi to the link address.
> > > > > >
> > > > > >   pei_loongarch_load: kernel_segment: 
> > > > > >   pei_loongarch_load: kernel_entry:   015dc000
> > > > > >   pei_loongarch_load: image_size: 01f3
> > > > > >   pei_loongarch_load: text_offset:0020
> > > > > >   pei_loongarch_load: phys_offset:
> > > > > >   pei_loongarch_load: PE format:  yes
> > > > > >   loongarch_load_other_segments:335: command_line: kexec 
> > > > > > console=ttyS0,115200
> > > > > >   kexec_load: entry = 0x15dc000 flags = 0x102
> > > > > >   nr_segments = 2
> > > > > >   segment[0].buf   = 0x71a04010
> > > > > >   segment[0].bufsz = 0x1de9a00
> > > > > >   segment[0].mem   = 0x20
> > > > > >   segment[0].memsz = 0x1f3
> > > > > >   segment[1].buf   = 0x55b28098
> > > > > >   segment[1].bufsz = 0x200
> > > > > >   segment[1].mem   = 0x213
> > > > > >   segment[1].memsz = 0x4000
> > > > > >
> > > > > > Signed-off-by: WANG Rui 
> > > > >
> > > > > Thanks, applied.
> > > >
> > > > Hi Simon,
> > > >
> > > > The patch v1 breaks the real machine. Could you please revert it and 
> > > > just keep v2? Thanks.
> > > Hmmm, if possible, I suggest resetting the old commit before v1 and
> > > only apply v2... The current status makes the history very very
> > > confusing.
> >
> > Thanks, I would rather not drop patches from the tree as it changes
> > the hashes of the tree from that point. However, in this case, I agree
> > that a simple revert makes things confusing, so I have done as you suggest
> > - v1 has been dropped from the tree.
> >
> > Can you please check that the tree as of the following commit, which is
> > now the HEAD commit of the main branch, is correct?
> >
> > 549466430ae6 ("LoongArch: Load vmlinux.efi to the link address")
> Thank you, it is perfect now.

Thanks for bringing this to my attention and thanks for checking.

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


Re: [PATCH] LoongArch: Load vmlinux.efi to the link address

2023-12-02 Thread Huacai Chen
On Sat, Dec 2, 2023 at 8:46 PM Simon Horman  wrote:
>
> On Sat, Dec 02, 2023 at 08:30:27PM +0800, Huacai Chen wrote:
> > On Sat, Dec 2, 2023 at 6:11 PM WANG Rui  wrote:
> > >
> > > > On Fri, Nov 24, 2023 at 11:46:58PM +0800, WANG Rui wrote:
> > > > > Currently, kexec loads vmlinux.efi to address 0 instead of the link
> > > > > address. This causes kexec to fail to boot the new vmlinux.efi on 
> > > > > qemu.
> > > > >
> > > > >   pei_loongarch_load: kernel_segment: 
> > > > >   pei_loongarch_load: kernel_entry:   015dc000
> > > > >   pei_loongarch_load: image_size: 01f3
> > > > >   pei_loongarch_load: text_offset:0020
> > > > >   pei_loongarch_load: phys_offset:
> > > > >   pei_loongarch_load: PE format:  yes
> > > > >   loongarch_load_other_segments:333: command_line: kexec 
> > > > > console=ttyS0,115200
> > > > >   kexec_load: entry = 0x15dc000 flags = 0x102
> > > > >   nr_segments = 2
> > > > >   segment[0].buf   = 0x7fffef664010
> > > > >   segment[0].bufsz = 0x1de9a00
> > > > >   segment[0].mem   = (nil)
> > > > >   segment[0].memsz = 0x1f3
> > > > >   segment[1].buf   = 0x55e480b0
> > > > >   segment[1].bufsz = 0x200
> > > > >   segment[1].mem   = 0x1f3
> > > > >   segment[1].memsz = 0x4000
> > > > >
> > > > > This patch adds `text_offset` when adding kernel segment to load
> > > > > vmlinux.efi to the link address.
> > > > >
> > > > >   pei_loongarch_load: kernel_segment: 
> > > > >   pei_loongarch_load: kernel_entry:   015dc000
> > > > >   pei_loongarch_load: image_size: 01f3
> > > > >   pei_loongarch_load: text_offset:0020
> > > > >   pei_loongarch_load: phys_offset:
> > > > >   pei_loongarch_load: PE format:  yes
> > > > >   loongarch_load_other_segments:335: command_line: kexec 
> > > > > console=ttyS0,115200
> > > > >   kexec_load: entry = 0x15dc000 flags = 0x102
> > > > >   nr_segments = 2
> > > > >   segment[0].buf   = 0x71a04010
> > > > >   segment[0].bufsz = 0x1de9a00
> > > > >   segment[0].mem   = 0x20
> > > > >   segment[0].memsz = 0x1f3
> > > > >   segment[1].buf   = 0x55b28098
> > > > >   segment[1].bufsz = 0x200
> > > > >   segment[1].mem   = 0x213
> > > > >   segment[1].memsz = 0x4000
> > > > >
> > > > > Signed-off-by: WANG Rui 
> > > >
> > > > Thanks, applied.
> > >
> > > Hi Simon,
> > >
> > > The patch v1 breaks the real machine. Could you please revert it and just 
> > > keep v2? Thanks.
> > Hmmm, if possible, I suggest resetting the old commit before v1 and
> > only apply v2... The current status makes the history very very
> > confusing.
>
> Thanks, I would rather not drop patches from the tree as it changes
> the hashes of the tree from that point. However, in this case, I agree
> that a simple revert makes things confusing, so I have done as you suggest
> - v1 has been dropped from the tree.
>
> Can you please check that the tree as of the following commit, which is
> now the HEAD commit of the main branch, is correct?
>
> 549466430ae6 ("LoongArch: Load vmlinux.efi to the link address")
Thank you, it is perfect now.

Huacai

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


Re: [PATCH] LoongArch: Load vmlinux.efi to the link address

2023-12-02 Thread Simon Horman
On Sat, Dec 02, 2023 at 08:30:27PM +0800, Huacai Chen wrote:
> On Sat, Dec 2, 2023 at 6:11 PM WANG Rui  wrote:
> >
> > > On Fri, Nov 24, 2023 at 11:46:58PM +0800, WANG Rui wrote:
> > > > Currently, kexec loads vmlinux.efi to address 0 instead of the link
> > > > address. This causes kexec to fail to boot the new vmlinux.efi on qemu.
> > > >
> > > >   pei_loongarch_load: kernel_segment: 
> > > >   pei_loongarch_load: kernel_entry:   015dc000
> > > >   pei_loongarch_load: image_size: 01f3
> > > >   pei_loongarch_load: text_offset:0020
> > > >   pei_loongarch_load: phys_offset:
> > > >   pei_loongarch_load: PE format:  yes
> > > >   loongarch_load_other_segments:333: command_line: kexec 
> > > > console=ttyS0,115200
> > > >   kexec_load: entry = 0x15dc000 flags = 0x102
> > > >   nr_segments = 2
> > > >   segment[0].buf   = 0x7fffef664010
> > > >   segment[0].bufsz = 0x1de9a00
> > > >   segment[0].mem   = (nil)
> > > >   segment[0].memsz = 0x1f3
> > > >   segment[1].buf   = 0x55e480b0
> > > >   segment[1].bufsz = 0x200
> > > >   segment[1].mem   = 0x1f3
> > > >   segment[1].memsz = 0x4000
> > > >
> > > > This patch adds `text_offset` when adding kernel segment to load
> > > > vmlinux.efi to the link address.
> > > >
> > > >   pei_loongarch_load: kernel_segment: 
> > > >   pei_loongarch_load: kernel_entry:   015dc000
> > > >   pei_loongarch_load: image_size: 01f3
> > > >   pei_loongarch_load: text_offset:0020
> > > >   pei_loongarch_load: phys_offset:
> > > >   pei_loongarch_load: PE format:  yes
> > > >   loongarch_load_other_segments:335: command_line: kexec 
> > > > console=ttyS0,115200
> > > >   kexec_load: entry = 0x15dc000 flags = 0x102
> > > >   nr_segments = 2
> > > >   segment[0].buf   = 0x71a04010
> > > >   segment[0].bufsz = 0x1de9a00
> > > >   segment[0].mem   = 0x20
> > > >   segment[0].memsz = 0x1f3
> > > >   segment[1].buf   = 0x55b28098
> > > >   segment[1].bufsz = 0x200
> > > >   segment[1].mem   = 0x213
> > > >   segment[1].memsz = 0x4000
> > > >
> > > > Signed-off-by: WANG Rui 
> > >
> > > Thanks, applied.
> >
> > Hi Simon,
> >
> > The patch v1 breaks the real machine. Could you please revert it and just 
> > keep v2? Thanks.
> Hmmm, if possible, I suggest resetting the old commit before v1 and
> only apply v2... The current status makes the history very very
> confusing.

Thanks, I would rather not drop patches from the tree as it changes
the hashes of the tree from that point. However, in this case, I agree
that a simple revert makes things confusing, so I have done as you suggest
- v1 has been dropped from the tree.

Can you please check that the tree as of the following commit, which is
now the HEAD commit of the main branch, is correct?

549466430ae6 ("LoongArch: Load vmlinux.efi to the link address")

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


Re: [PATCH] LoongArch: Load vmlinux.efi to the link address

2023-12-02 Thread Huacai Chen
On Sat, Dec 2, 2023 at 6:11 PM WANG Rui  wrote:
>
> > On Fri, Nov 24, 2023 at 11:46:58PM +0800, WANG Rui wrote:
> > > Currently, kexec loads vmlinux.efi to address 0 instead of the link
> > > address. This causes kexec to fail to boot the new vmlinux.efi on qemu.
> > >
> > >   pei_loongarch_load: kernel_segment: 
> > >   pei_loongarch_load: kernel_entry:   015dc000
> > >   pei_loongarch_load: image_size: 01f3
> > >   pei_loongarch_load: text_offset:0020
> > >   pei_loongarch_load: phys_offset:
> > >   pei_loongarch_load: PE format:  yes
> > >   loongarch_load_other_segments:333: command_line: kexec 
> > > console=ttyS0,115200
> > >   kexec_load: entry = 0x15dc000 flags = 0x102
> > >   nr_segments = 2
> > >   segment[0].buf   = 0x7fffef664010
> > >   segment[0].bufsz = 0x1de9a00
> > >   segment[0].mem   = (nil)
> > >   segment[0].memsz = 0x1f3
> > >   segment[1].buf   = 0x55e480b0
> > >   segment[1].bufsz = 0x200
> > >   segment[1].mem   = 0x1f3
> > >   segment[1].memsz = 0x4000
> > >
> > > This patch adds `text_offset` when adding kernel segment to load
> > > vmlinux.efi to the link address.
> > >
> > >   pei_loongarch_load: kernel_segment: 
> > >   pei_loongarch_load: kernel_entry:   015dc000
> > >   pei_loongarch_load: image_size: 01f3
> > >   pei_loongarch_load: text_offset:0020
> > >   pei_loongarch_load: phys_offset:
> > >   pei_loongarch_load: PE format:  yes
> > >   loongarch_load_other_segments:335: command_line: kexec 
> > > console=ttyS0,115200
> > >   kexec_load: entry = 0x15dc000 flags = 0x102
> > >   nr_segments = 2
> > >   segment[0].buf   = 0x71a04010
> > >   segment[0].bufsz = 0x1de9a00
> > >   segment[0].mem   = 0x20
> > >   segment[0].memsz = 0x1f3
> > >   segment[1].buf   = 0x55b28098
> > >   segment[1].bufsz = 0x200
> > >   segment[1].mem   = 0x213
> > >   segment[1].memsz = 0x4000
> > >
> > > Signed-off-by: WANG Rui 
> >
> > Thanks, applied.
>
> Hi Simon,
>
> The patch v1 breaks the real machine. Could you please revert it and just 
> keep v2? Thanks.
Hmmm, if possible, I suggest resetting the old commit before v1 and
only apply v2... The current status makes the history very very
confusing.

Huacai

>
> - Rui
>

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


Re: [PATCH] LoongArch: Load vmlinux.efi to the link address

2023-12-02 Thread WANG Rui
> On Fri, Nov 24, 2023 at 11:46:58PM +0800, WANG Rui wrote:
> > Currently, kexec loads vmlinux.efi to address 0 instead of the link
> > address. This causes kexec to fail to boot the new vmlinux.efi on qemu.
> > 
> >   pei_loongarch_load: kernel_segment: 
> >   pei_loongarch_load: kernel_entry:   015dc000
> >   pei_loongarch_load: image_size: 01f3
> >   pei_loongarch_load: text_offset:0020
> >   pei_loongarch_load: phys_offset:
> >   pei_loongarch_load: PE format:  yes
> >   loongarch_load_other_segments:333: command_line: kexec 
> > console=ttyS0,115200
> >   kexec_load: entry = 0x15dc000 flags = 0x102
> >   nr_segments = 2
> >   segment[0].buf   = 0x7fffef664010
> >   segment[0].bufsz = 0x1de9a00
> >   segment[0].mem   = (nil)
> >   segment[0].memsz = 0x1f3
> >   segment[1].buf   = 0x55e480b0
> >   segment[1].bufsz = 0x200
> >   segment[1].mem   = 0x1f3
> >   segment[1].memsz = 0x4000
> > 
> > This patch adds `text_offset` when adding kernel segment to load
> > vmlinux.efi to the link address.
> > 
> >   pei_loongarch_load: kernel_segment: 
> >   pei_loongarch_load: kernel_entry:   015dc000
> >   pei_loongarch_load: image_size: 01f3
> >   pei_loongarch_load: text_offset:0020
> >   pei_loongarch_load: phys_offset:
> >   pei_loongarch_load: PE format:  yes
> >   loongarch_load_other_segments:335: command_line: kexec 
> > console=ttyS0,115200
> >   kexec_load: entry = 0x15dc000 flags = 0x102
> >   nr_segments = 2
> >   segment[0].buf   = 0x71a04010
> >   segment[0].bufsz = 0x1de9a00
> >   segment[0].mem   = 0x20
> >   segment[0].memsz = 0x1f3
> >   segment[1].buf   = 0x55b28098
> >   segment[1].bufsz = 0x200
> >   segment[1].mem   = 0x213
> >   segment[1].memsz = 0x4000
> > 
> > Signed-off-by: WANG Rui 
> 
> Thanks, applied.

Hi Simon,

The patch v1 breaks the real machine. Could you please revert it and just keep 
v2? Thanks.

- Rui


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