[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC v1 65/74] xen/shim: crash instead of reboot in shim mode



>>> On 04.01.18 at 14:06, <wei.liu2@xxxxxxxxxx> wrote:
> From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
> 
> All guest shutdown operations are forwarded to L0, so the only native
> calls to machine_restart happen from crash related paths inside the
> hypervisor, hence switch the reboot code to instead issue a crash
> shutdown.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
preferably with ...

> --- a/xen/arch/x86/shutdown.c
> +++ b/xen/arch/x86/shutdown.c
> @@ -642,6 +642,13 @@ void machine_restart(unsigned int delay_millisecs)
>              break;
>  
>          case BOOT_XEN:
> +            if ( pv_shim )
> +                /*
> +                 * When running in PV shim mode guest shutdown calls are
> +                 * forwarded to L0, hence the only way to get here is if a
> +                 * shim crash happens.
> +                 */
> +                xen_hypercall_shutdown(SHUTDOWN_crash);
>              xen_hypercall_shutdown(SHUTDOWN_reboot);

... this made

             xen_hypercall_shutdown(pv_shim ? SHUTDOWN_crash : SHUTDOWN_reboot);

(suitably line wrapped).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.