All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
To: Gihan Munasinghe <GMunasinghe@flexiant.com>
Cc: Xen Devel <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] new commands "xl reboot" & "xl shutdown"
Date: Wed, 12 May 2010 17:34:16 +0100	[thread overview]
Message-ID: <4BEAD888.7070402@eu.citrix.com> (raw)
In-Reply-To: <4BEACFD8.6080601@flexiant.com>

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

  reply	other threads:[~2010-05-12 16:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07 23:36 [PATCH] new commands "xl reboot" & "xl shutdown" Gihan Munasinghe
2010-05-10 15:11 ` Stefano Stabellini
2010-05-11  6:51   ` Gihan Munasinghe
2010-05-12 15:57   ` Gihan Munasinghe
2010-05-12 16:34     ` Vincent Hanquez [this message]
2010-05-12 17:09       ` Gihan Munasinghe
2010-05-13  7:41         ` Keir Fraser
2010-05-31 19:03           ` Gihan Munasinghe
2010-06-01  6:09             ` Keir Fraser
2010-06-01 22:51               ` Gihan Munasinghe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BEAD888.7070402@eu.citrix.com \
    --to=vincent.hanquez@eu.citrix.com \
    --cc=GMunasinghe@flexiant.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.