This commit is contained in:
committed by
Git OBS Bridge
parent
8ae8ea2a74
commit
f5d6338f4d
@@ -23,22 +23,22 @@ Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
|
||||
tools/xcutils/xc_kexec.c | 503 +++++++++++++++
|
||||
19 files changed, 4988 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: xen-3.2-testing/tools/xcutils/Makefile
|
||||
Index: xen-3.3.0-testing/tools/xcutils/Makefile
|
||||
===================================================================
|
||||
--- xen-3.2-testing.orig/tools/xcutils/Makefile
|
||||
+++ xen-3.2-testing/tools/xcutils/Makefile
|
||||
@@ -22,7 +22,7 @@ CFLAGS += $(INCLUDES)
|
||||
--- xen-3.3.0-testing.orig/tools/xcutils/Makefile
|
||||
+++ xen-3.3.0-testing/tools/xcutils/Makefile
|
||||
@@ -18,7 +18,7 @@ CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_
|
||||
CFLAGS += -Wp,-MD,.$(@F).d
|
||||
PROG_DEP = .*.d
|
||||
|
||||
-PROGRAMS = xc_restore xc_save readnotes
|
||||
+PROGRAMS = xc_restore xc_save readnotes xc_kexec
|
||||
-PROGRAMS = xc_restore xc_save readnotes lsevtchn
|
||||
+PROGRAMS = xc_restore xc_save readnotes lsevtchn xc_kexec
|
||||
|
||||
LDLIBS = -L$(XEN_LIBXC) -L$(XEN_XENSTORE) -lxenguest -lxenctrl -lxenstore
|
||||
LDLIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore)
|
||||
|
||||
@@ -35,6 +35,11 @@ build: $(PROGRAMS)
|
||||
@@ -31,6 +31,11 @@ build: $(PROGRAMS)
|
||||
$(PROGRAMS): %: %.o
|
||||
$(CC) $(CFLAGS) $^ $(LDLIBS) -o $@
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
||||
|
||||
+xc_kexec.o: xc_kexec.c helper/blob.h
|
||||
+
|
||||
@@ -47,18 +47,18 @@ Index: xen-3.2-testing/tools/xcutils/Makefile
|
||||
+
|
||||
.PHONY: install
|
||||
install: build
|
||||
[ -d $(DESTDIR)$(PROGRAMS_INSTALL_DIR) ] || \
|
||||
@@ -46,5 +51,6 @@ install: build
|
||||
$(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
|
||||
@@ -41,5 +46,6 @@ install: build
|
||||
clean:
|
||||
$(RM) *.o $(PROGRAMS)
|
||||
$(RM) $(PROG_DEP)
|
||||
+ make -C helper clean
|
||||
|
||||
-include $(PROG_DEP)
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/Makefile
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/Makefile
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/Makefile
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/Makefile
|
||||
@@ -0,0 +1,39 @@
|
||||
+
|
||||
+XEN_ROOT = ../../..
|
||||
@@ -99,10 +99,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/Makefile
|
||||
+# dependencies
|
||||
+
|
||||
+$(XEN_TARGET_ARCH)/entry.o: $(XEN_TARGET_ARCH)/entry.S $(XEN_TARGET_ARCH)/offsets.h
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/console.c
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/console.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/console.c
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/console.c
|
||||
@@ -0,0 +1,69 @@
|
||||
+#include <inttypes.h>
|
||||
+
|
||||
@@ -173,10 +173,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/console.c
|
||||
+
|
||||
+ return printed_len;
|
||||
+}
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/ctype.c
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/ctype.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/ctype.c
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/ctype.c
|
||||
@@ -0,0 +1,35 @@
|
||||
+/*
|
||||
+ * linux/lib/ctype.c
|
||||
@@ -213,10 +213,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/ctype.c
|
||||
+_L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */
|
||||
+
|
||||
+EXPORT_SYMBOL(_ctype);
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/ctype.h
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/ctype.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/ctype.h
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/ctype.h
|
||||
@@ -0,0 +1,54 @@
|
||||
+#ifndef _LINUX_CTYPE_H
|
||||
+#define _LINUX_CTYPE_H
|
||||
@@ -272,10 +272,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/ctype.h
|
||||
+#define toupper(c) __toupper(c)
|
||||
+
|
||||
+#endif
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/helper.h
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/helper.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/helper.h
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/helper.h
|
||||
@@ -0,0 +1,107 @@
|
||||
+#include <stdarg.h>
|
||||
+#include <stddef.h>
|
||||
@@ -384,10 +384,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/helper.h
|
||||
+int sprintf(char * buf, const char *fmt, ...);
|
||||
+int vsscanf(const char * buf, const char * fmt, va_list args);
|
||||
+int sscanf(const char * buf, const char * fmt, ...);
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/main.c
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/main.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/main.c
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/main.c
|
||||
@@ -0,0 +1,651 @@
|
||||
+#include <xenctrl.h>
|
||||
+#include "hypercall.h"
|
||||
@@ -1040,10 +1040,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/main.c
|
||||
+ printk("\r\n");
|
||||
+ start_kernel();
|
||||
+}
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/make-offsets.c
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/make-offsets.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/make-offsets.c
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/make-offsets.c
|
||||
@@ -0,0 +1,28 @@
|
||||
+#include <stdio.h>
|
||||
+#include <xenctrl.h>
|
||||
@@ -1073,10 +1073,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/make-offsets.c
|
||||
+ vcpu_off("cr3", ctrlreg[3]);
|
||||
+ return 0;
|
||||
+}
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/printk.c
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/printk.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/printk.c
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/printk.c
|
||||
@@ -0,0 +1,1051 @@
|
||||
+/*
|
||||
+ * linux/kernel/printk.c
|
||||
@@ -2129,10 +2129,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/printk.c
|
||||
+ printk_ratelimit_burst);
|
||||
+}
|
||||
+EXPORT_SYMBOL(printk_ratelimit);
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/string.c
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/string.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/string.c
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/string.c
|
||||
@@ -0,0 +1,601 @@
|
||||
+/*
|
||||
+ * linux/lib/string.c
|
||||
@@ -2735,10 +2735,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/string.c
|
||||
+}
|
||||
+EXPORT_SYMBOL(memchr);
|
||||
+#endif
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/vsprintf.c
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/vsprintf.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/vsprintf.c
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/vsprintf.c
|
||||
@@ -0,0 +1,842 @@
|
||||
+/*
|
||||
+ * linux/lib/vsprintf.c
|
||||
@@ -3582,10 +3582,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/vsprintf.c
|
||||
+}
|
||||
+
|
||||
+EXPORT_SYMBOL(sscanf);
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/x86_32/div64.h
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/x86_32/div64.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/x86_32/div64.h
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/x86_32/div64.h
|
||||
@@ -0,0 +1,48 @@
|
||||
+#ifndef __I386_DIV64
|
||||
+#define __I386_DIV64
|
||||
@@ -3635,10 +3635,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/x86_32/div64.h
|
||||
+
|
||||
+}
|
||||
+#endif
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/x86_32/entry.S
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/x86_32/entry.S
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/x86_32/entry.S
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/x86_32/entry.S
|
||||
@@ -0,0 +1,49 @@
|
||||
+#include "offsets.h"
|
||||
+
|
||||
@@ -3689,10 +3689,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/x86_32/entry.S
|
||||
+ nop
|
||||
+ .align 4096
|
||||
+hypercall_end:
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/x86_32/hypercall.h
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/x86_32/hypercall.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/x86_32/hypercall.h
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/x86_32/hypercall.h
|
||||
@@ -0,0 +1,359 @@
|
||||
+/******************************************************************************
|
||||
+ * hypercall.h
|
||||
@@ -4053,10 +4053,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/x86_32/hypercall.h
|
||||
+
|
||||
+
|
||||
+#endif /* __HYPERCALL_H__ */
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/x86_64/div64.h
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/x86_64/div64.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/x86_64/div64.h
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/x86_64/div64.h
|
||||
@@ -0,0 +1,57 @@
|
||||
+#ifndef _ASM_GENERIC_DIV64_H
|
||||
+#define _ASM_GENERIC_DIV64_H
|
||||
@@ -4115,10 +4115,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/x86_64/div64.h
|
||||
+#endif /* BITS_PER_LONG */
|
||||
+
|
||||
+#endif /* _ASM_GENERIC_DIV64_H */
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/x86_64/entry.S
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/x86_64/entry.S
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/x86_64/entry.S
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/x86_64/entry.S
|
||||
@@ -0,0 +1,50 @@
|
||||
+#include "offsets.h"
|
||||
+
|
||||
@@ -4170,10 +4170,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/x86_64/entry.S
|
||||
+ nop
|
||||
+ .align 4096
|
||||
+hypercall_end:
|
||||
Index: xen-3.2-testing/tools/xcutils/helper/x86_64/hypercall.h
|
||||
Index: xen-3.3.0-testing/tools/xcutils/helper/x86_64/hypercall.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/helper/x86_64/hypercall.h
|
||||
+++ xen-3.3.0-testing/tools/xcutils/helper/x86_64/hypercall.h
|
||||
@@ -0,0 +1,354 @@
|
||||
+/******************************************************************************
|
||||
+ * hypercall.h
|
||||
@@ -4529,10 +4529,10 @@ Index: xen-3.2-testing/tools/xcutils/helper/x86_64/hypercall.h
|
||||
+}
|
||||
+
|
||||
+#endif /* __HYPERCALL_H__ */
|
||||
Index: xen-3.2-testing/tools/xcutils/kexec-syscall.h
|
||||
Index: xen-3.3.0-testing/tools/xcutils/kexec-syscall.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/kexec-syscall.h
|
||||
+++ xen-3.3.0-testing/tools/xcutils/kexec-syscall.h
|
||||
@@ -0,0 +1,80 @@
|
||||
+#ifndef KEXEC_SYSCALL_H
|
||||
+#define KEXEC_SYSCALL_H
|
||||
@@ -4614,10 +4614,10 @@ Index: xen-3.2-testing/tools/xcutils/kexec-syscall.h
|
||||
+#define KEXEC_MAX_SEGMENTS 16
|
||||
+
|
||||
+#endif /* KEXEC_SYSCALL_H */
|
||||
Index: xen-3.2-testing/tools/xcutils/xc_kexec.c
|
||||
Index: xen-3.3.0-testing/tools/xcutils/xc_kexec.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-3.2-testing/tools/xcutils/xc_kexec.c
|
||||
+++ xen-3.3.0-testing/tools/xcutils/xc_kexec.c
|
||||
@@ -0,0 +1,503 @@
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
|
Reference in New Issue
Block a user