From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v8 01/11] xen: introduce SHUTDOWN_soft_reset shutdown reason Date: Tue, 7 Jul 2015 16:44:07 -0400 Message-ID: <20150707204407.GC606@l.oracle.com> References: <1435075913-335-1-git-send-email-vkuznets@redhat.com> <1435075913-335-2-git-send-email-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZCZj9-0007Q8-8L for xen-devel@lists.xenproject.org; Tue, 07 Jul 2015 20:44:27 +0000 Content-Disposition: inline In-Reply-To: <1435075913-335-2-git-send-email-vkuznets@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Vitaly Kuznetsov Cc: Wei Liu , Andrew Jones , Keir Fraser , Ian Campbell , Stefano Stabellini , Andrew Cooper , Julien Grall , Ian Jackson , Olaf Hering , Tim Deegan , David Vrabel , Jan Beulich , xen-devel@lists.xenproject.org, Daniel De Graaf List-Id: xen-devel@lists.xenproject.org On Tue, Jun 23, 2015 at 06:11:43PM +0200, Vitaly Kuznetsov wrote: > This special type of shutdown is supposed to be used by PVHVM guests when > they want to perform some sort of kexec/kdump. > > Signed-off-by: Vitaly Kuznetsov Reviewed-by: Konrad Rzeszutek Wilk > --- > xen/common/shutdown.c | 6 ++++++ > xen/include/public/sched.h | 3 ++- > 2 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c > index 9cfbf7a..03a8641 100644 > --- a/xen/common/shutdown.c > +++ b/xen/common/shutdown.c > @@ -66,6 +66,12 @@ void hwdom_shutdown(u8 reason) > machine_restart(0); > break; /* not reached */ > > + case SHUTDOWN_soft_reset: > + printk("Hardware domain %d did unsupported soft reset, rebooting.\n", > + hardware_domain->domain_id); > + machine_restart(0); > + break; /* not reached */ > + > default: > printk("Hardware Dom%u shutdown (unknown reason %u): ", > hardware_domain->domain_id, reason); > diff --git a/xen/include/public/sched.h b/xen/include/public/sched.h > index 4000ac9..705bc52 100644 > --- a/xen/include/public/sched.h > +++ b/xen/include/public/sched.h > @@ -159,7 +159,8 @@ DEFINE_XEN_GUEST_HANDLE(sched_watchdog_t); > #define SHUTDOWN_suspend 2 /* Clean up, save suspend info, kill. */ > #define SHUTDOWN_crash 3 /* Tell controller we've crashed. */ > #define SHUTDOWN_watchdog 4 /* Restart because watchdog time expired. */ > -#define SHUTDOWN_MAX 4 /* Maximum valid shutdown reason. */ > +#define SHUTDOWN_soft_reset 5 /* Domain did soft reset. Clean up and resume.*/ > +#define SHUTDOWN_MAX 5 /* Maximum valid shutdown reason. */ > /* ` } */ > > #endif /* __XEN_PUBLIC_SCHED_H__ */ > -- > 2.4.2 >