From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com ([91.189.89.112]:48014 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751737AbbJZSIk (ORCPT ); Mon, 26 Oct 2015 14:08:40 -0400 Date: Mon, 26 Oct 2015 18:08:34 +0000 From: Luis Henriques To: Greg KH Cc: David Vrabel , vkuznets@redhat.com, stable@vger.kernel.org, stable-commits@vger.kernel.org Subject: Re: Patch "x86/xen: Support kexec/kdump in HVM guests by doing a soft reset" has been added to the 4.2-stable tree Message-ID: <20151026180834.GA6293@charon> References: <144477715310172@kroah.com> <561E72B0.3080907@citrix.com> <20151014152450.GA6713@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20151014152450.GA6713@kroah.com> Sender: stable-owner@vger.kernel.org List-ID: On Wed, Oct 14, 2015 at 08:24:50AM -0700, Greg Kroah-Hartman wrote: > On Wed, Oct 14, 2015 at 04:20:16PM +0100, David Vrabel wrote: > > On 13/10/15 23:59, gregkh@linuxfoundation.org wrote: > > > > > > This is a note to let you know that I've just added the patch titled > > > > > > x86/xen: Support kexec/kdump in HVM guests by doing a soft reset > > > > > > to the 4.2-stable tree which can be found at: > > > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary > > > > > > The filename of the patch is: > > > x86-xen-support-kexec-kdump-in-hvm-guests-by-doing-a-soft-reset.patch > > > and it can be found in the queue-4.2 subdirectory. > > > > > > If you, or anyone else, feels it should not be added to the stable tree, > > > please let know about it. > > > > > > > > > From 0b34a166f291d255755be46e43ed5497cdd194f2 Mon Sep 17 00:00:00 2001 > > > From: Vitaly Kuznetsov > > > Date: Fri, 25 Sep 2015 11:59:52 +0200 > > > Subject: x86/xen: Support kexec/kdump in HVM guests by doing a soft reset > > > > > > From: Vitaly Kuznetsov > > > > > > commit 0b34a166f291d255755be46e43ed5497cdd194f2 upstream. > > > > > > Currently there is a number of issues preventing PVHVM Xen guests from > > > doing successful kexec/kdump: > > > > > > - Bound event channels. > > > - Registered vcpu_info. > > > - PIRQ/emuirq mappings. > > > - shared_info frame after XENMAPSPACE_shared_info operation. > > > - Active grant mappings. > > > > > > Basically, newly booted kernel stumbles upon already set up Xen > > > interfaces and there is no way to reestablish them. In Xen-4.7 a new > > > feature called 'soft reset' is coming. A guest performing kexec/kdump > > > operation is supposed to call SCHEDOP_shutdown hypercall with > > > SHUTDOWN_soft_reset reason before jumping to new kernel. Hypervisor > > > (with some help from toolstack) will do full domain cleanup (but > > > keeping its memory and vCPU contexts intact) returning the guest to > > > the state it had when it was first booted and thus allowing it to > > > start over. > > > > > > Doing SHUTDOWN_soft_reset on Xen hypervisors which don't support it is > > > probably OK as by default all unknown shutdown reasons cause domain > > > destroy with a message in toolstack log: 'Unknown shutdown reason code > > > 5. Destroying domain.' which gives a clue to what the problem is and > > > eliminates false expectations. > > [...] > > > --- a/arch/x86/xen/enlighten.c > > > +++ b/arch/x86/xen/enlighten.c > > > @@ -33,6 +33,10 @@ > > > #include > > > #include > > > > > > +#ifdef CONFIG_KEXEC_CORE > > > +#include > > > +#endif > > > + > > > #include > > > #include > > > #include > > > @@ -1800,6 +1804,21 @@ static struct notifier_block xen_hvm_cpu > > > .notifier_call = xen_hvm_cpu_notify, > > > }; > > > > > > +#ifdef CONFIG_KEXEC_CORE > > > > This should be CONFIG_KEXEC in 4.2 and earlier, CONFIG_EXEC_CORE was > > introduced in 4.3. > > > > Do you want an updated patch? > > An updated patch would be great, thanks. I'm queuing this patch changing CONFIG_KEXEC_CORE by CONFIG_KEXEC, as suggested. Thanks! Greg, looks like several stable kernels have been released with this bogus patch. Cheers, -- Lu�s