]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/xen: Support kexec/kdump in HVM guests by doing a soft reset
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 25 Sep 2015 09:59:52 +0000 (11:59 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 5 Feb 2016 11:43:39 +0000 (03:43 -0800)
commit1ad2a28b04d4267ce29415eee914b295d4d30ab6
tree4488813c55c3d2a9d969a3443c28f4b5a8d3c127
parent068f3ab47e7e0b74587ee61e4ab4dde025a62c87
x86/xen: Support kexec/kdump in HVM guests by doing a soft reset

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.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit 0b34a166f291d255755be46e43ed5497cdd194f2)
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit 1f63233f62ab07bd0617f92b2118fe7475674979)
arch/x86/xen/enlighten.c
include/xen/interface/sched.h