All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 09/14]: libxenlight, domain resume
@ 2009-11-30 19:15 Andres Lagar-Cavilla
  2009-12-01  6:18 ` Vincent Hanquez
  0 siblings, 1 reply; 3+ messages in thread
From: Andres Lagar-Cavilla @ 2009-11-30 19:15 UTC (permalink / raw)
  To: Stefano Stabellini, xen-devel

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

Added libxenlight implementation for resume domain.
This brings back a domain from the shutdown state
after save, enabling checkpointing.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.com>


[-- Attachment #2: 09_domain_resume.patch --]
[-- Type: text/x-patch, Size: 1750 bytes --]

# HG changeset patch
# User Andres Lagar-Cavilla <andres@lagarcavilla.com>
# Date 1259261993 18000
# Node ID 4f6a83e7b25f8fb3dbdd683934b37a9807f47977
# Parent  d8aa40229a93d66c097f058c77402a1180bbac94
Added libxenlight implementation for resume domain.
This brings back a domain from the shutdown state
after save, enabling checkpointing.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.com>

diff -r d8aa40229a93 -r 4f6a83e7b25f libxl.c
--- a/libxl.c
+++ b/libxl.c
@@ -251,6 +251,23 @@ int libxl_domain_restore(struct libxl_ct
     return 0;
 }
 
+int libxl_domain_resume(struct libxl_ctx *ctx, uint32_t domid)
+{
+    if (xc_domain_resume(ctx->xch, domid, 1)) {
+        XL_LOG_ERRNO(ctx, XL_LOG_ERROR, 
+                        "xc_domain_resume failed for domain %u", 
+                        domid);
+        return ERROR_FAIL;
+    }
+    if (xs_resume_domain(ctx->xsh, domid)) {
+        XL_LOG_ERRNO(ctx, XL_LOG_ERROR, 
+                        "xs_resume_domain failed for domain %u", 
+                        domid);
+        return ERROR_FAIL;
+    }
+    return 0;
+}
+
 struct libxl_dominfo * libxl_domain_list(struct libxl_ctx *ctx, int *nb_domain)
 {
     struct libxl_dominfo *ptr;
diff -r d8aa40229a93 -r 4f6a83e7b25f libxl.h
--- a/libxl.h
+++ b/libxl.h
@@ -257,6 +257,7 @@ int libxl_domain_restore(struct libxl_ct
                           uint32_t domid, int fd);
 int libxl_domain_suspend(struct libxl_ctx *ctx, libxl_domain_suspend_info *info,
                           uint32_t domid, int fd);
+int libxl_domain_resume(struct libxl_ctx *ctx, uint32_t domid);
 int libxl_domain_shutdown(struct libxl_ctx *ctx, uint32_t domid, int req);
 int libxl_domain_destroy(struct libxl_ctx *ctx, uint32_t domid, int force);
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 09/14]: libxenlight, domain resume
  2009-11-30 19:15 [PATCH 09/14]: libxenlight, domain resume Andres Lagar-Cavilla
@ 2009-12-01  6:18 ` Vincent Hanquez
  2009-12-01 14:20   ` Andres Lagar-Cavilla
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Hanquez @ 2009-12-01  6:18 UTC (permalink / raw)
  To: Andres Lagar-Cavilla; +Cc: xen-devel@lists.xensource.com, Stefano Stabellini

On Mon, Nov 30, 2009 at 07:15:16PM +0000, Andres Lagar-Cavilla wrote:
> Added libxenlight implementation for resume domain.
> This brings back a domain from the shutdown state
> after save, enabling checkpointing.

(I haven't looks at resume stuff for age ..)

I think this only works if the domain is cooperative, if it isn't you need to a
callback in the middle of the calls to do devices related unplugging/plugging.

If that still true, I would prefer to have a 
"if (pv)" around the code since pv are always suppose to be cooperative

-- 
Vincent

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 09/14]: libxenlight, domain resume
  2009-12-01  6:18 ` Vincent Hanquez
@ 2009-12-01 14:20   ` Andres Lagar-Cavilla
  0 siblings, 0 replies; 3+ messages in thread
From: Andres Lagar-Cavilla @ 2009-12-01 14:20 UTC (permalink / raw)
  To: Vincent Hanquez; +Cc: xen-devel@lists.xensource.com, Stefano Stabellini

I know little of hvm. I believe the *right* approach is to parse an elf 
note of the guest kernel. The hvm "kernel" is the hvmloader, so that 
would render hvm non-cooperative. The caller will have to provide the 
kernel path though, since we forget about it.

Andres

Vincent Hanquez wrote:
> On Mon, Nov 30, 2009 at 07:15:16PM +0000, Andres Lagar-Cavilla wrote:
>   
>> Added libxenlight implementation for resume domain.
>> This brings back a domain from the shutdown state
>> after save, enabling checkpointing.
>>     
>
> (I haven't looks at resume stuff for age ..)
>
> I think this only works if the domain is cooperative, if it isn't you need to a
> callback in the middle of the calls to do devices related unplugging/plugging.
>
> If that still true, I would prefer to have a 
> "if (pv)" around the code since pv are always suppose to be cooperative
>
>   

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-01 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-30 19:15 [PATCH 09/14]: libxenlight, domain resume Andres Lagar-Cavilla
2009-12-01  6:18 ` Vincent Hanquez
2009-12-01 14:20   ` Andres Lagar-Cavilla

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.