Message ID | cover.1466702804.git.geoff@infradead.org |
---|---|
State | New |
Headers | show |
Hi On 23/06/16 18:54, Geoff Levand wrote: > From: James Morse <james.morse@arm.com> > > Hibernate relies on cpu hotplug to prevent secondary cores executing > the kernel text while it is being restored. > > Add a call to cpus_are_stuck_in_kernel() to determine if there are > CPUs not counted by 'num_online_cpus()', and prevent hibernate in this > case. > > Fixes: 82869ac57b5 ("arm64: kernel: Add support for hibernate/suspend-to-disk") > Signed-off-by: James Morse <james.morse@arm.com> > --- > arch/arm64/kernel/hibernate.c | 6 ++++++ > 1 file changed, 6 insertions(+) ... this patch isn't necessary for kexec, it wired up the helper function you have in patch 2 for hibernate. Please drop this in any future posting! Thanks, James
Hi Geoff, On 23/06/16 18:54, Geoff Levand wrote: > Add three new files, kexec.h, machine_kexec.c and relocate_kernel.S to the > arm64 architecture that add support for the kexec re-boot mechanism > (CONFIG_KEXEC) on arm64 platforms. > diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c > new file mode 100644 > index 0000000..e2904c4 > --- /dev/null > +++ b/arch/arm64/kernel/machine_kexec.c > +/** > + * machine_kexec_prepare - Prepare for a kexec reboot. > + * > + * Called from the core kexec code when a kernel image is loaded. > + * Forbid loading a kexec kernel if we have no way of hotplugging cpus or cpus > + * are stuck in the kernel. This avoids a panic once we hit machine_kexec(). > + */ > +int machine_kexec_prepare(struct kimage *kimage) > +{ > + kimage_start = kimage->start; > + > + if (kimage->type != KEXEC_TYPE_CRASH) { > + if (cpus_are_stuck_in_kernel()) { > + pr_err("Can't kexec: failed CPUs are stuck in the kernel.\n"); We may want to change the word 'failed' here, the helper function now also covers systems that boot secondary processors with spin tables that are stuck in the secondary_holding_pen: > "Can't kexec: secondary CPUs are stuck in the kernel.\n" > + return -EBUSY; > + } > + > + if (num_online_cpus() > 1) { > + if (IS_ENABLED(CONFIG_HOTPLUG_CPU)) { > + /* any_cpu as we don't mind being preempted */ > + int any_cpu = raw_smp_processor_id(); > + > + if (cpu_ops[any_cpu]->cpu_die) > + return 0; > + } > + > + pr_err("Can't kexec: no mechanism to offline secondary CPUs.\n"); > + return -EBUSY; > + } This if() {} hunk isn't necessary with the version of cpus_are_stuck_in_kernel() you have in patch 2. This logic is the '|| smp_spin_tables' part of that helper function. (hibernate needed it too) > + } > + > + return 0; > +} > + [ ... ] > +/** > + * machine_kexec - Do the kexec reboot. > + * > + * Called from the core kexec code for a sys_reboot with LINUX_REBOOT_CMD_KEXEC. > + */ > +void machine_kexec(struct kimage *kimage) > +{ > + phys_addr_t reboot_code_buffer_phys; > + void *reboot_code_buffer; > + > + /* > + * New cpus may have become stuck_in_kernel after we loaded the image. > + */ > + BUG_ON(cpus_are_stuck_in_kernel() && (num_online_cpus() > 1)); BUG_ON(cpus_are_stuck_in_kernel() || (num_online_cpus() > 1)); Thanks, James
Hi Catalin, On 27/06/16 15:39, Catalin Marinas wrote: > On Mon, Jun 27, 2016 at 12:18:42PM +0100, James Morse wrote: >> This if() {} hunk isn't necessary with the version of cpus_are_stuck_in_kernel() >> you have in patch 2. This logic is the '|| smp_spin_tables' part of that helper >> function. (hibernate needed it too) > > I can make the changes locally but just to be clear I understand what > you meant, here's the diff on top of Geoff's patch: Ah, I see my 'if() {}' comment is ambiguous as there are two ... > > ----8<------------------------- > > diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c > index 945ce326654c..bc96c8a7fc79 100644 > --- a/arch/arm64/kernel/machine_kexec.c > +++ b/arch/arm64/kernel/machine_kexec.c > @@ -68,24 +68,9 @@ int machine_kexec_prepare(struct kimage *kimage) > > kexec_image_info(kimage); > > - if (kimage->type != KEXEC_TYPE_CRASH) { > - if (cpus_are_stuck_in_kernel()) { > - pr_err("Can't kexec: failed CPUs are stuck in the kernel.\n"); > - return -EBUSY; > - } > - > - if (num_online_cpus() > 1) { > - if (IS_ENABLED(CONFIG_HOTPLUG_CPU)) { > - /* any_cpu as we don't mind being preempted */ > - int any_cpu = raw_smp_processor_id(); > - > - if (cpu_ops[any_cpu]->cpu_die) > - return 0; > - } > - > - pr_err("Can't kexec: no mechanism to offline secondary CPUs.\n"); > - return -EBUSY; > - } > + if (kimage->type != KEXEC_TYPE_CRASH && cpus_are_stuck_in_kernel()) { > + pr_err("Can't kexec: CPUs are stuck in the kernel.\n"); > + return -EBUSY; > } > > return 0; > @@ -163,7 +148,7 @@ void machine_kexec(struct kimage *kimage) > /* > * New cpus may have become stuck_in_kernel after we loaded the image. > */ > - BUG_ON(cpus_are_stuck_in_kernel() && (num_online_cpus() > 1)); > + BUG_ON(cpus_are_stuck_in_kernel() || (num_online_cpus() > 1)); > > reboot_code_buffer_phys = page_to_phys(kimage->control_code_page); > reboot_code_buffer = phys_to_virt(reboot_code_buffer_phys); > Yes, that's what I meant, thanks Catalin. The 'num_online_cpus() > 1' is still needed as disable_nonboot_cpus() called via machine_shutdown() may have failed and this is where we check. (we can't return an error from either path). Geoff, I assume you agree? Thanks, James
Hi, On Mon, 2016-06-27 at 12:04 +0100, James Morse wrote: > ... this patch isn't necessary for kexec, it wired up the helper > function you > have in patch 2 for hibernate. > > Please drop this in any future posting! It seems both your patches I had went in for -rc5, so they're gone now from my master. -Geoff
Hi, On Mon, 2016-06-27 at 17:29 +0100, James Morse wrote: > On 27/06/16 15:39, Catalin Marinas wrote: > > @@ -163,7 +148,7 @@ void machine_kexec(struct kimage *kimage) > > > > > > /* > > > > > > * New cpus may have become stuck_in_kernel after we loaded the image. > > > > > > */ > > -> > > > BUG_ON(cpus_are_stuck_in_kernel() && (num_online_cpus() > 1)); > > +> > > > BUG_ON(cpus_are_stuck_in_kernel() || (num_online_cpus() > 1)); > > > > > > > > reboot_code_buffer_phys = page_to_phys(kimage->control_code_page); > > > > > > reboot_code_buffer = phys_to_virt(reboot_code_buffer_phys); > > > > Yes, that's what I meant, thanks Catalin. > > The 'num_online_cpus() > 1' is still needed as disable_nonboot_cpus() called via > machine_shutdown() may have failed and this is where we check. (we can't return > an error from either path). > > Geoff, I assume you agree? Yes, we should do a final check, and abort the reboot if if we have more than a single cpu running. -Geoff
Hi Geoff, On Thu, Jun 23, 2016 at 05:54:47PM +0000, Geoff Levand wrote: > AKASHI Takahiro (7): > arm64: kdump: reserve memory for crash dump kernel > arm64: limit memory regions based on DT property, usable-memory > arm64: kdump: implement machine_crash_shutdown() > arm64: kdump: add kdump support > arm64: kdump: add VMCOREINFO's for user-space coredump tools > arm64: kdump: enable kdump in the arm64 defconfig > arm64: kdump: update a kernel doc > > Geoff Levand (4): > arm64: Add back cpu reset routines > arm64/kexec: Add core kexec support > arm64/kexec: Enable kexec in the arm64 defconfig > arm64/kexec: Add pr_debug output > > James Morse (3): > arm64: hibernate: Don't hibernate on systems with stuck CPUs > arm64: smp: Add function to determine if cpus are stuck in the kernel > Documentation: dt: usable-memory and elfcorehdr nodes for arm64 kexec I dropped patch 1 (hibernate), cherry-picked patch 2 from mainline ("cpus stuck in the kernel", already pushed by Will to 4.7-rc5) and merged patches 3-6, with the amendments that James mentioned. The kdump patches, including the "Documentation" one from James require more review, testing and acks by the corresponding maintainers (kdump, DT). You also don't seem to have added a s-o-b for those patches (since you are submitting them; unless you plan to let Akashi-san submit them in the future). Thanks.
Hi Catalin, On Mon, 2016-06-27 at 18:00 +0100, Catalin Marinas wrote: > On Thu, Jun 23, 2016 at 05:54:47PM +0000, Geoff Levand wrote: > > AKASHI Takahiro (7): > > arm64: kdump: reserve memory for crash dump kernel > > arm64: limit memory regions based on DT property, usable-memory > > arm64: kdump: implement machine_crash_shutdown() > > arm64: kdump: add kdump support > > arm64: kdump: add VMCOREINFO's for user-space coredump tools > > arm64: kdump: enable kdump in the arm64 defconfig > > arm64: kdump: update a kernel doc > > > > Geoff Levand (4): > > arm64: Add back cpu reset routines > > arm64/kexec: Add core kexec support > > arm64/kexec: Enable kexec in the arm64 defconfig > > arm64/kexec: Add pr_debug output > > > > James Morse (3): > > arm64: hibernate: Don't hibernate on systems with stuck CPUs > > arm64: smp: Add function to determine if cpus are stuck in the kernel > > Documentation: dt: usable-memory and elfcorehdr nodes for arm64 kexec > > I dropped patch 1 (hibernate), cherry-picked patch 2 from mainline > ("cpus stuck in the kernel", already pushed by Will to 4.7-rc5) and > merged patches 3-6, with the amendments that James mentioned. > > The kdump patches, including the "Documentation" one from James require > more review, testing and acks by the corresponding maintainers (kdump, > DT). You also don't seem to have added a s-o-b for those patches (since > you are submitting them; unless you plan to let Akashi-san submit them > in the future). I'll workout the merge plan for the rest of the patches with Takahiro. If they come through me I'll add an SOB. Thanks for the review. -Geoff
Hi Catalin, On Mon, Jun 27, 2016 at 06:00:39PM +0100, Catalin Marinas wrote: > Hi Geoff, > > On Thu, Jun 23, 2016 at 05:54:47PM +0000, Geoff Levand wrote: > > AKASHI Takahiro (7): > > arm64: kdump: reserve memory for crash dump kernel > > arm64: limit memory regions based on DT property, usable-memory > > arm64: kdump: implement machine_crash_shutdown() > > arm64: kdump: add kdump support > > arm64: kdump: add VMCOREINFO's for user-space coredump tools > > arm64: kdump: enable kdump in the arm64 defconfig > > arm64: kdump: update a kernel doc > > > > Geoff Levand (4): > > arm64: Add back cpu reset routines > > arm64/kexec: Add core kexec support > > arm64/kexec: Enable kexec in the arm64 defconfig > > arm64/kexec: Add pr_debug output > > > > James Morse (3): > > arm64: hibernate: Don't hibernate on systems with stuck CPUs > > arm64: smp: Add function to determine if cpus are stuck in the kernel > > Documentation: dt: usable-memory and elfcorehdr nodes for arm64 kexec > > I dropped patch 1 (hibernate), cherry-picked patch 2 from mainline > ("cpus stuck in the kernel", already pushed by Will to 4.7-rc5) and > merged patches 3-6, with the amendments that James mentioned. > > The kdump patches, including the "Documentation" one from James require > more review, testing and acks by the corresponding maintainers (kdump, > DT). I see what you mean, but even for Geoff's kexec part, the maintainer (Eric) have not given his ack. > You also don't seem to have added a s-o-b for those patches (since > you are submitting them; unless you plan to let Akashi-san submit them > in the future). Basically Geoff has not reviewed nor tested kdump part, and so I'm not sure that adding his s-o-b is appropriate. Anyhow, I will post my future version of kdump by myself as kexec has been queued in for-next/core. Thanks, -Takahiro AKASHI > Thanks. > > -- > Catalin
On Wed, Jun 29, 2016 at 09:54:15AM +0900, AKASHI Takahiro wrote: > On Mon, Jun 27, 2016 at 06:00:39PM +0100, Catalin Marinas wrote: > > On Thu, Jun 23, 2016 at 05:54:47PM +0000, Geoff Levand wrote: > > > AKASHI Takahiro (7): > > > arm64: kdump: reserve memory for crash dump kernel > > > arm64: limit memory regions based on DT property, usable-memory > > > arm64: kdump: implement machine_crash_shutdown() > > > arm64: kdump: add kdump support > > > arm64: kdump: add VMCOREINFO's for user-space coredump tools > > > arm64: kdump: enable kdump in the arm64 defconfig > > > arm64: kdump: update a kernel doc > > > > > > Geoff Levand (4): > > > arm64: Add back cpu reset routines > > > arm64/kexec: Add core kexec support > > > arm64/kexec: Enable kexec in the arm64 defconfig > > > arm64/kexec: Add pr_debug output > > > > > > James Morse (3): > > > arm64: hibernate: Don't hibernate on systems with stuck CPUs > > > arm64: smp: Add function to determine if cpus are stuck in the kernel > > > Documentation: dt: usable-memory and elfcorehdr nodes for arm64 kexec > > > > I dropped patch 1 (hibernate), cherry-picked patch 2 from mainline > > ("cpus stuck in the kernel", already pushed by Will to 4.7-rc5) and > > merged patches 3-6, with the amendments that James mentioned. > > > > The kdump patches, including the "Documentation" one from James require > > more review, testing and acks by the corresponding maintainers (kdump, > > DT). > > I see what you mean, but even for Geoff's kexec part, the maintainer > (Eric) have not given his ack. I just assumed he won't object ;). The only generic change is the KEXEC_ARCH_AARCH64 in the uapi/linux/kexec.h file and the value chosen matches EM_AARCH64. The kdump patches make such changes to Documentation and I would like those acked by the kdump and DT maintainers. Pratyush Anand also had comments on the kdump patches in v19, so it's fair to wait for him to complete the reviewing of the latest series. > > You also don't seem to have added a s-o-b for those patches (since > > you are submitting them; unless you plan to let Akashi-san submit them > > in the future). > > Basically Geoff has not reviewed nor tested kdump part, and > so I'm not sure that adding his s-o-b is appropriate. It is appropriate. See the "Developer's Certificate of Origin" in Documentation/SubmittingPatches. A s-o-b from Geoff doesn't necessarily mean that he reviewed the patches but that he has the right to pass them on under the open source license indicated in the file (and AFAICT it is legally binding but IANAL). > Anyhow, I will post my future version of kdump by myself as kexec has > been queued in for-next/core. Thanks.
On Wed, Jun 29, 2016 at 10:20:50AM +0100, Catalin Marinas wrote: > On Wed, Jun 29, 2016 at 09:54:15AM +0900, AKASHI Takahiro wrote: > > On Mon, Jun 27, 2016 at 06:00:39PM +0100, Catalin Marinas wrote: > > > On Thu, Jun 23, 2016 at 05:54:47PM +0000, Geoff Levand wrote: > > > > AKASHI Takahiro (7): > > > > arm64: kdump: reserve memory for crash dump kernel > > > > arm64: limit memory regions based on DT property, usable-memory > > > > arm64: kdump: implement machine_crash_shutdown() > > > > arm64: kdump: add kdump support > > > > arm64: kdump: add VMCOREINFO's for user-space coredump tools > > > > arm64: kdump: enable kdump in the arm64 defconfig > > > > arm64: kdump: update a kernel doc > > > > > > > > Geoff Levand (4): > > > > arm64: Add back cpu reset routines > > > > arm64/kexec: Add core kexec support > > > > arm64/kexec: Enable kexec in the arm64 defconfig > > > > arm64/kexec: Add pr_debug output > > > > > > > > James Morse (3): > > > > arm64: hibernate: Don't hibernate on systems with stuck CPUs > > > > arm64: smp: Add function to determine if cpus are stuck in the kernel > > > > Documentation: dt: usable-memory and elfcorehdr nodes for arm64 kexec > > > > > > I dropped patch 1 (hibernate), cherry-picked patch 2 from mainline > > > ("cpus stuck in the kernel", already pushed by Will to 4.7-rc5) and > > > merged patches 3-6, with the amendments that James mentioned. > > > > > > The kdump patches, including the "Documentation" one from James require > > > more review, testing and acks by the corresponding maintainers (kdump, > > > DT). > > > > I see what you mean, but even for Geoff's kexec part, the maintainer > > (Eric) have not given his ack. > > I just assumed he won't object ;). The only generic change is the > KEXEC_ARCH_AARCH64 in the uapi/linux/kexec.h file and the value chosen > matches EM_AARCH64. > > The kdump patches make such changes to Documentation and I would like > those acked by the kdump and DT maintainers. OK, I asked the corresponding maintainers to review them. > Pratyush Anand also had comments on the kdump patches in v19, so it's > fair to wait for him to complete the reviewing of the latest series. I think that it was my mistake that I referred to makedumpfile-related VMCOREINFO's in my patch. Since I'm not a user nor author of makedumpfile command for arm64, my changes should have been minimized, exluding any non-mandatory symbols. (Patch#13/14 is necessary for me to verify generated vmcore files with crash utility.) So I asked Pratyush to post his kernel patch based on his own requirements as he wants. I believe it's fair enough. > > > You also don't seem to have added a s-o-b for those patches (since > > > you are submitting them; unless you plan to let Akashi-san submit them > > > in the future). > > > > Basically Geoff has not reviewed nor tested kdump part, and > > so I'm not sure that adding his s-o-b is appropriate. > > It is appropriate. See the "Developer's Certificate of Origin" in > Documentation/SubmittingPatches. A s-o-b from Geoff doesn't necessarily > mean that he reviewed the patches but that he has the right to pass them > on under the open source license indicated in the file (and AFAICT it is > legally binding but IANAL). > > > Anyhow, I will post my future version of kdump by myself as kexec has > > been queued in for-next/core. > > Thanks. Since I've got no comments on kdump patches and had no updates so far, I don't plan to post v21 this week (at this point). (I will add "reviewed-by James" to patch#7/14 in future releases.) Thanks, -Takahiro AKASHI > -- > Catalin
On 06/23/16 at 05:54pm, Geoff Levand wrote: > From: AKASHI Takahiro <takahiro.akashi@linaro.org> > > This patch adds arch specific descriptions about kdump usage on arm64 > to kdump.txt. > > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> > --- > Documentation/kdump/kdump.txt | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt > index 88ff63d..5d6da09 100644 > --- a/Documentation/kdump/kdump.txt > +++ b/Documentation/kdump/kdump.txt > @@ -18,7 +18,7 @@ memory image to a dump file on the local disk, or across the network to > a remote system. > > Kdump and kexec are currently supported on the x86, x86_64, ppc64, ia64, > -s390x and arm architectures. > +s390x, arm and arm64 architectures. > > When the system kernel boots, it reserves a small section of memory for > the dump-capture kernel. This ensures that ongoing Direct Memory Access > @@ -249,6 +249,12 @@ Dump-capture kernel config options (Arch Dependent, arm) > > AUTO_ZRELADDR=y > > +Dump-capture kernel config options (Arch Dependent, arm64) > +---------------------------------------------------------- > + > +1) Currently, kvm will not be enabled on the dump-capture kernel even > + if it is configured. > + > Extended crashkernel syntax > =========================== > > @@ -305,6 +311,8 @@ Boot into System Kernel > kernel will automatically locate the crash kernel image within the > first 512MB of RAM if X is not given. > > + On arm64, use "crashkernel=Y[@X]". Note that the start address of ~ Why square brackets here, is it different than other arch? Except for this, it looks good to me. Thanks Baoquan > + the kernel, X if explicitly specified, must be aligned to 2MiB (0x200000). > > Load the Dump-capture Kernel > ============================ > @@ -327,6 +335,8 @@ For s390x: > - Use image or bzImage > For arm: > - Use zImage > +For arm64: > + - Use vmlinux or Image > > If you are using a uncompressed vmlinux image then use following command > to load dump-capture kernel. > @@ -370,6 +380,9 @@ For s390x: > For arm: > "1 maxcpus=1 reset_devices" > > +For arm64: > + "1 maxcpus=1 reset_devices" > + > Notes on loading the dump-capture kernel: > > * By default, the ELF headers are stored in ELF64 format to support > -- > 2.5.0 > > > > _______________________________________________ > kexec mailing list > kexec@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kexec
On 06/23/16 at 05:54pm, Geoff Levand wrote: > From: AKASHI Takahiro <takahiro.akashi@linaro.org> > > This patch adds arch specific descriptions about kdump usage on arm64 > to kdump.txt. > > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> > --- > Documentation/kdump/kdump.txt | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt > index 88ff63d..5d6da09 100644 > --- a/Documentation/kdump/kdump.txt > +++ b/Documentation/kdump/kdump.txt > @@ -18,7 +18,7 @@ memory image to a dump file on the local disk, or across the network to > a remote system. > > Kdump and kexec are currently supported on the x86, x86_64, ppc64, ia64, > -s390x and arm architectures. > +s390x, arm and arm64 architectures. > > When the system kernel boots, it reserves a small section of memory for > the dump-capture kernel. This ensures that ongoing Direct Memory Access > @@ -249,6 +249,12 @@ Dump-capture kernel config options (Arch Dependent, arm) > > AUTO_ZRELADDR=y > > +Dump-capture kernel config options (Arch Dependent, arm64) > +---------------------------------------------------------- > + > +1) Currently, kvm will not be enabled on the dump-capture kernel even > + if it is configured. > + > Extended crashkernel syntax > =========================== > > @@ -305,6 +311,8 @@ Boot into System Kernel > kernel will automatically locate the crash kernel image within the > first 512MB of RAM if X is not given. > > + On arm64, use "crashkernel=Y[@X]". Note that the start address of > + the kernel, X if explicitly specified, must be aligned to 2MiB (0x200000). > > Load the Dump-capture Kernel > ============================ > @@ -327,6 +335,8 @@ For s390x: > - Use image or bzImage > For arm: > - Use zImage > +For arm64: > + - Use vmlinux or Image > > If you are using a uncompressed vmlinux image then use following command > to load dump-capture kernel. > @@ -370,6 +380,9 @@ For s390x: > For arm: > "1 maxcpus=1 reset_devices" > > +For arm64: > + "1 maxcpus=1 reset_devices" > + > Notes on loading the dump-capture kernel: > > * By default, the ELF headers are stored in ELF64 format to support Looks good to me. Acked-by: Dave Young <dyoung@redhat.com> Thanks Dave
Hi Takahiro, On 30/06/2016:10:46:04 AM, AKASHI Takahiro wrote: > On Wed, Jun 29, 2016 at 10:20:50AM +0100, Catalin Marinas wrote: > > On Wed, Jun 29, 2016 at 09:54:15AM +0900, AKASHI Takahiro wrote: > > > On Mon, Jun 27, 2016 at 06:00:39PM +0100, Catalin Marinas wrote: > > > > On Thu, Jun 23, 2016 at 05:54:47PM +0000, Geoff Levand wrote: > > > > > AKASHI Takahiro (7): > > > > > arm64: kdump: reserve memory for crash dump kernel > > > > > arm64: limit memory regions based on DT property, usable-memory > > > > > arm64: kdump: implement machine_crash_shutdown() > > > > > arm64: kdump: add kdump support > > > > > arm64: kdump: add VMCOREINFO's for user-space coredump tools > > > > > arm64: kdump: enable kdump in the arm64 defconfig > > > > > arm64: kdump: update a kernel doc > > > > > > > > > > Geoff Levand (4): > > > > > arm64: Add back cpu reset routines > > > > > arm64/kexec: Add core kexec support > > > > > arm64/kexec: Enable kexec in the arm64 defconfig > > > > > arm64/kexec: Add pr_debug output > > > > > > > > > > James Morse (3): > > > > > arm64: hibernate: Don't hibernate on systems with stuck CPUs > > > > > arm64: smp: Add function to determine if cpus are stuck in the kernel > > > > > Documentation: dt: usable-memory and elfcorehdr nodes for arm64 kexec > > > > > > > > I dropped patch 1 (hibernate), cherry-picked patch 2 from mainline > > > > ("cpus stuck in the kernel", already pushed by Will to 4.7-rc5) and > > > > merged patches 3-6, with the amendments that James mentioned. > > > > > > > > The kdump patches, including the "Documentation" one from James require > > > > more review, testing and acks by the corresponding maintainers (kdump, > > > > DT). > > > > > > I see what you mean, but even for Geoff's kexec part, the maintainer > > > (Eric) have not given his ack. > > > > I just assumed he won't object ;). The only generic change is the > > KEXEC_ARCH_AARCH64 in the uapi/linux/kexec.h file and the value chosen > > matches EM_AARCH64. > > > > The kdump patches make such changes to Documentation and I would like > > those acked by the kdump and DT maintainers. > > OK, I asked the corresponding maintainers to review them. > > > Pratyush Anand also had comments on the kdump patches in v19, so it's > > fair to wait for him to complete the reviewing of the latest series. > > I think that it was my mistake that I referred to makedumpfile-related > VMCOREINFO's in my patch. > Since I'm not a user nor author of makedumpfile command for arm64, > my changes should have been minimized, exluding any non-mandatory symbols. > (Patch#13/14 is necessary for me to verify generated vmcore files > with crash utility.) > So I asked Pratyush to post his kernel patch based on his own requirements > as he wants. > I believe it's fair enough. Sorry for delayed response. I am agreeing to this patchset. makedumpfile would also be able to work by directly reading page table entries for all virtual addresses. I have tested this patchset with Mustang and both kexec and kdump works. So, you can add Tested-by: Pratyush Anand <panand@redhat.com> Thanks for all the work on kexec/kdump. ~Pratyush > > > > > You also don't seem to have added a s-o-b for those patches (since > > > > you are submitting them; unless you plan to let Akashi-san submit them > > > > in the future). > > > > > > Basically Geoff has not reviewed nor tested kdump part, and > > > so I'm not sure that adding his s-o-b is appropriate. > > > > It is appropriate. See the "Developer's Certificate of Origin" in > > Documentation/SubmittingPatches. A s-o-b from Geoff doesn't necessarily > > mean that he reviewed the patches but that he has the right to pass them > > on under the open source license indicated in the file (and AFAICT it is > > legally binding but IANAL). > > > > > Anyhow, I will post my future version of kdump by myself as kexec has > > > been queued in for-next/core. > > > > Thanks. > > Since I've got no comments on kdump patches and had no updates > so far, I don't plan to post v21 this week (at this point). > (I will add "reviewed-by James" to patch#7/14 in future releases.) > > Thanks, > -Takahiro AKASHI > > > -- > > Catalin > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Dave, Boaquan, Thank you for your reviewing. On Thu, Jun 30, 2016 at 05:00:45PM +0800, Baoquan He wrote: > On 06/23/16 at 05:54pm, Geoff Levand wrote: > > From: AKASHI Takahiro <takahiro.akashi@linaro.org> > > > > This patch adds arch specific descriptions about kdump usage on arm64 > > to kdump.txt. > > > > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> > > --- > > Documentation/kdump/kdump.txt | 15 ++++++++++++++- > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt > > index 88ff63d..5d6da09 100644 > > --- a/Documentation/kdump/kdump.txt > > +++ b/Documentation/kdump/kdump.txt > > @@ -18,7 +18,7 @@ memory image to a dump file on the local disk, or across the network to > > a remote system. > > > > Kdump and kexec are currently supported on the x86, x86_64, ppc64, ia64, > > -s390x and arm architectures. > > +s390x, arm and arm64 architectures. > > > > When the system kernel boots, it reserves a small section of memory for > > the dump-capture kernel. This ensures that ongoing Direct Memory Access > > @@ -249,6 +249,12 @@ Dump-capture kernel config options (Arch Dependent, arm) > > > > AUTO_ZRELADDR=y > > > > +Dump-capture kernel config options (Arch Dependent, arm64) > > +---------------------------------------------------------- > > + > > +1) Currently, kvm will not be enabled on the dump-capture kernel even > > + if it is configured. > > + > > Extended crashkernel syntax > > =========================== > > > > @@ -305,6 +311,8 @@ Boot into System Kernel > > kernel will automatically locate the crash kernel image within the > > first 512MB of RAM if X is not given. > > > > + On arm64, use "crashkernel=Y[@X]". Note that the start address of > ~ Why square brackets here, is it > different than other arch? I want to clearly indicate that "@X" is optional, and that, when you explicitly specify it, X must be properly aligned. I think that "[..]" notation is quite common. Thanks, -Takahiro AKASHI > > Except for this, it looks good to me. > > Thanks > Baoquan > > > + the kernel, X if explicitly specified, must be aligned to 2MiB (0x200000). > > > > Load the Dump-capture Kernel > > ============================ > > @@ -327,6 +335,8 @@ For s390x: > > - Use image or bzImage > > For arm: > > - Use zImage > > +For arm64: > > + - Use vmlinux or Image > > > > If you are using a uncompressed vmlinux image then use following command > > to load dump-capture kernel. > > @@ -370,6 +380,9 @@ For s390x: > > For arm: > > "1 maxcpus=1 reset_devices" > > > > +For arm64: > > + "1 maxcpus=1 reset_devices" > > + > > Notes on loading the dump-capture kernel: > > > > * By default, the ELF headers are stored in ELF64 format to support > > -- > > 2.5.0 > > > > > > > > _______________________________________________ > > kexec mailing list > > kexec@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/kexec
On 07/01/16 at 04:37pm, AKASHI Takahiro wrote: > Dave, Boaquan, > > Thank you for your reviewing. > > On Thu, Jun 30, 2016 at 05:00:45PM +0800, Baoquan He wrote: > > On 06/23/16 at 05:54pm, Geoff Levand wrote: > > > From: AKASHI Takahiro <takahiro.akashi@linaro.org> > > > > > > This patch adds arch specific descriptions about kdump usage on arm64 > > > to kdump.txt. > > > > > > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> > > > --- > > > Documentation/kdump/kdump.txt | 15 ++++++++++++++- > > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > > > diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt > > > index 88ff63d..5d6da09 100644 > > > --- a/Documentation/kdump/kdump.txt > > > +++ b/Documentation/kdump/kdump.txt > > > @@ -18,7 +18,7 @@ memory image to a dump file on the local disk, or across the network to > > > a remote system. > > > > > > Kdump and kexec are currently supported on the x86, x86_64, ppc64, ia64, > > > -s390x and arm architectures. > > > +s390x, arm and arm64 architectures. > > > > > > When the system kernel boots, it reserves a small section of memory for > > > the dump-capture kernel. This ensures that ongoing Direct Memory Access > > > @@ -249,6 +249,12 @@ Dump-capture kernel config options (Arch Dependent, arm) > > > > > > AUTO_ZRELADDR=y > > > > > > +Dump-capture kernel config options (Arch Dependent, arm64) > > > +---------------------------------------------------------- > > > + > > > +1) Currently, kvm will not be enabled on the dump-capture kernel even > > > + if it is configured. And here, could you say more about it? > > > + > > > Extended crashkernel syntax > > > =========================== > > > > > > @@ -305,6 +311,8 @@ Boot into System Kernel > > > kernel will automatically locate the crash kernel image within the > > > first 512MB of RAM if X is not given. > > > > > > + On arm64, use "crashkernel=Y[@X]". Note that the start address of > > ~ Why square brackets here, is it > > different than other arch? > > I want to clearly indicate that "@X" is optional, and that, when you explicitly > specify it, X must be properly aligned. > I think that "[..]" notation is quite common. Yes, I see that. Just that has been noted in "Extended crashkernel syntax" section, and adding "[]" is not consistent with other places where "crashkernel=Y@X" is referred to in this section. Just feel it's a little redundent. Anyway it's not very critical, and Dave has acked it, I am fine if you want to keep it. Thanks Baoquan > > Thanks, > -Takahiro AKASHI > > > > > Except for this, it looks good to me. > > > > Thanks > > Baoquan > > > > > + the kernel, X if explicitly specified, must be aligned to 2MiB (0x200000). > > > > > > Load the Dump-capture Kernel > > > ============================ > > > @@ -327,6 +335,8 @@ For s390x: > > > - Use image or bzImage > > > For arm: > > > - Use zImage > > > +For arm64: > > > + - Use vmlinux or Image > > > > > > If you are using a uncompressed vmlinux image then use following command > > > to load dump-capture kernel. > > > @@ -370,6 +380,9 @@ For s390x: > > > For arm: > > > "1 maxcpus=1 reset_devices" > > > > > > +For arm64: > > > + "1 maxcpus=1 reset_devices" > > > + > > > Notes on loading the dump-capture kernel: > > > > > > * By default, the ELF headers are stored in ELF64 format to support > > > -- > > > 2.5.0 > > > > > > > > > > > > _______________________________________________ > > > kexec mailing list > > > kexec@lists.infradead.org > > > http://lists.infradead.org/mailman/listinfo/kexec
Baoquan, On Fri, Jul 01, 2016 at 03:45:05PM +0800, Baoquan He wrote: > On 07/01/16 at 04:37pm, AKASHI Takahiro wrote: > > Dave, Boaquan, > > > > Thank you for your reviewing. > > > > On Thu, Jun 30, 2016 at 05:00:45PM +0800, Baoquan He wrote: > > > On 06/23/16 at 05:54pm, Geoff Levand wrote: > > > > From: AKASHI Takahiro <takahiro.akashi@linaro.org> > > > > > > > > This patch adds arch specific descriptions about kdump usage on arm64 > > > > to kdump.txt. > > > > > > > > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> > > > > --- > > > > Documentation/kdump/kdump.txt | 15 ++++++++++++++- > > > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt > > > > index 88ff63d..5d6da09 100644 > > > > --- a/Documentation/kdump/kdump.txt > > > > +++ b/Documentation/kdump/kdump.txt > > > > @@ -18,7 +18,7 @@ memory image to a dump file on the local disk, or across the network to > > > > a remote system. > > > > > > > > Kdump and kexec are currently supported on the x86, x86_64, ppc64, ia64, > > > > -s390x and arm architectures. > > > > +s390x, arm and arm64 architectures. > > > > > > > > When the system kernel boots, it reserves a small section of memory for > > > > the dump-capture kernel. This ensures that ongoing Direct Memory Access > > > > @@ -249,6 +249,12 @@ Dump-capture kernel config options (Arch Dependent, arm) > > > > > > > > AUTO_ZRELADDR=y > > > > > > > > +Dump-capture kernel config options (Arch Dependent, arm64) > > > > +---------------------------------------------------------- > > > > + > > > > +1) Currently, kvm will not be enabled on the dump-capture kernel even > > > > + if it is configured. > > And here, could you say more about it? On non-VHE (Virtualization Host Environment) system, the kernel, which normally runs in EL1 mode, must be started in EL2 mode to enable kvm, but the current code uses cpu pm notifier to reset CPU state to EL2 and we have no chance to do that on panic. I will clarify this in kdump.txt. > > > > + > > > > Extended crashkernel syntax > > > > =========================== > > > > > > > > @@ -305,6 +311,8 @@ Boot into System Kernel > > > > kernel will automatically locate the crash kernel image within the > > > > first 512MB of RAM if X is not given. > > > > > > > > + On arm64, use "crashkernel=Y[@X]". Note that the start address of > > > ~ Why square brackets here, is it > > > different than other arch? > > > > I want to clearly indicate that "@X" is optional, and that, when you explicitly > > specify it, X must be properly aligned. > > I think that "[..]" notation is quite common. > > Yes, I see that. Just that has been noted in "Extended crashkernel > syntax" section, and adding "[]" is not consistent with other places > where "crashkernel=Y@X" is referred to in this section. Just feel it's > a little redundent. Anyway it's not very critical, and Dave has acked > it, I am fine if you want to keep it. Thanks, -Takahiro AKASHI > Thanks > Baoquan > > > > > Thanks, > > -Takahiro AKASHI > > > > > > > > Except for this, it looks good to me. > > > > > > Thanks > > > Baoquan > > > > > > > + the kernel, X if explicitly specified, must be aligned to 2MiB (0x200000). > > > > > > > > Load the Dump-capture Kernel > > > > ============================ > > > > @@ -327,6 +335,8 @@ For s390x: > > > > - Use image or bzImage > > > > For arm: > > > > - Use zImage > > > > +For arm64: > > > > + - Use vmlinux or Image > > > > > > > > If you are using a uncompressed vmlinux image then use following command > > > > to load dump-capture kernel. > > > > @@ -370,6 +380,9 @@ For s390x: > > > > For arm: > > > > "1 maxcpus=1 reset_devices" > > > > > > > > +For arm64: > > > > + "1 maxcpus=1 reset_devices" > > > > + > > > > Notes on loading the dump-capture kernel: > > > > > > > > * By default, the ELF headers are stored in ELF64 format to support > > > > -- > > > > 2.5.0 > > > > > > > > > > > > > > > > _______________________________________________ > > > > kexec mailing list > > > > kexec@lists.infradead.org > > > > http://lists.infradead.org/mailman/listinfo/kexec
On Fri, Jul 01, 2016 at 08:09:57AM +0530, Pratyush Anand wrote: > Hi Takahiro, > > On 30/06/2016:10:46:04 AM, AKASHI Takahiro wrote: > > On Wed, Jun 29, 2016 at 10:20:50AM +0100, Catalin Marinas wrote: > > > On Wed, Jun 29, 2016 at 09:54:15AM +0900, AKASHI Takahiro wrote: > > > > On Mon, Jun 27, 2016 at 06:00:39PM +0100, Catalin Marinas wrote: > > > > > On Thu, Jun 23, 2016 at 05:54:47PM +0000, Geoff Levand wrote: > > > > > > AKASHI Takahiro (7): > > > > > > arm64: kdump: reserve memory for crash dump kernel > > > > > > arm64: limit memory regions based on DT property, usable-memory > > > > > > arm64: kdump: implement machine_crash_shutdown() > > > > > > arm64: kdump: add kdump support > > > > > > arm64: kdump: add VMCOREINFO's for user-space coredump tools > > > > > > arm64: kdump: enable kdump in the arm64 defconfig > > > > > > arm64: kdump: update a kernel doc > > > > > > > > > > > > Geoff Levand (4): > > > > > > arm64: Add back cpu reset routines > > > > > > arm64/kexec: Add core kexec support > > > > > > arm64/kexec: Enable kexec in the arm64 defconfig > > > > > > arm64/kexec: Add pr_debug output > > > > > > > > > > > > James Morse (3): > > > > > > arm64: hibernate: Don't hibernate on systems with stuck CPUs > > > > > > arm64: smp: Add function to determine if cpus are stuck in the kernel > > > > > > Documentation: dt: usable-memory and elfcorehdr nodes for arm64 kexec > > > > > > > > > > I dropped patch 1 (hibernate), cherry-picked patch 2 from mainline > > > > > ("cpus stuck in the kernel", already pushed by Will to 4.7-rc5) and > > > > > merged patches 3-6, with the amendments that James mentioned. > > > > > > > > > > The kdump patches, including the "Documentation" one from James require > > > > > more review, testing and acks by the corresponding maintainers (kdump, > > > > > DT). > > > > > > > > I see what you mean, but even for Geoff's kexec part, the maintainer > > > > (Eric) have not given his ack. > > > > > > I just assumed he won't object ;). The only generic change is the > > > KEXEC_ARCH_AARCH64 in the uapi/linux/kexec.h file and the value chosen > > > matches EM_AARCH64. > > > > > > The kdump patches make such changes to Documentation and I would like > > > those acked by the kdump and DT maintainers. > > > > OK, I asked the corresponding maintainers to review them. > > > > > Pratyush Anand also had comments on the kdump patches in v19, so it's > > > fair to wait for him to complete the reviewing of the latest series. > > > > I think that it was my mistake that I referred to makedumpfile-related > > VMCOREINFO's in my patch. > > Since I'm not a user nor author of makedumpfile command for arm64, > > my changes should have been minimized, exluding any non-mandatory symbols. > > (Patch#13/14 is necessary for me to verify generated vmcore files > > with crash utility.) > > So I asked Pratyush to post his kernel patch based on his own requirements > > as he wants. > > I believe it's fair enough. > > Sorry for delayed response. > I am agreeing to this patchset. makedumpfile would also be able to work by > directly reading page table entries for all virtual addresses. So are you going to add a physical address of swapper_pg_dir? Do you see any visible speed down of makedumpfile? > I have tested this patchset with Mustang and both kexec and kdump works. So, you > can add > Tested-by: Pratyush Anand <panand@redhat.com> Thanks, -Takahiro AKASHI > Thanks for all the work on kexec/kdump. > > ~Pratyush > > > > > > > > You also don't seem to have added a s-o-b for those patches (since > > > > > you are submitting them; unless you plan to let Akashi-san submit them > > > > > in the future). > > > > > > > > Basically Geoff has not reviewed nor tested kdump part, and > > > > so I'm not sure that adding his s-o-b is appropriate. > > > > > > It is appropriate. See the "Developer's Certificate of Origin" in > > > Documentation/SubmittingPatches. A s-o-b from Geoff doesn't necessarily > > > mean that he reviewed the patches but that he has the right to pass them > > > on under the open source license indicated in the file (and AFAICT it is > > > legally binding but IANAL). > > > > > > > Anyhow, I will post my future version of kdump by myself as kexec has > > > > been queued in for-next/core. > > > > > > Thanks. > > > > Since I've got no comments on kdump patches and had no updates > > so far, I don't plan to post v21 this week (at this point). > > (I will add "reviewed-by James" to patch#7/14 in future releases.) > > > > Thanks, > > -Takahiro AKASHI > > > > > -- > > > Catalin > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On 04/07/2016:04:14:09 PM, AKASHI Takahiro wrote: > On Fri, Jul 01, 2016 at 08:09:57AM +0530, Pratyush Anand wrote: > > Hi Takahiro, > > > > On 30/06/2016:10:46:04 AM, AKASHI Takahiro wrote: > > > On Wed, Jun 29, 2016 at 10:20:50AM +0100, Catalin Marinas wrote: > > > > On Wed, Jun 29, 2016 at 09:54:15AM +0900, AKASHI Takahiro wrote: > > > > > On Mon, Jun 27, 2016 at 06:00:39PM +0100, Catalin Marinas wrote: > > > > > > On Thu, Jun 23, 2016 at 05:54:47PM +0000, Geoff Levand wrote: > > > > > > > AKASHI Takahiro (7): > > > > > > > arm64: kdump: reserve memory for crash dump kernel > > > > > > > arm64: limit memory regions based on DT property, usable-memory > > > > > > > arm64: kdump: implement machine_crash_shutdown() > > > > > > > arm64: kdump: add kdump support > > > > > > > arm64: kdump: add VMCOREINFO's for user-space coredump tools > > > > > > > arm64: kdump: enable kdump in the arm64 defconfig > > > > > > > arm64: kdump: update a kernel doc > > > > > > > > > > > > > > Geoff Levand (4): > > > > > > > arm64: Add back cpu reset routines > > > > > > > arm64/kexec: Add core kexec support > > > > > > > arm64/kexec: Enable kexec in the arm64 defconfig > > > > > > > arm64/kexec: Add pr_debug output > > > > > > > > > > > > > > James Morse (3): > > > > > > > arm64: hibernate: Don't hibernate on systems with stuck CPUs > > > > > > > arm64: smp: Add function to determine if cpus are stuck in the kernel > > > > > > > Documentation: dt: usable-memory and elfcorehdr nodes for arm64 kexec > > > > > > > > > > > > I dropped patch 1 (hibernate), cherry-picked patch 2 from mainline > > > > > > ("cpus stuck in the kernel", already pushed by Will to 4.7-rc5) and > > > > > > merged patches 3-6, with the amendments that James mentioned. > > > > > > > > > > > > The kdump patches, including the "Documentation" one from James require > > > > > > more review, testing and acks by the corresponding maintainers (kdump, > > > > > > DT). > > > > > > > > > > I see what you mean, but even for Geoff's kexec part, the maintainer > > > > > (Eric) have not given his ack. > > > > > > > > I just assumed he won't object ;). The only generic change is the > > > > KEXEC_ARCH_AARCH64 in the uapi/linux/kexec.h file and the value chosen > > > > matches EM_AARCH64. > > > > > > > > The kdump patches make such changes to Documentation and I would like > > > > those acked by the kdump and DT maintainers. > > > > > > OK, I asked the corresponding maintainers to review them. > > > > > > > Pratyush Anand also had comments on the kdump patches in v19, so it's > > > > fair to wait for him to complete the reviewing of the latest series. > > > > > > I think that it was my mistake that I referred to makedumpfile-related > > > VMCOREINFO's in my patch. > > > Since I'm not a user nor author of makedumpfile command for arm64, > > > my changes should have been minimized, exluding any non-mandatory symbols. > > > (Patch#13/14 is necessary for me to verify generated vmcore files > > > with crash utility.) > > > So I asked Pratyush to post his kernel patch based on his own requirements > > > as he wants. > > > I believe it's fair enough. > > > > Sorry for delayed response. > > I am agreeing to this patchset. makedumpfile would also be able to work by > > directly reading page table entries for all virtual addresses. > > So are you going to add a physical address of swapper_pg_dir? NO, I think, I can take it for-granted that swapper_pg_dir will always lie in identity mapped region. So, I will use __pa() macro only to translate swapper_pg_dir. Rest all virtual addresses will be translated using page table entries. > Do you see any visible speed down of makedumpfile? I will take back my comment here. Its almost negligible. About 2 Sec slower when whole dump process took around 2m 44 S. ~Pratyush
Hi Geoff, I am wondering if you could comment on the kexec-tools patches for kexec on arm64 and if you think it would be appropriate to merge them at this time. Thanks
Hi Simon, On Fri, 2016-07-15 at 13:17 +0900, Simon Horman wrote: > I am wondering if you could comment on the kexec-tools patches > for kexec on arm64 and if you think it would be appropriate to merge > them at this time. I'm working to clean up my kexec-tools patches now, and should be posting a series that add arm64 reboot within the next few days. -Geoff