Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-23 Thread Masami Hiramatsu
(2015/03/23 23:31), Vivek Goyal wrote: [...] Secondly, and more importantly, the whole premise of commit f06e5153f4ae is broken IMHO: "This can help rare situations where kdump fails because of unstable crashed kernel or hardware failure (memory corruption on critical >

Re: Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-23 Thread Masami Hiramatsu
(2015/03/23 16:19), Ingo Molnar wrote: > > * Baoquan He wrote: > >> CC more people ... >> >> On 03/07/15 at 01:31am, "Hatayama, Daisuke/畑山 大輔" wrote: >>> The commit f06e5153f4ae2e2f3b0300f0e260e40cb7fefd45 introduced >>> "crash_kexec_post_notifiers" kernel boot option, which toggles >>> wheather

Re: [RFC 1/4] arm64: kvm: add a cpu tear-down function

2015-03-23 Thread Geoff Levand
Hi Takahiro, On Mon, 2015-03-23 at 20:53 +0900, AKASHI Takahiro wrote: > diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c > index 3e6859b..428f41c 100644 > --- a/arch/arm/kvm/mmu.c > +++ b/arch/arm/kvm/mmu.c ... > +phys_addr_t kvm_get_stub_vectors(void) > +{ > + return virt_to_phys(__hyp

Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-23 Thread Don Zickus
On Mon, Mar 23, 2015 at 10:31:58AM -0400, Vivek Goyal wrote: > > > I think one of the motivations behind this patch was call to kmsg_dump(). > > > Some vendors have been wanting to have the capability to save kernel logs > > > to some NVRAM before transition to second kernel happens. Their argument

Re: [RFC 2/4] arm64: kexec: fix kvm issue

2015-03-23 Thread Geoff Levand
On Mon, 2015-03-23 at 20:53 +0900, AKASHI Takahiro wrote: > The current kvm implementation keeps EL2 vector table installed even > when the system is shut down. This prevents kexec from putting the system > with kvm back into EL2 when starting a new kernel. This is a kvm bug fix, so I think the su

Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-23 Thread Vivek Goyal
On Mon, Mar 23, 2015 at 08:19:43AM +0100, Ingo Molnar wrote: > > * Baoquan He wrote: > > > CC more people ... > > > > On 03/07/15 at 01:31am, "Hatayama, Daisuke/畑山 大輔" wrote: > > > The commit f06e5153f4ae2e2f3b0300f0e260e40cb7fefd45 introduced > > > "crash_kexec_post_notifiers" kernel boot opti

Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-23 Thread Vivek Goyal
On Mon, Mar 23, 2015 at 02:50:46PM +0100, Ingo Molnar wrote: > > * Vivek Goyal wrote: > > > On Mon, Mar 23, 2015 at 08:19:43AM +0100, Ingo Molnar wrote: > > > > > > * Baoquan He wrote: > > > > > > > CC more people ... > > > > > > > > On 03/07/15 at 01:31am, "Hatayama, Daisuke/畑山 大輔" wrote: >

Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-23 Thread Ingo Molnar
* Vivek Goyal wrote: > On Mon, Mar 23, 2015 at 08:19:43AM +0100, Ingo Molnar wrote: > > > > * Baoquan He wrote: > > > > > CC more people ... > > > > > > On 03/07/15 at 01:31am, "Hatayama, Daisuke/畑山 大輔" wrote: > > > > The commit f06e5153f4ae2e2f3b0300f0e260e40cb7fefd45 introduced > > > > "cr

Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-23 Thread Vivek Goyal
On Mon, Mar 23, 2015 at 08:19:43AM +0100, Ingo Molnar wrote: > > * Baoquan He wrote: > > > CC more people ... > > > > On 03/07/15 at 01:31am, "Hatayama, Daisuke/畑山 大輔" wrote: > > > The commit f06e5153f4ae2e2f3b0300f0e260e40cb7fefd45 introduced > > > "crash_kexec_post_notifiers" kernel boot opti

[RFC 4/4] arm64: kvm: add cpu reset at module exit

2015-03-23 Thread AKASHI Takahiro
This patch doesn't enable kvm to be built as a module, but is a prerequisite when kvm is transformed to be module-capable. Signed-off-by: AKASHI Takahiro --- arch/arm/kvm/arm.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 08804d3..b85

[RFC 1/4] arm64: kvm: add a cpu tear-down function

2015-03-23 Thread AKASHI Takahiro
Cpu must be put back into its initial state, at least, in the following cases in order to shutdown the system and/or re-initialize cpus later on: 1) kexec/kdump 2) cpu hotplug (offline) 3) removing kvm as a module To address those issues in later patches, this patch adds a tear-down function, kvm_

[RFC 3/4] arm64: kvm: add cpu reset hook for cpu hotplug

2015-03-23 Thread AKASHI Takahiro
This patch doesn't enable cpu hotplug under kvm, but is a prerequiste when the feature is implemented. Once kvm_arch_hardware_enable/disable() is properly implemented, arm64-specific cpu notifier hook, hyp_init_cpu_notify(), will be able to be removed and replaced by generic kvm_cpu_hotplug(). Sig

[RFC 2/4] arm64: kexec: fix kvm issue

2015-03-23 Thread AKASHI Takahiro
The current kvm implementation keeps EL2 vector table installed even when the system is shut down. This prevents kexec from putting the system with kvm back into EL2 when starting a new kernel. This patch resolves this issue by calling a cpu tear-down function via reboot notifier, kvm_reboot_notif

[RFC 0/4] arm64: kexec: fix kvm issue in kexec

2015-03-23 Thread AKASHI Takahiro
This patch set addresses KVM issue described in Geoff's kexec patch set. http://lists.infradead.org/pipermail/kexec/2015-March/013432.html The basic approach here is to define a kvm tear-down function and add a reboot hook to gracefully shutdown the 1st kernel. This way, kvm gets free from kex

Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-23 Thread Ingo Molnar
* Baoquan He wrote: > CC more people ... > > On 03/07/15 at 01:31am, "Hatayama, Daisuke/畑山 大輔" wrote: > > The commit f06e5153f4ae2e2f3b0300f0e260e40cb7fefd45 introduced > > "crash_kexec_post_notifiers" kernel boot option, which toggles > > wheather panic() calls crash_kexec() before panic_notif