xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
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 v2 06/10] arm: compile libxenguest
Date: Fri, 10 Feb 2012 12:02:44 +0000	[thread overview]
Message-ID: <1328875368-9608-6-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1202101154320.7456@kaball-desktop>

Introduce an empty implementation of the arch specific ARM functions in
xc_dom_arm.c.
Also provide empty implementations of xc_domain_save, xc_domain_restore
and xc_hvm_build_target_mem when CONFIG_HVM or CONFIG_MIGRATE are not
set.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 tools/libxc/Makefile       |   15 ++++++++++--
 tools/libxc/xc_dom_arm.c   |   49 ++++++++++++++++++++++++++++++++++++++++++++
 tools/libxc/xc_nohvm.c     |   31 +++++++++++++++++++++++++++
 tools/libxc/xc_nomigrate.c |   40 +++++++++++++++++++++++++++++++++++
 4 files changed, 132 insertions(+), 3 deletions(-)
 create mode 100644 tools/libxc/xc_dom_arm.c
 create mode 100644 tools/libxc/xc_nohvm.c
 create mode 100644 tools/libxc/xc_nomigrate.c

diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index f2e1ba7..57ceee6 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -42,9 +42,17 @@ CTRL_SRCS-$(CONFIG_MiniOS) += xc_minios.c
 
 GUEST_SRCS-y :=
 GUEST_SRCS-y += xg_private.c xc_suspend.c
-GUEST_SRCS-$(CONFIG_MIGRATE) += xc_domain_restore.c xc_domain_save.c
-GUEST_SRCS-$(CONFIG_MIGRATE) += xc_offline_page.c xc_compression.c
-GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c
+ifeq ($(CONFIG_MIGRATE),y)
+GUEST_SRCS-y += xc_domain_restore.c xc_domain_save.c
+GUEST_SRCS-y += xc_offline_page.c xc_compression.c
+else
+GUEST_SRCS-y += xc_nomigrate.c
+endif
+ifeq ($(CONFIG_HVM),y)
+GUEST_SRCS-y += xc_hvm_build.c
+else
+GUEST_SRCS-y += xc_nohvm.c
+endif
 
 vpath %.c ../../xen/common/libelf
 CFLAGS += -I../../xen/common/libelf
@@ -62,6 +70,7 @@ GUEST_SRCS-y                 += xc_dom_compat_linux.c
 GUEST_SRCS-$(CONFIG_X86)     += xc_dom_x86.c
 GUEST_SRCS-$(CONFIG_X86)     += xc_cpuid_x86.c
 GUEST_SRCS-$(CONFIG_IA64)    += xc_dom_ia64.c
+GUEST_SRCS-$(CONFIG_ARM)     += xc_dom_arm.c
 
 OSDEP_SRCS-y                 += xenctrl_osdep_ENOSYS.c
 
diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c
new file mode 100644
index 0000000..bdd28e1
--- /dev/null
+++ b/tools/libxc/xc_dom_arm.c
@@ -0,0 +1,49 @@
+/*
+ * Xen domain builder -- ARM
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Copyright (c) 2011, Citrix Systems
+ */
+#include <inttypes.h>
+#include <xen/xen.h>
+#include "xg_private.h"
+#include "xc_dom.h"
+
+int arch_setup_meminit(struct xc_dom_image *dom)
+{
+    return -ENOSYS;
+}
+
+int arch_setup_bootearly(struct xc_dom_image *dom)
+{
+    DOMPRINTF("%s: doing nothing", __FUNCTION__);
+    return 0;
+}
+
+int arch_setup_bootlate(struct xc_dom_image *dom)
+{
+    DOMPRINTF("%s: doing nothing", __FUNCTION__);
+    return 0;
+}
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/tools/libxc/xc_nohvm.c b/tools/libxc/xc_nohvm.c
new file mode 100644
index 0000000..a899f7c
--- /dev/null
+++ b/tools/libxc/xc_nohvm.c
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Copyright (c) 2011, Citrix Systems
+ */
+
+#include <inttypes.h>
+#include <errno.h>
+#include <xenctrl.h>
+#include <xenguest.h>
+
+int xc_hvm_build_target_mem(xc_interface *xch,
+                           uint32_t domid,
+                           int memsize,
+                           int target,
+                           const char *image_name)
+{
+    return -ENOSYS;
+}
diff --git a/tools/libxc/xc_nomigrate.c b/tools/libxc/xc_nomigrate.c
new file mode 100644
index 0000000..63090e0
--- /dev/null
+++ b/tools/libxc/xc_nomigrate.c
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Copyright (c) 2011, Citrix Systems
+ */
+
+#include <inttypes.h>
+#include <errno.h>
+#include <xenctrl.h>
+#include <xenguest.h>
+
+int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iters,
+                   uint32_t max_factor, uint32_t flags,
+                   struct save_callbacks* callbacks, int hvm,
+                   unsigned long vm_generationid_addr)
+{
+    return -ENOSYS;
+}
+
+int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
+                      unsigned int store_evtchn, unsigned long *store_mfn,
+                      unsigned int console_evtchn, unsigned long *console_mfn,
+                      unsigned int hvm, unsigned int pae, int superpages,
+                      int no_incr_generationid,
+                      unsigned long *vm_generationid_addr)
+{
+    return -ENOSYS;
+}
-- 
1.7.8.3

  parent reply	other threads:[~2012-02-10 12:02 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10 12:01 [PATCH v2 00/10] arm: compile tools Stefano Stabellini
2012-02-10 12:02 ` [PATCH v2 01/10] arm: few missing #define Stefano Stabellini
2012-02-13 13:49   ` Ian Campbell
2012-02-14 15:11     ` Stefano Stabellini
2012-02-15 12:27       ` Ian Campbell
2012-02-13 15:37   ` Ian Campbell
2012-02-10 12:02 ` [PATCH v2 02/10] arm: add stub hvm/save.h Stefano Stabellini
2012-02-13 12:21   ` Ian Campbell
2012-02-14 19:47     ` Stefano Stabellini
2012-02-10 12:02 ` [PATCH v2 03/10] libxl: do not allocate e820 for non x86 guests Stefano Stabellini
2012-02-13 17:28   ` Ian Jackson
2012-02-14 19:16     ` Stefano Stabellini
2012-02-10 12:02 ` [PATCH v2 04/10] blktap2/libvhd: Build shared objects using -fPIC Stefano Stabellini
2012-02-13 17:29   ` Ian Jackson
2012-02-10 12:02 ` [PATCH v2 05/10] arm: compile libxc Stefano Stabellini
2012-02-13 15:56   ` Ian Campbell
2012-02-13 17:38   ` Ian Jackson
2012-02-10 12:02 ` Stefano Stabellini [this message]
2012-02-13 16:10   ` [PATCH v2 06/10] arm: compile libxenguest Ian Campbell
2012-02-14 19:11     ` Stefano Stabellini
2012-02-10 12:02 ` [PATCH v2 07/10] arm: compile libxl Stefano Stabellini
2012-02-13 16:11   ` Ian Campbell
2012-02-13 17:35   ` Ian Jackson
2012-02-14 19:16     ` Stefano Stabellini
2012-02-10 12:02 ` [PATCH v2 08/10] arm: compile memshr Stefano Stabellini
2012-02-13 16:15   ` Ian Campbell
2012-02-10 12:02 ` [PATCH v2 09/10] arm: compile xentrace Stefano Stabellini
2012-02-13 16:16   ` Ian Campbell
2012-02-10 12:02 ` [PATCH v2 10/10] tools: only compile libfsimage/xfs on X86 Stefano Stabellini
2012-02-13 17:32   ` Ian Jackson
2012-02-13 16:18 ` [PATCH v2 00/10] arm: compile tools Ian Campbell
2012-02-13 17:39   ` Ian Jackson
2012-02-14 19:17     ` Stefano Stabellini

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=1328875368-9608-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).