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

Re: [Xen-devel] [PATCH] new commands "xl reboot" & "xl shutdown"



On 12/05/10 16:57, Gihan Munasinghe wrote:
The sleep is still needed, if not libxl_* calls fails sometimes. I'll do
more debugging with in the calls it self and see, but for now the
sleep() seems to do the trick.

diff -Naur libxl/libxl.c libxl-patch/libxl.c
--- libxl/libxl.c       2010-05-11 09:37:50.000000000 +0100
+++ libxl-patch/libxl.c 2010-05-12 16:24:42.000000000 +0100
@@ -538,12 +538,12 @@
     shutdown_path = libxl_sprintf(ctx, "%s/control/shutdown", dom_path);

xs_write(ctx->xsh, XBT_NULL, shutdown_path, req_table[req], strlen(req_table[req]));
-    if (/* hvm */ 0) {
+    if (/* hvm */ 1) {
         unsigned long acpi_s_state = 0;
         unsigned long pvdriver = 0;

you can't just switch from 0 to 1, otherwise pv domains will just fails (although i see we're not testing xc_get_hvm_param return values either).

the if (/* hvm */ 0) is because the function never properly tested if the domain is hvm or not. nowadays you have is_hvm(domid) function that can handily replace the hardcoded value.

--
Vincent

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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