WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix xc_hvm_save/restore for non-x86 builds

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Fix xc_hvm_save/restore for non-x86 builds
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Mon, 22 Jan 2007 13:27:20 -0700
Delivery-date: Mon, 22 Jan 2007 12:26:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: HP OSLO R&D
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
   Tools currently won't build on non-x86 due to xc_hvm_save/restore
only being built for CONFIG_HVM, but called from xcutils regardless.
This patch adds stub functions for those of us that don't support HVM
save/restore just yet.  Thanks,

        Alex

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---

diff -r 1c0ca58e8c16 tools/libxc/Makefile
--- a/tools/libxc/Makefile      Mon Jan 22 13:38:04 2007 +0000
+++ b/tools/libxc/Makefile      Mon Jan 22 12:46:45 2007 -0700
@@ -28,7 +28,11 @@ GUEST_SRCS-$(CONFIG_X86) += xc_linux_bui
 GUEST_SRCS-$(CONFIG_X86) += xc_linux_build.c
 GUEST_SRCS-$(CONFIG_IA64) += xc_linux_build.c
 GUEST_SRCS-$(CONFIG_MIGRATE) += xc_linux_restore.c xc_linux_save.c
-GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c xc_hvm_restore.c xc_hvm_save.c
+ifeq ($(CONFIG_HVM),y)
+GUEST_SRCS-y += xc_hvm_build.c xc_hvm_restore.c xc_hvm_save.c
+else
+GUEST_SRCS-y += xc_hvm_stubs.c
+endif
 
 -include $(XEN_TARGET_ARCH)/Makefile
 
diff -r 1c0ca58e8c16 tools/libxc/xc_hvm_stubs.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/libxc/xc_hvm_stubs.c        Mon Jan 22 12:56:05 2007 -0700
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * xc_hvm_stubs.c
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307 USA.
+ *
+ */
+
+#include "xg_private.h"
+
+int xc_hvm_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
+                  uint32_t max_factor, uint32_t flags, int (*suspend)(int))
+{
+    ERROR("HVM save is currently unsupported.");
+    return 1;
+}
+
+int xc_hvm_restore(int xc_handle, int io_fd,
+                     uint32_t dom, unsigned long nr_pfns,
+                     unsigned int store_evtchn, unsigned long *store_mfn,
+                     unsigned int console_evtchn, unsigned long *console_mfn,
+                     unsigned int pae, unsigned int apic)
+{
+    ERROR("HVM restore is currently unsupported.");
+    return 1;
+}
+



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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix xc_hvm_save/restore for non-x86 builds, Alex Williamson <=