|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 01/11] xen: introduce SHUTDOWN_soft_reset shutdown reason
On Thu, Jul 16, 2015 at 06:27:16PM +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 <vkuznets@xxxxxxxxxx>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> ---
> Changes since v8:
> - describe the expected behavior for 'soft reset' [Ian Jackson]
> ---
> xen/common/shutdown.c | 6 ++++++
> xen/include/public/sched.h | 11 ++++++++++-
> 2 files changed, 16 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..b91bb9b 100644
> --- a/xen/include/public/sched.h
> +++ b/xen/include/public/sched.h
> @@ -159,7 +159,16 @@ 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.
> */
> +
> +/*
> + * Domain asked to perform 'soft reset' for it. The expected behavior is to
> + * reset internal Xen state for the domain returning it to the point where it
> + * was created but leaving the domain's memory and vCPU contexts intact. This
> + * will allow the domain to start over and set up all Xen specific interfaces
> + * again.
> + */
> +#define SHUTDOWN_soft_reset 5
> +#define SHUTDOWN_MAX 5 /* Maximum valid shutdown reason.
> */
> /* ` } */
>
> #endif /* __XEN_PUBLIC_SCHED_H__ */
> --
> 2.4.3
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |