This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [PATCH] libxl: Make domain_shutdown fail if graceful not

Ian Campbell writes ("Re: [Xen-devel] [PATCH] libxl: Make domain_shutdown fail 
if graceful not possible"):
> Acked/Reviewd-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Thanks, I've applied it.

> Not related to this patch, other than I happened to notice it while
> reviewingm but the "req" paramter to libxl_domain_shutdown is pretty
> nasty. It can apparently taken a number from 0-4 inclusive, with no
> symbolic names, but which are translated per:
> static char *req_table[] = {
>     [0] = "poweroff",
>     [1] = "reboot",
>     [2] = "suspend",
>     [3] = "crash",
>     [4] = "halt",
> };


> However only 0 and 1 are ever actually passed by xl and I'd wager that
> only 0, 1 and 4 are even vaguely valid in this context. suspend has it's
> own libxl function and iirc crash is something only a guest does...


> I'm not sure what the distinction between poweroff and halt is (pvops
> Linux apparently treats them the same) but I'd suggest that having
> libxl_domain_shutdown => "poweroff" and libxl_domain_reboot => "reboot"
> with the existing function becoming a common internal backend makes
> sense.

Yes, but for 4.2 I think.


Xen-devel mailing list