Re: [PATCH 08/16] arm64/kexec: Add core kexec support

2015-10-30 Thread James Morse
_start. > + */ > +.globl arm64_kexec_kimage_start_offset > +arm64_kexec_kimage_start_offset: > + .quad .Lkimage_start - arm64_relocate_new_kernel > + > +/* > + * arm64_kexec_kimage_head_offset - Offset for writing .Lkimage_head. > + */ > +.globl arm64_kexec_kimage_head_offset > +arm64_kexec_kimage_head_offset: > + .quad .Lkimage_head - arm64_relocate_new_kernel >From 'kexec -e' to the first messages from the new kernel takes ~1 minute on Juno, Did you see a similar delay? Or should I go looking for what I've configured wrong!? (Copying code with the mmu+caches on, then cleaning to PoC was noticeably faster for hibernate) I've used this series for kexec-ing between 4K and 64K page_size kernels on Juno. Tested-By: James Morse <james.mo...@arm.com> Thanks! James ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCH 2/2] fixup! arm64: kvm: allows kvm cpu hotplug

2015-10-20 Thread James Morse
only if kvm has been initialized > before CPU_PM_ENTER, that is, if any vcpus have been created. > > Signed-off-by: AKASHI Takahiro <takahiro.aka...@linaro.org> This solves my issue with the v5 version here [0]. Tested-By: James Morse <james.mo...@arm.com> Thanks! James [0

Re: [PATCH v5 1/2] arm64: kvm: allows kvm cpu hotplug

2015-10-12 Thread James Morse
On 29/05/15 06:38, AKASHI Takahiro wrote: > The current kvm implementation on arm64 does cpu-specific initialization > at system boot, and has no way to gracefully shutdown a core in terms of > kvm. This prevents, especially, kexec from rebooting the system on a boot > core in EL2. > > This patch

Re: [PATCH v5 1/2] arm64: kvm: allows kvm cpu hotplug

2015-10-13 Thread James Morse
Hi, On 13/10/15 06:38, AKASHI Takahiro wrote: > On 10/12/2015 10:28 PM, James Morse wrote: >> On 29/05/15 06:38, AKASHI Takahiro wrote: >>> The current kvm implementation on arm64 does cpu-specific initialization >>> at system boot, and has no way to gracefully shutdown

Re: [PATCH] kexec: Add --lite option

2015-12-08 Thread James Morse
Hi Pratyush, On 07/12/15 14:07, Pratyush Anand wrote: > On 07/12/2015:01:16:06 PM, James Morse wrote: >> I haven't benchmarked this, but: >> >> util_lib/sha256.c contains calls out to memcpy(). >> In your case 1, this will use the glibc version. In case 2, it will use

Re: [PATCH] kexec: Add --lite option

2015-12-07 Thread James Morse
Hi Pratyush, On 07/12/15 11:48, Pratyush Anand wrote: >> 1) When we execute kexec() system call in first kernel, at that time it >> calculates sha256 on all the binaries [1]. It take almost un-noticeable time >> (less than a sec) there. >> >> 2) When purgatory is executed then it re-calculates

Re: [PATCH v12 08/16] arm64/kexec: Add core kexec support

2015-12-16 Thread James Morse
On 16/12/15 07:18, Pratyush Anand wrote: > On 15/12/2015:04:14:30 PM, Geoff Levand wrote: >> On Tue, 2015-12-15 at 18:29 +, Will Deacon wrote: +> > > > * Copy arm64_relocate_new_kernel to the reboot_code_buffer for use +> > > > * after the kernel is shut down.

Re: [PATCH v17 02/13] arm64: Add cpus_are_stuck_in_kernel

2016-06-09 Thread James Morse
Hi Geoff, On 03/06/16 19:13, Geoff Levand wrote: > From: James Morse <james.mo...@arm.com> > > kernel/smp.c has a fancy counter that keeps track of the number of CPUs > it marked as not-present and left in cpu_park_loop(). If there are any > CPUs spinning in here, kexec w

Re: [PATCH v17 01/13] arm64: Add back cpu reset routines

2016-06-09 Thread James Morse
> > +2: cmp x0, #HVC_SOFT_RESTART > + b.ne3f > + mov x0, x2 > + mov x2, x4 > + mov x4, x1 > + mov x1, x3 > + blr x4 blr not branch? If we ever did return from here, wouldn't we run the 'entry' function again at EL1? >

Re: [PATCH v18 03/13] arm64/kexec: Add core kexec support

2016-06-15 Thread James Morse
Hi Geoff, Looks good, I have a few observations and questions below. On 09/06/16 21:08, 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. > >

Re: [PATCH v18 04/13] arm64/kexec: Add pr_debug output

2016-06-15 Thread James Morse
Hi Geoff, On 09/06/16 21:08, Geoff Levand wrote: > To aid in debugging kexec problems or when adding new functionality to kexec > add > a new routine kexec_image_info() and several inline pr_debug statements. > > Signed-off-by: Geoff Levand > --- >

Re: [PATCH v19 03/13] arm64/kexec: Add core kexec support

2016-06-20 Thread James Morse
ly worth a comment). This looks like it is need because we hard-coded KEXEC_CONTROL_PAGE_SIZE in kexec.h, so the code must be smaller than that size. It looks like this value is only ever passed to get_order(), could we just pass the actual size? It shouldn't ma

Re: [PATCH v19 06/13] arm64: kdump: reserve memory for crash dump kernel

2016-06-20 Thread James Morse
else > +static void __init reserve_crashkernel(void) > +{ > + ; > +} > +#endif /* CONFIG_KEXEC_CORE */ > + > /* > * Return the maximum physical address for ZONE_DMA (DMA_BIT_MASK(32)). It > * currently assumes that for memory starting above 4G, 32-bit devices will &g

Re: [PATCH v19 05/13] arm64/kexec: Add pr_debug output

2016-06-20 Thread James Morse
get_user(maybe_dtb_addr,.. has gone, I don't think we need this header. > > #include > #include Reviewed-by: James Morse <james.mo...@arm.com> Thanks, James ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCH v20 04/14] arm64/kexec: Add core kexec support

2016-06-27 Thread James Morse
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' pa

Re: [PATCH 16/19] arm64: kdump: add kdump support

2016-01-21 Thread James Morse
Hi! On 15/01/16 19:18, Geoff Levand wrote: > From: AKASHI Takahiro > > On crash dump kernel, all the information about primary kernel's core > image is available in elf core header specified by "elfcorehdr=" boot > parameter. reserve_elfcorehdr() will set aside the

Re: [PATCH 04/19] arm64: Cleanup SCTLR flags

2016-01-25 Thread James Morse
Hi Geoff, On 15/01/16 19:18, Geoff Levand wrote: > We currently have macros defining flags for the arm64 sctlr registers in both > kvm_arm.h and sysreg.h. To clean things up and simplify move the definitions > of the SCTLR_EL2 flags from kvm_arm.h to sysreg.h, rename any SCTLR_EL1 or > SCTLR_EL2

Re: [PATCH 10/19] arm64: kvm: allows kvm cpu hotplug

2016-01-26 Thread James Morse
Hi! On 15/01/16 19:18, Geoff Levand wrote: > From: AKASHI Takahiro > > The current kvm implementation on arm64 does cpu-specific initialization > at system boot, and has no way to gracefully shutdown a core in terms of > kvm. This prevents, especially, kexec from

Re: [PATCH 03/19] arm64: Add new asm macro copy_page

2016-01-20 Thread James Morse
Hi Geoff, On 15/01/16 19:18, Geoff Levand wrote: Can I donate a commit message: Kexec and hibernate need to copy pages of memory, but may not have all of the kernel mapped, and are unable to call copy_page(). Convert copy_page() to a macro, so that it can be inlined in these situations. >

Re: [PATCH v14 14/20] arm64/kexec: Add pr_debug output

2016-03-11 Thread James Morse
Hi Geoff, On 04/03/16 23:51, Geoff Levand wrote: > To aid in debugging kexec problems or when adding new functionality to kexec > add > a new routine kexec_image_info() and several inline pr_debug statements. > > Signed-off-by: Geoff Levand [ ... snip ...] > +/** > + *

Re: [PATCH v14 12/20] arm64/kexec: Add core kexec support

2016-03-11 Thread James Morse
Hi Geoff, On 04/03/16 23:51, 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. > > Signed-off-by: Geoff Levand > diff

Re: [PATCH v15 15/20] arm64: kdump: reserve memory for crash dump kernel

2016-03-19 Thread James Morse
Hi! On 14/03/16 17:48, Geoff Levand wrote: > From: AKASHI Takahiro > > On the startup of primary kernel, the memory region used by crash dump > kernel must be specified by "crashkernel=" kernel parameter. > reserve_crashkernel() will allocate and reserve the region

Re: [PATCH v15 17/20] arm64: kdump: implement machine_crash_shutdown()

2016-03-19 Thread James Morse
Hi! On 14/03/16 17:48, Geoff Levand wrote: > From: AKASHI Takahiro > > Primary kernel calls machine_crash_shutdown() to shut down non-boot cpus > and save registers' status in per-cpu ELF notes before starting crash > dump kernel. See kernel_kexec(). > Even if not

Re: [PATCH v15 17/20] arm64: kdump: implement machine_crash_shutdown()

2016-03-21 Thread James Morse
Hi! On 18/03/16 18:08, James Morse wrote: > On 14/03/16 17:48, Geoff Levand wrote: >> From: AKASHI Takahiro <takahiro.aka...@linaro.org> >> >> Primary kernel calls machine_crash_shutdown() to shut down non-boot cpus >> and save registers' status in per-cpu ELF no

Re: [PATCH v15 17/20] arm64: kdump: implement machine_crash_shutdown()

2016-03-31 Thread James Morse
On 31/03/16 08:46, AKASHI Takahiro wrote: > James Morse wrote: > > This made me jump: irq_exit() may end up in the __do_softirq() (with irqs > > turned > > back on!) ... but these lines are impossible to reach. Maybe get the > > compiler to > > enforce this with

Re: [PATCH v22 2/8] arm64: limit memory regions based on DT property, usable-memory-range

2016-07-22 Thread James Morse
Hi, On 21/07/16 01:57, AKASHI Takahiro wrote: > Could you please apply the diff attached below and confirm that > kdump works in your environment? > I can't test it by myself since my hikey board seems to be broken now. With this I get a failure even earlier, even with 'acpi=off'. With this

Re: [PATCH v24 5/9] arm64: kdump: add kdump support

2016-08-10 Thread James Morse
Hi Akashi, On 09/08/16 02:56, AKASHI Takahiro wrote: > On crash dump kernel, all the information about primary kernel's system > memory (core image) is available in elf core header. > The primary kernel will set aside this header with reserve_elfcorehdr() > at boot time and inform crash dump

Re: [PATCH v24 2/9] memblock: add memblock_cap_memory_range()

2016-08-10 Thread James Morse
h) fixes the acpi related unaligned access problem I had. I've tested it on a Juno r1 and Seattle B0. Tested-by: James Morse <james.mo...@arm.com> Thanks, James ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCH v22 2/8] arm64: limit memory regions based on DT property, usable-memory-range

2016-07-18 Thread James Morse
Hi! (CC: Dennis Chen) On 12/07/16 06:05, AKASHI Takahiro wrote: > Crash dump kernel will be run with a limited range of memory as System > RAM. > > On arm64, we will use a device-tree property under /chosen, >linux,usable-memory-range = > in order for primary kernel either on uefi or

Re: [PATCH v20 04/14] arm64/kexec: Add core kexec support

2016-06-27 Thread James Morse
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 >

Re: [PATCH v20 01/14] arm64: hibernate: Don't hibernate on systems with stuck CPUs

2016-06-27 Thread James Morse
Hi On 23/06/16 18:54, Geoff Levand wrote: > From: James Morse <james.mo...@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 ther

Re: [PATCH v22 2/8] arm64: limit memory regions based on DT property, usable-memory-range

2016-08-09 Thread James Morse
Hi Akashi, Sorry for the late response, (I was on holiday last week...) On 04/08/16 07:21, AKASHI Takahiro wrote: > On Mon, Jul 25, 2016 at 02:27:55PM +0900, AKASHI Takahiro wrote: >> On Fri, Jul 22, 2016 at 02:55:02PM +0100, James Morse wrote: >>> On 21/07/16 01:57, AKA

Re: [PATCH v24 5/9] arm64: kdump: add kdump support

2016-08-16 Thread James Morse
Hi Pratyush, On 11/08/16 11:03, Pratyush Anand wrote: > On 10/08/2016:11:48:27 PM, Pratyush Anand wrote: >> On 10/08/2016:05:38:05 PM, James Morse wrote: >>> =%<= >>> diff --git a/arch/arm64/kernel/crash_dump.c b/

[PATCH] fixup! arm64: kdump: add kdump support

2016-08-17 Thread James Morse
to indicate whether oldmem pages are ram or not. Use this to look for our earlier handiwork in memblock. Signed-off-by: James Morse <james.mo...@arm.com> --- Hi Pratyush, I couldn't get makedumpfile to build, or rather it depends on elfutils which wouldn't build for autotools reasons. Does implem

Re: [PATCH v31 05/12] arm64: kdump: protect crash dump kernel memory

2017-02-02 Thread James Morse
Hi Akashi, Mark, On 01/02/17 18:25, Mark Rutland wrote: > On Wed, Feb 01, 2017 at 06:00:08PM +, Mark Rutland wrote: >> On Wed, Feb 01, 2017 at 09:46:24PM +0900, AKASHI Takahiro wrote: >>> arch_kexec_protect_crashkres() and arch_kexec_unprotect_crashkres() >>> are meant to be called around

Re: [PATCH v30 05/11] arm64: kdump: protect crash dump kernel memory

2017-01-27 Thread James Morse
Hi Akashi, On 26/01/17 11:28, AKASHI Takahiro wrote: > On Wed, Jan 25, 2017 at 05:37:38PM +0000, James Morse wrote: >> On 24/01/17 08:49, AKASHI Takahiro wrote: >>> To protect the memory reserved for crash dump kernel once after loaded, >>> arch_kexec_protect_

Re: [PATCH v30 05/11] arm64: kdump: protect crash dump kernel memory

2017-01-27 Thread James Morse
Hi Akashi, On 24/01/17 08:49, AKASHI Takahiro wrote: > To protect the memory reserved for crash dump kernel once after loaded, > arch_kexec_protect_crashres/unprotect_crashres() are meant to deal with > permissions of the corresponding kernel mappings. > > We also have to > - put the region in

Re: [PATCH v30 04/11] arm64: mm: allow for unmapping memory region from kernel mapping

2017-01-25 Thread James Morse
Hi Akashi, On 24/01/17 08:49, AKASHI Takahiro wrote: > The current implementation of create_mapping_late() is only allowed > to modify permission attributes (read-only or read-write) against > the existing kernel mapping. > > In this patch, PAGE_KERNEL_INVALID protection attribute is introduced.

Re: [PATCH v30 05/11] arm64: kdump: protect crash dump kernel memory

2017-01-25 Thread James Morse
Hi Akashi, On 24/01/17 08:49, AKASHI Takahiro wrote: > To protect the memory reserved for crash dump kernel once after loaded, > arch_kexec_protect_crashres/unprotect_crashres() are meant to deal with > permissions of the corresponding kernel mappings. > > We also have to > - put the region in

Re: [PATCH v32 06/13] arm64: kdump: protect crash dump kernel memory

2017-02-17 Thread James Morse
nd putting the freed memory back to buddy system. This shrinking means memory marked memblock:reserve gets used by the slab allocator. This makes me feel uneasy, but I agree its not going to break anything, and we can't easily un-reserve it. The temporary no-map when building the linear map is a neat trick

Re: [PATCH v32 07/13] arm64: hibernate: preserve kdump image around hibernation

2017-02-15 Thread James Morse
t; before/after hibernation so that the relevant region will be mapped again > and restored just as the other memory regions are. Reviewed-by: James Morse <james.mo...@arm.com> A quick test of this took longer than expected (writing to a slow usb device), I suspect it is save/restoring the w

Re: [PATCH V2 1/2] kexec: arm64: create identity page table to be used in purgatory

2017-01-17 Thread James Morse
Hi Pratyush, On 19/12/16 07:13, Pratyush Anand wrote: > Purgatory sha verification is very slow when D-cache is not enabled there. > We need to enable MMU as well to enable D-Cache.Therefore,we need to an > identity mapped page table in purgatory. > > Since debugging is very difficult in

Re: [PATCH v24 5/9] arm64: kdump: add kdump support

2016-08-19 Thread James Morse
On 19/08/16 02:26, AKASHI Takahiro wrote: > Can you try the following change? > If it fixes your problem, I will post it as a patch. Almost! This causes booting with acpi=on to fail for the familiar alignment-fault reasons[2], details and a suggested fix below. I think we should have this change

Re: [PATCH] fixup! arm64: kdump: add kdump support

2016-08-19 Thread James Morse
On 19/08/16 09:00, Pratyush Anand wrote: > On 17/08/2016:04:33:31 PM, James Morse wrote: >> copy_oldmem_page() and mmap_vmcore() provide two ways for userspace to read >> from /proc/vmcore. Neither of these check with memblock to see if the page >> they are accessing

Re: [PATCH v24 5/9] arm64: kdump: add kdump support

2016-08-22 Thread James Morse
On 22/08/16 02:29, AKASHI Takahiro wrote: > On Fri, Aug 19, 2016 at 04:52:17PM +0530, Pratyush Anand wrote: >> It will help kexec-tools to prevent copying of any unnecessary data. I >> think, then you also need to change phys_offset calculation in kexec-tools. >> That >> should be start of

Re: [PATCH v24 5/9] arm64: kdump: add kdump support

2016-08-24 Thread James Morse
Hi Dave, On 24/08/16 09:04, Dave Young wrote: > Looking the arm-init.c, I suspect it missed the some efi ranges as > reserved ranges like runtime code and runtime data etc. But I might be > wrong. This had me confused for too... I think I get it, my understanding is: > static __init int

Re: [PATCH v26 2/7] arm64: kdump: implement machine_crash_shutdown()

2016-09-14 Thread James Morse
ble(); > + } > + break; > + > #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST > case IPI_TIMER: > irq_enter(); > @@ -910,6 +945,34 @@ void smp_send_stop(void) > cpumask_pr_args(cpu_online_mask)); > } > > +#ifdef CONFIG_KEXEC_CORE > +void smp_send_crash_stop(void) > +{ > + cpumask_t mask; > + unsigned long timeout; > + > + if (num_online_cpus() == 1) > + return; > + > + cpumask_copy(, cpu_online_mask); > + cpumask_clear_cpu(smp_processor_id(), ); > + > + atomic_set(_for_crash_ipi, num_online_cpus() - 1); > + > + pr_crit("SMP: stopping secondary CPUs\n"); > + smp_cross_call(, IPI_CPU_CRASH_STOP); > + > + /* Wait up to one second for other CPUs to stop */ > + timeout = USEC_PER_SEC; > + while ((atomic_read(_for_crash_ipi) > 0) && timeout--) > + udelay(1); > + > + if (atomic_read(_for_crash_ipi) > 0) > + pr_warning("SMP: failed to stop secondary CPUs %*pbl\n", > +cpumask_pr_args(cpu_online_mask)); > +} > +#endif This is very similar to smp_send_stop() which also has the timeout. Is it possible to merge them? You could use in_crash_kexec to choose the IPI type. > + > /* > * not supported here > */ > Reviewed-by: James Morse <james.mo...@arm.com> Thanks, James ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec

Re: [PATCH v26 0/7] arm64: add kdump support

2016-10-04 Thread James Morse
Hi Manish, On 03/10/16 13:41, Manish Jaggi wrote: > On 10/03/2016 04:34 PM, AKASHI Takahiro wrote: >> On Mon, Oct 03, 2016 at 01:24:34PM +0530, Manish Jaggi wrote: >>> With the v26 kdump and v3 kexec-tools and top of tree crash.git, below are >>> the tests done >>> Attached is a patch in

Re: [PATCH v26 0/7] arm64: add kdump support

2016-09-19 Thread James Morse
On 16/09/16 21:17, Ard Biesheuvel wrote: > On 16 September 2016 at 17:04, James Morse <james.mo...@arm.com> wrote: >> Mark, Ard, how does/will reserved-memory work on an APCI only system? > > It works by accident, at the moment. We used to ignore both > /memreserve/s and t

Re: [PATCH v26 3/7] arm64: kdump: add kdump support

2016-09-16 Thread James Morse
ry with > copy_oldmem_page(), which reads one page by ioremap'ing it since it does > not reside in linear mapping on crash dump kernel. > > We also need our own elfcorehdr_read() here since the header is placed > within crash dump kernel's usable memory. One nit below, looks good. Reviewe

Re: [PATCH v26 2/7] arm64: kdump: implement machine_crash_shutdown()

2016-09-16 Thread James Morse
On 16/09/16 04:21, AKASHI Takahiro wrote: > On Wed, Sep 14, 2016 at 07:09:33PM +0100, James Morse wrote: >> On 07/09/16 05:29, AKASHI Takahiro wrote: >>> Primary kernel calls machine_crash_shutdown() to shut down non-boot cpus >>> and save registers' status in per-cp

Re: [PATCH v26 0/7] arm64: add kdump support

2016-09-16 Thread James Morse
(Cc: Ard), Mark, Ard, how does/will reserved-memory work on an APCI only system? On 07/09/16 05:29, AKASHI Takahiro wrote: > v26-specific note: After a comment from Rob[0], an idea of adding > "linux,usable-memory-range" was dropped. Instead, an existing > "reserved-memory" node

Re: [PATCH v26 4/7] arm64: kdump: add VMCOREINFO's for user-space coredump tools

2016-09-16 Thread James Morse
t; This patch puts them as VMCOREINFO's into the file. > > - VA_BITS > is also added for makedumpfile command. > More VMCOREINFO's may be added later. Reviewed-by: James Morse <james.mo...@arm.com> Thanks, James ___ kexec mailing

Re: [PATCH v26 6/7] arm64: kdump: update a kernel doc

2016-09-16 Thread James Morse
Hi Akashi, On 07/09/16 05:29, AKASHI Takahiro wrote: > This patch adds arch specific descriptions about kdump usage on arm64 > to kdump.txt. > diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt > @@ -249,6 +249,13 @@ Dump-capture kernel config options (Arch Dependent,

Re: [PATCH v27 0/9] arm64: add kdump support

2016-11-10 Thread James Morse
combination on Seattle that caused us problems in the past. If its useful: Tested-by: James Morse <james.mo...@arm.com> So the last thing is review/acks on patch 1 "memblock: add memblock_cap_memory_range()"? Thanks, James

Re: [PATCH 1/2] arm64: Add enable/disable d-cache support for purgatory

2016-11-25 Thread James Morse
Hi Pratyush, (CC: Mark, mismatched memory attributes in paragraph 3?) On 22/11/16 04:32, Pratyush Anand wrote: > This patch adds support to enable/disable d-cache, which can be used for > faster purgatory sha256 verification. (I'm not clear why we want the sha256, but that is being discussed

Re: [PATCH 0/2] kexec-tools: arm64: Add dcache enabling facility

2016-11-25 Thread James Morse
Hi guys, On 22/11/16 18:56, Geoff Levand wrote: > On 11/21/2016 08:32 PM, Pratyush Anand wrote: >> It takes more that 2 minutes to verify SHA in purgatory when vmlinuz image >> is around 13MB and initramfs is around 30MB. It takes more than 20 second >> even when we have -O2 optimization enabled.

Re: [PATCH v27 1/9] memblock: add memblock_cap_memory_range()

2016-11-17 Thread James Morse
Hi Will, Akashi, On 17/11/16 11:19, Will Deacon wrote: > It looks much better, thanks! Just one question below. > > On Thu, Nov 17, 2016 at 02:34:24PM +0900, AKASHI Takahiro wrote: >> diff --git a/mm/memblock.c b/mm/memblock.c >> index 7608bc3..fea1688 100644 >> --- a/mm/memblock.c >> +++

Re: [PATCH 1/2] arm64: Add enable/disable d-cache support for purgatory

2016-12-14 Thread James Morse
Hi Pratyush, On 14/12/16 09:38, Pratyush Anand wrote: > On Saturday 26 November 2016 12:00 AM, James Morse wrote: >> On 22/11/16 04:32, Pratyush Anand wrote: >>> This patch adds support to enable/disable d-cache, which can be used for >>> faster purgatory sha256 verific

Re: [PATCH 1/2] arm64: Add enable/disable d-cache support for purgatory

2016-12-14 Thread James Morse
Hi Mark, On 14/12/16 11:37, Mark Rutland wrote: > On Wed, Dec 14, 2016 at 11:16:17AM +0000, James Morse wrote: >> On 14/12/16 10:12, Pratyush Anand wrote: >>> On Wednesday 14 December 2016 03:08 PM, Pratyush Anand wrote: >>>>> I would go as far as to generate t

Re: [PATCH V2 0/2] kexec-tools: arm64: Enable D-cache in purgatory

2017-01-10 Thread James Morse
Hi Pratyush, On 06/01/17 03:31, Pratyush Anand wrote: > Any feedback/review comment on it? I started going through this last week, I hope to get back to it later this week. (I also need to learn/remember how some of the kexec-tools stuff works). Thanks, James

Re: [PATCH v33 07/14] arm64: hibernate: preserve kdump image around hibernation

2017-03-21 Thread James Morse
've given this a spin on Juno and Seattle, I even added debug_pagealloc, but that doesn't trick it because your kexec_prepare_suspend() puts the mapping back. Reviewed-by: James Morse <james.mo...@arm.com> Thanks, James Some nits about comments: > diff --git a/arch/arm64/kernel/hibern

Re: [PATCH v33 05/14] arm64: mm: allow for unmapping part of kernel mapping

2017-03-21 Thread James Morse
pte_clear(null, null, pte); Lowercase NULLs? This relies on these values never being used... __set_fixmap() in the same file passes _mm and the address, can we do the same to be consistent? > pfn++; > > /* Reviewed-by: James Morse <james.mo...@arm.co

Re: [PATCH v3 1/2] kexec: arm64: create identity page table to be used in purgatory

2017-06-02 Thread James Morse
Hi Pratyush, On 23/05/17 06:02, Pratyush Anand wrote: > Purgatory sha verification is very slow when D-cache is not enabled there. > We need to enable MMU as well to enable D-Cache.Therefore,we need to > have an identity mapped page table in purgatory. > > Since debugging is very difficult in

Re: [PATCH v3 0/2] kexec-tools: arm64: Enable D-cache in purgatory

2017-06-02 Thread James Morse
Hi Pratyush, On 23/05/17 06:02, Pratyush Anand wrote: > It takes more that 2 minutes to verify SHA in purgatory when vmlinuz image > is around 13MB and initramfs is around 30MB. It takes more than 20 second > even when we have -O2 optimization enabled. However, if dcache is enabled > during

Re: [PATCH v3 0/2] kexec-tools: arm64: Enable D-cache in purgatory

2017-06-02 Thread James Morse
Hi Bhupesh, On 02/06/17 12:15, Bhupesh SHARMA wrote: > On Fri, Jun 2, 2017 at 3:25 PM, Ard Biesheuvel > <ard.biesheu...@linaro.org> wrote: >> On 2 June 2017 at 08:23, James Morse <james.mo...@arm.com> wrote: >>> On 23/05/17 06:02, Pratyush Anand wrote: >>&g

Re: [PATCH v9 06/11] arm64: kexec_file: allow for loading Image-format kernel

2018-05-11 Thread James Morse
Hi Akashi, On 07/05/18 08:21, AKASHI Takahiro wrote: > On Tue, May 01, 2018 at 06:46:11PM +0100, James Morse wrote: >> On 25/04/18 07:26, AKASHI Takahiro wrote: >>> This patch provides kexec_file_ops for "Image"-format kernel. In this >>> implementation, a

Re: [PATCH v9 03/11] arm64: kexec_file: invoke the kernel without purgatory

2018-05-11 Thread James Morse
Hi Akashi, On 07/05/18 06:22, AKASHI Takahiro wrote: > On Tue, May 01, 2018 at 06:46:06PM +0100, James Morse wrote: >> On 25/04/18 07:26, AKASHI Takahiro wrote: >>> diff --git a/arch/arm64/kernel/machine_kexec.c >>> b/arch/arm64/kernel/machine_kexec.c >>> ind

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-16 Thread James Morse
Hi Akashi, On 15/05/18 18:11, James Morse wrote: > On 25/04/18 07:26, AKASHI Takahiro wrote: >> Enabling crash dump (kdump) includes >> * prepare contents of ELF header of a core dump file, /proc/vmcore, >> using crash_prepare_elf64_headers(), and >> * add two dev

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-16 Thread James Morse
Hi Akashi, On 15/05/18 18:11, James Morse wrote: > On 25/04/18 07:26, AKASHI Takahiro wrote: >> Enabling crash dump (kdump) includes >> * prepare contents of ELF header of a core dump file, /proc/vmcore, >> using crash_prepare_elf64_headers(), and >> * add two dev

Re: [PATCH v9 04/11] arm64: kexec_file: allocate memory walking through memblock list

2018-05-15 Thread James Morse
Hi Akashi, On 15/05/18 05:35, AKASHI Takahiro wrote: > On Mon, May 07, 2018 at 02:59:07PM +0900, AKASHI Takahiro wrote: >> On Tue, May 01, 2018 at 06:46:09PM +0100, James Morse wrote: >>> On 25/04/18 07:26, AKASHI Takahiro wrote: >>>> We need to prevent fi

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-15 Thread James Morse
Hi guys, (CC: +RobH, devicetree list) On 25/04/18 07:26, AKASHI Takahiro wrote: > Enabling crash dump (kdump) includes > * prepare contents of ELF header of a core dump file, /proc/vmcore, > using crash_prepare_elf64_headers(), and > * add two device tree properties,

Re: [PATCH v9 05/11] arm64: kexec_file: load initrd and device-tree

2018-05-15 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > load_other_segments() is expected to allocate and place all the necessary > memory segments other than kernel, including initrd and device-tree > blob (and elf core header for crash). > While most of the code was borrowed from kexec-tools'

Re: [PATCH v9 06/11] arm64: kexec_file: allow for loading Image-format kernel

2018-05-15 Thread James Morse
Hi Akashi, On 15/05/18 06:13, AKASHI Takahiro wrote: > On Fri, May 11, 2018 at 06:07:06PM +0100, James Morse wrote: >> On 07/05/18 08:21, AKASHI Takahiro wrote: >>> On Tue, May 01, 2018 at 06:46:11PM +0100, James Morse wrote: >>>> On 25/04/18 07:26, AKASHI Ta

Re: [PATCH v9 04/11] arm64: kexec_file: allocate memory walking through memblock list

2018-05-17 Thread James Morse
Hi Baoquan, On 17/05/18 03:15, Baoquan He wrote: > On 05/17/18 at 10:10am, Baoquan He wrote: >> On 05/07/18 at 02:59pm, AKASHI Takahiro wrote: >>> On Tue, May 01, 2018 at 06:46:09PM +0100, James Morse wrote: >>>> On 25/04/18 07:26, AKASHI Takahiro wrote: >>>

Re: [PATCH v9 05/11] arm64: kexec_file: load initrd and device-tree

2018-05-18 Thread James Morse
Hi Akashi, On 18/05/18 08:42, AKASHI Takahiro wrote: > On Fri, May 18, 2018 at 04:11:35PM +0900, AKASHI Takahiro wrote: >> On Tue, May 15, 2018 at 05:20:00PM +0100, James Morse wrote: >>> On 25/04/18 07:26, AKASHI Takahiro wrote: >>>> diff --git a/arch/arm64/kerne

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-18 Thread James Morse
Hi Akashi, On 18/05/18 11:39, AKASHI Takahiro wrote: > On Tue, May 15, 2018 at 06:11:15PM +0100, James Morse wrote: >> On 25/04/18 07:26, AKASHI Takahiro wrote: >>> Enabling crash dump (kdump) includes >>> * prepare contents of ELF header of a core dump file

Re: [PATCH v9 03/11] arm64: kexec_file: invoke the kernel without purgatory

2018-05-15 Thread James Morse
Hi Akashi, On 15/05/18 05:45, AKASHI Takahiro wrote: > On Fri, May 11, 2018 at 06:03:49PM +0100, James Morse wrote: >> On 07/05/18 06:22, AKASHI Takahiro wrote: >>> On Tue, May 01, 2018 at 06:46:06PM +0100, James Morse wrote: >>>> On 25/04/18 07:26, AKASHI Takahiro

Re: [PATCH v9 07/11] arm64: kexec_file: add crash dump support

2018-05-15 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > Enabling crash dump (kdump) includes > * prepare contents of ELF header of a core dump file, /proc/vmcore, > using crash_prepare_elf64_headers(), and > * add two device tree properties, "linux,usable-memory-range" and >

Re: panic kexec broken on ARM64?

2018-06-06 Thread James Morse
Hi Stefan, On 06/06/18 08:02, Stefan Wahren wrote: > Am 05.06.2018 um 19:46 schrieb James Morse: >> On 05/06/18 09:01, Petr Tesarik wrote: >>> I attached a hardware debugger and found >>> out that all CPU cores were stopped except one which was stuck in th

Re: [PATCH] arm64/mm: Introduce a variable to hold base address of linear region

2018-06-12 Thread James Morse
Hi Bhupesh, Ard, On 12/06/18 09:25, Bhupesh Sharma wrote: > On Tue, Jun 12, 2018 at 12:23 PM, Ard Biesheuvel > wrote: >> On 12 June 2018 at 08:36, Bhupesh Sharma wrote: >>> The start of the linear region map on a KASLR enabled ARM64 machine - >>> which supports a compatible EFI firmware (with

Re: [PATCH] arm64/mm: Introduce a variable to hold base address of linear region

2018-06-13 Thread James Morse
Hi Bhupesh, On 13/06/18 06:16, Bhupesh Sharma wrote: > On Tue, Jun 12, 2018 at 3:42 PM, James Morse wrote: >> On 12/06/18 09:25, Bhupesh Sharma wrote: >>> On Tue, Jun 12, 2018 at 12:23 PM, Ard Biesheuvel wrote: >>>> Userland code that assumes that the

Re: [PATCH] arm64/mm: Introduce a variable to hold base address of linear region

2018-06-14 Thread James Morse
Hi Bhupesh, On 14/06/18 08:53, Bhupesh Sharma wrote: > On Wed, Jun 13, 2018 at 3:59 PM, James Morse wrote: >> On 13/06/18 06:16, Bhupesh Sharma wrote: >>> On Tue, Jun 12, 2018 at 3:42 PM, James Morse wrote: >>>> If I've followed this properly: the probl

Re: [PATCH 2/3] arm64: acpi,efi: fix alignment fault in accessing ACPI tables at kdump

2018-06-15 Thread James Morse
Hi Akashi, On 15/06/18 08:56, AKASHI Takahiro wrote: > This is a fix against the issue that crash dump kernel may hang up > during booting, which can happen on any ACPI-based system with "ACPI > Reclaim Memory." > > (kernel messages after panic kicked off kdump) > (snip...) > Bye!

Re: [PATCH 0/3] arm64: kexec,kdump: fix boot failures on acpi-only system

2018-06-15 Thread James Morse
Hi Akashi, Thanks for putting this together, On 15/06/18 08:56, AKASHI Takahiro wrote: > This patch series is a set of bug fixes to address kexec/kdump > failures which are sometimes observed on ACPI-only system and reported > in LAK-ML before. > > In short, the phenomena are: > 1. kexec'ed

Re: panic kexec broken on ARM64?

2018-06-05 Thread James Morse
Hi Petr, (CC: +Akashi, Marc) On 05/06/18 09:01, Petr Tesarik wrote: > I have observed hangs after crash on a Raspberry Pi 3 Model B+ board > when a panic kernel is loaded. kdump is a best-effort thing, it looks like this is a case where the crashed-kernel can't tear itself down. Do you have

Re: [PATCH v2 1/4] arm64: export memblock_reserve()d regions via /proc/iomem

2018-06-19 Thread James Morse
Hi Dave, On 19/06/18 14:37, Dave Kleikamp wrote: > On 06/19/2018 01:44 AM, AKASHI Takahiro wrote: >> +static int __init reserve_memblock_reserved_regions(void) >> +{ >> +phys_addr_t start, end, roundup_end = 0; >> +struct resource *mem, *res; >> +u64 i; >> + >> +

Re: [PATCH v9 04/11] arm64: kexec_file: allocate memory walking through memblock list

2018-05-01 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > We need to prevent firmware-reserved memory regions, particularly EFI > memory map as well as ACPI tables, from being corrupted by loading > kernel/initrd (or other kexec buffers). We also want to support memory > allocation in top-down

Re: [PATCH v9 03/11] arm64: kexec_file: invoke the kernel without purgatory

2018-05-01 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > On arm64, purugatory would do almosty nothing. So just invoke secondary > kernel directy by jumping into its entry code. (Nits: purgatory, almost, directly) > While, in this case, cpu_soft_restart() must be called with dtb address > in the

Re: [PATCH v9 02/11] kexec_file: make kexec_image_post_load_cleanup_default() global

2018-05-01 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > Change this function from static to global so that arm64 can implement > its own arch_kimage_file_post_load_cleanup() later using > kexec_image_post_load_cleanup_default(). Do we need to call kexec_image_post_load_cleanup_default()? All it

Re: [PATCH v9 06/11] arm64: kexec_file: allow for loading Image-format kernel

2018-05-01 Thread James Morse
Hi Akashi, On 25/04/18 07:26, AKASHI Takahiro wrote: > This patch provides kexec_file_ops for "Image"-format kernel. In this > implementation, a binary is always loaded with a fixed offset identified > in text_offset field of its header. > diff --git a/arch/arm64/include/asm/kexec.h

Re: [PATCH] arm64: kdump: retain reserved memory regions

2018-01-10 Thread James Morse
Hi Akashi, On 10/01/18 10:09, AKASHI Takahiro wrote: > This is a fix against the issue that crash dump kernel may hang up > during booting, which can happen on any ACPI-based system with "ACPI > Reclaim Memory." > > > Bye! > (snip...) > ACPI: Core revision 20170728 >

Re: [PATCH] arm64: kdump: retain reserved memory regions

2018-01-19 Thread James Morse
Hi Akashi, On 11/01/18 11:38, AKASHI Takahiro wrote: > On Wed, Jan 10, 2018 at 11:26:55AM +0000, James Morse wrote: >> On 10/01/18 10:09, AKASHI Takahiro wrote: >>> This is a fix against the issue that crash dump kernel may hang up >>> during booting, which can happ

Re: [PATCH][v2] arm64: Allocate elfcorehdr & crashkernel mem before any reservation

2018-01-19 Thread James Morse
Hello, On 16/01/18 07:07, takahiro.aka...@linaro.org wrote: > On Mon, Jan 15, 2018 at 10:14:05AM +0530, Bhupesh SHARMA wrote: >> On Sat, Jan 13, 2018 at 8:37 AM, Poonam Aggrwal >> wrote: On 08/01/18 04:31, Poonam Aggrwal wrote: > Yeah, this is a good point. So

Re: [PATCH v7 03/11] kexec_file: factor out crashdump elf header function from x86

2018-02-07 Thread James Morse
Hi Akashi, On 04/12/17 02:57, AKASHI Takahiro wrote: > prepare_elf_headers() can also be useful for other architectures, > including arm64. What does arm64 need this for? This is generating ELF headers for something, but I can't work out what. (I'll keep reading,...) The x86 decompressor? arm64

Re: [PATCH v7 00/11] arm64: kexec: add kexec_file_load() support

2018-02-07 Thread James Morse
Hi Akashi, I'm still getting my head round how all this works, so please forgive what may be stupid questions! On 04/12/17 02:57, AKASHI Takahiro wrote: > This is the seventh round of implementing kexec_file_load() support > on arm64.[1] > Most of the code is based on kexec-tools (along with

Re: [PATCH v7 05/11] arm64: kexec_file: create purgatory

2018-02-07 Thread James Morse
Hi Akashi, On 04/12/17 02:57, AKASHI Takahiro wrote: > This is a basic purgatory, or a kind of glue code between the two kernels, > for arm64. > > Since purgatory is assumed to be relocatable (not executable) object by > kexec generic code, arch_kexec_apply_relocations_add() is required in >

Re: [PATCH] arm64/mm: Introduce a variable to hold base address of linear region

2018-06-19 Thread James Morse
Hi Bhupesh, On 19/06/18 11:37, Bhupesh Sharma wrote: > On Tue, Jun 19, 2018 at 3:46 PM, James Morse wrote: >> On 19/06/18 10:57, Jin, Yanjiang wrote: >>>> -Original Message- >>>> From: Will Deacon [mailto:will.dea...@arm.com] >>>> Sent: 201

Re: [PATCH] arm64/mm: Introduce a variable to hold base address of linear region

2018-06-19 Thread James Morse
Hi Yanjiang, Will, On 19/06/18 10:57, Jin, Yanjiang wrote: >> -Original Message- >> From: Will Deacon [mailto:will.dea...@arm.com] >> Sent: 2018年6月19日 17:41 >> To: Jin, Yanjiang >> Cc: James Morse ; Bhupesh Sharma >> ; Mark Rutland ; Ard >> Biesh

Re: [PATCH v2] arm64, kaslr: export offset in VMCOREINFO ELF notes

2018-07-31 Thread James Morse
o work with cases where we need to find a way to > translate symbol address from vmlinux to kernel run time address > in case of KASLR boot on arm64. Acked-by: James Morse If we want to send this to stable, it looks like it should have been part of the KASLR series, f80fb3a3d5084 (&qu

  1   2   3   >