From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: david.vrabel@citrix.com, Ian.Campbell@citrix.com,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Tim.Deegan@citrix.com
Subject: [PATCH v7 6/8] libxl: Introduce libxl__arch_domain_create (x86 version)
Date: Tue, 29 May 2012 14:41:34 +0100 [thread overview]
Message-ID: <1338298896-27411-6-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1205281826060.26786@kaball-desktop>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
---
tools/libxl/Makefile | 2 +-
tools/libxl/libxl_create.c | 12 ++----------
tools/libxl/libxl_x86.c | 19 +++++++++++++++++++
3 files changed, 22 insertions(+), 11 deletions(-)
create mode 100644 tools/libxl/libxl_x86.c
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 6ba4cf0..8ac8674 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -34,7 +34,7 @@ LIBXL_OBJS-y += libxl_blktap2.o
else
LIBXL_OBJS-y += libxl_noblktap2.o
endif
-LIBXL_OBJS-$(CONFIG_X86) += libxl_cpuid.o libxl_noarch.o
+LIBXL_OBJS-$(CONFIG_X86) += libxl_cpuid.o libxl_x86.o
LIBXL_OBJS-$(CONFIG_IA64) += libxl_nocpuid.o libxl_noarch.o
LIBXL_OBJS-$(CONFIG_ARM) += libxl_nocpuid.o libxl_noarch.o
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 14721eb..2637222 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -18,6 +18,7 @@
#include "libxl_osdeps.h" /* must come before any other headers */
#include "libxl_internal.h"
+#include "libxl_arch.h"
#include <xc_dom.h>
#include <xenguest.h>
@@ -820,16 +821,7 @@ static void domcreate_devmodel_started(libxl__egc *egc,
}
}
- if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_PV &&
- libxl_defbool_val(d_config->b_info.u.pv.e820_host)) {
- ret = libxl__e820_alloc(gc, domid, d_config);
- if (ret) {
- LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
- "Failed while collecting E820 with: %d (errno:%d)\n",
- ret, errno);
- goto error_out;
- }
- }
+ libxl__arch_domain_create(gc, d_config, domid);
domcreate_console_available(egc, dcs);
domcreate_complete(egc, dcs, 0);
diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c
new file mode 100644
index 0000000..7e28504
--- /dev/null
+++ b/tools/libxl/libxl_x86.c
@@ -0,0 +1,19 @@
+#include "libxl_internal.h"
+#include "libxl_arch.h"
+
+int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config *d_config,
+ uint32_t domid)
+{
+ int ret = 0;
+ if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_PV &&
+ libxl_defbool_val(d_config->b_info.u.pv.e820_host)) {
+ ret = libxl__e820_alloc(gc, domid, d_config);
+ if (ret) {
+ LIBXL__LOG_ERRNO(gc->owner, LIBXL__LOG_ERROR,
+ "Failed while collecting E820 with: %d (errno:%d)\n",
+ ret, errno);
+ }
+ }
+
+ return ret;
+}
--
1.7.2.5
next prev parent reply other threads:[~2012-05-29 13:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-29 13:40 [PATCH v7 0/8] arm: compile tools Stefano Stabellini
2012-05-29 13:41 ` [PATCH v7 1/8] arm: compile libxenguest Stefano Stabellini
2012-05-29 13:41 ` [PATCH v7 2/8] arm: compile memshr Stefano Stabellini
2012-05-29 13:41 ` [PATCH v7 3/8] arm: compile xentrace Stefano Stabellini
2012-05-29 13:41 ` [PATCH v7 4/8] arm: compile libxl Stefano Stabellini
2012-05-30 7:55 ` Ian Campbell
2012-05-29 13:41 ` [PATCH v7 5/8] libxl: Introduce libxl__arch_domain_create Stefano Stabellini
2012-05-29 13:41 ` Stefano Stabellini [this message]
2012-05-30 7:54 ` [PATCH v7 6/8] libxl: Introduce libxl__arch_domain_create (x86 version) Ian Campbell
2012-05-29 13:41 ` [PATCH v7 7/8] libxl: move e820_names, e820_sanitize, libxl__e820_alloc to libxl_x86.c Stefano Stabellini
2012-05-29 13:41 ` [PATCH v7 8/8] libxl: make libxl__e820_alloc a static function Stefano Stabellini
2012-05-29 15:56 ` [PATCH v7 0/8] arm: compile tools Stefano Stabellini
2012-05-29 16:00 ` Ian Campbell
2012-05-29 16:04 ` Ian Jackson
2012-05-30 7:58 ` Ian Campbell
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=1338298896-27411-6-git-send-email-stefano.stabellini@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Tim.Deegan@citrix.com \
--cc=david.vrabel@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).