From: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
To: Xen Devel <xen-devel@lists.xensource.com>
Cc: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
Subject: [PATCH 3/3] stubdom_create returns stubdomain domid so that unpause is done by the user of libxenlight.
Date: Wed, 7 Jul 2010 14:00:56 +0100 [thread overview]
Message-ID: <1278507656-7745-4-git-send-email-vincent.hanquez@eu.citrix.com> (raw)
In-Reply-To: <1278507656-7745-1-git-send-email-vincent.hanquez@eu.citrix.com>
[-- Attachment #1: Type: text/plain, Size: 242 bytes --]
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
---
tools/libxl/libxl.c | 7 ++++---
tools/libxl/libxl.h | 2 +-
tools/libxl/xl_cmdimpl.c | 4 +++-
3 files changed, 8 insertions(+), 5 deletions(-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-stubdom_create-returns-stubdomain-domid-so-that-unpa.patch --]
[-- Type: text/x-patch; name="0003-stubdom_create-returns-stubdomain-domid-so-that-unpa.patch", Size: 2819 bytes --]
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 811678f..29fb10f 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -1060,7 +1060,7 @@ int libxl_stubdom_create(struct libxl_ctx *ctx,
libxl_device_disk *disks, int num_disks,
libxl_device_nic *vifs, int num_vifs,
libxl_device_vfb *vfb,
- libxl_device_vkb *vkb,
+ libxl_device_vkb *vkb, uint32_t *stubdomid,
libxl_device_model_starting **starting_r)
{
int i, num_console = 1, ret;
@@ -1141,6 +1141,9 @@ retry_transaction:
ret = libxl_device_console_add(ctx, domid, &console[i]);
if (ret) return ret;
}
+
+ *stubdomid = domid;
+
if (libxl_create_xenpv_qemu(ctx, vfb, num_console, console, &dm_starting) < 0) {
free(args);
return -1;
@@ -1150,8 +1153,6 @@ retry_transaction:
return -1;
}
- libxl_domain_unpause(ctx, domid);
-
if (starting_r) {
*starting_r = libxl_calloc(ctx, sizeof(libxl_device_model_starting), 1);
(*starting_r)->domid = info->domid;
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
index 76f9b5c..597d91b 100644
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -381,7 +381,7 @@ int libxl_stubdom_create(struct libxl_ctx *ctx,
libxl_device_nic *vifs, int num_vifs,
libxl_device_vfb *vfb,
libxl_device_vkb *vkb,
- libxl_device_model_starting **starting_r);
+ uint32_t *stubdomid, libxl_device_model_starting **starting_r);
int libxl_vfb_and_vkb_from_device_model_info(struct libxl_ctx *ctx,
libxl_device_model_info *info,
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index a20e77a..6ed8e26 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1154,9 +1154,11 @@ start:
if (strstr(dm_info.device_model, "stubdom-dm")) {
libxl_device_vfb vfb;
libxl_device_vkb vkb;
+ uint32_t stubdomid;
libxl_vfb_and_vkb_from_device_model_info(&ctx, &dm_info, &vfb, &vkb);
- MUST( libxl_stubdom_create(&ctx, &dm_info, disks, num_disks, vifs, num_vifs, &vfb, &vkb, &dm_starting) );
+ MUST( libxl_stubdom_create(&ctx, &dm_info, disks, num_disks, vifs, num_vifs, &vfb, &vkb, &stubdomid, &dm_starting) );
+ libxl_domain_unpause(&ctx, stubdomid);
} else {
MUST( libxl_create_device_model(&ctx, &dm_info, disks, num_disks,
vifs, num_vifs, &dm_starting) );
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-07-07 13:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 13:00 [PATCH 0/3] libxl stubdom API cleanup Vincent Hanquez
2010-07-07 13:00 ` [PATCH 1/3] move stubdom make into a proper function Vincent Hanquez
2010-07-07 13:00 ` [PATCH 2/3] let the user of libxenlight choose explicitely if it want to start a stubdom or not Vincent Hanquez
2010-07-07 13:00 ` Vincent Hanquez [this message]
2010-07-07 16:53 ` [PATCH 0/3] libxl stubdom API cleanup Stefano Stabellini
2010-07-08 11:17 ` Vincent Hanquez
2010-07-08 14:03 ` Stefano Stabellini
2010-07-08 14:18 ` Ian Campbell
2010-07-08 16:27 ` Ian Jackson
2010-07-08 17:18 ` Vincent Hanquez
2010-07-09 7:52 ` Ian Campbell
2010-07-09 8:17 ` Tim Deegan
2010-07-09 10:44 ` Vincent Hanquez
2010-07-09 10:51 ` Tim Deegan
2010-07-09 10:59 ` Stefano Stabellini
2010-07-09 14:44 ` Tim Deegan
2010-07-09 11:05 ` Vincent Hanquez
2010-07-09 17:04 ` Ian Jackson
2010-07-09 17:58 ` Stefano Stabellini
2010-07-12 16:46 ` Ian Jackson
2010-07-11 22:14 ` Vincent Hanquez
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=1278507656-7745-4-git-send-email-vincent.hanquez@eu.citrix.com \
--to=vincent.hanquez@eu.citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).