Vincent Hanquez wrote: > 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). I though PV domain would have been captured by.. xc_get_hvm_param(ctx->xch, domid, HVM_PARAM_CALLBACK_IRQ, &pvdriver); if (!pvdriver .. ) > > 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. > Yes having is_hvm is much better than the hard coded values I have changed that bit of code see attached patch. I tested with hvm with and with out pv drivers. seems to work. Would be appreciate if someone can test in full pv domains. Thanks -- Gihan