thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
218e99
From fe80e7d53fa6cb0e8f26b76cf6c73acd7010290e Mon Sep 17 00:00:00 2001
218e99
From: Laszlo Ersek <lersek@redhat.com>
218e99
Date: Mon, 12 Aug 2013 15:59:31 +0200
218e99
Subject: dump: Move stubs into libqemustub.a
218e99
218e99
RH-Author: Laszlo Ersek <lersek@redhat.com>
218e99
Message-id: <1376323180-12863-2-git-send-email-lersek@redhat.com>
218e99
Patchwork-id: 53160
218e99
O-Subject: [RHEL-7 qemu-kvm PATCH 01/10] dump: Move stubs into libqemustub.a
218e99
Bugzilla: 981582
218e99
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
218e99
RH-Acked-by: Radim Krcmar <rkrcmar@redhat.com>
218e99
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
218e99
From: Andreas Färber <afaerber@suse.de>
218e99
218e99
This allows us to drop CONFIG_NO_CORE_DUMP with its indirect dependency
218e99
on CONFIG_HAVE_CORE_DUMP.
218e99
218e99
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
218e99
Signed-off-by: Andreas Färber <afaerber@suse.de>
218e99
(cherry picked from commit 88f62c2b1deb466749e340a8a241975c509bd9b6)
218e99
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
218e99
diff --git a/Makefile.target b/Makefile.target
218e99
index ce4391f..1cafb17 100644
218e99
--- a/Makefile.target
218e99
+++ b/Makefile.target
218e99
@@ -64,7 +64,6 @@ CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y)
218e99
 CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
218e99
 CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y)
218e99
 CONFIG_NO_GET_MEMORY_MAPPING = $(if $(subst n,,$(CONFIG_HAVE_GET_MEMORY_MAPPING)),n,y)
218e99
-CONFIG_NO_CORE_DUMP = $(if $(subst n,,$(CONFIG_HAVE_CORE_DUMP)),n,y)
218e99
 
218e99
 #########################################################
218e99
 # cpu emulator library
218e99
@@ -114,7 +113,6 @@ obj-y += memory.o savevm.o cputlb.o
218e99
 obj-$(CONFIG_HAVE_GET_MEMORY_MAPPING) += memory_mapping.o
218e99
 obj-$(CONFIG_HAVE_CORE_DUMP) += dump.o
218e99
 obj-$(CONFIG_NO_GET_MEMORY_MAPPING) += memory_mapping-stub.o
218e99
-obj-$(CONFIG_NO_CORE_DUMP) += dump-stub.o
218e99
 LIBS+=$(libs_softmmu)
218e99
 
218e99
 # xen support
218e99
diff --git a/dump-stub.c b/dump-stub.c
218e99
deleted file mode 100644
218e99
index b3f42cb..0000000
218e99
--- a/dump-stub.c
218e99
+++ /dev/null
218e99
@@ -1,36 +0,0 @@
218e99
-/*
218e99
- * QEMU dump
218e99
- *
218e99
- * Copyright Fujitsu, Corp. 2011, 2012
218e99
- *
218e99
- * Authors:
218e99
- *     Wen Congyang <wency@cn.fujitsu.com>
218e99
- *
218e99
- * This work is licensed under the terms of the GNU GPL, version 2 or later.
218e99
- * See the COPYING file in the top-level directory.
218e99
- *
218e99
- */
218e99
-
218e99
-#include "qemu-common.h"
218e99
-#include "sysemu/dump.h"
218e99
-#include "qapi/qmp/qerror.h"
218e99
-#include "qmp-commands.h"
218e99
-
218e99
-/* we need this function in hmp.c */
218e99
-void qmp_dump_guest_memory(bool paging, const char *file, bool has_begin,
218e99
-                           int64_t begin, bool has_length, int64_t length,
218e99
-                           Error **errp)
218e99
-{
218e99
-    error_set(errp, QERR_UNSUPPORTED);
218e99
-}
218e99
-
218e99
-int cpu_get_dump_info(ArchDumpInfo *info)
218e99
-{
218e99
-    return -1;
218e99
-}
218e99
-
218e99
-ssize_t cpu_get_note_size(int class, int machine, int nr_cpus)
218e99
-{
218e99
-    return -1;
218e99
-}
218e99
-
218e99
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
218e99
index 03dff20..9b701b4 100644
218e99
--- a/stubs/Makefile.objs
218e99
+++ b/stubs/Makefile.objs
218e99
@@ -2,6 +2,7 @@ stub-obj-y += arch-query-cpu-def.o
218e99
 stub-obj-y += clock-warp.o
218e99
 stub-obj-y += cpu-get-clock.o
218e99
 stub-obj-y += cpu-get-icount.o
218e99
+stub-obj-y += dump.o
218e99
 stub-obj-y += fdset-add-fd.o
218e99
 stub-obj-y += fdset-find-fd.o
218e99
 stub-obj-y += fdset-get-fd.o
218e99
diff --git a/stubs/dump.c b/stubs/dump.c
218e99
new file mode 100644
218e99
index 0000000..b3f42cb
218e99
--- /dev/null
218e99
+++ b/stubs/dump.c
218e99
@@ -0,0 +1,36 @@
218e99
+/*
218e99
+ * QEMU dump
218e99
+ *
218e99
+ * Copyright Fujitsu, Corp. 2011, 2012
218e99
+ *
218e99
+ * Authors:
218e99
+ *     Wen Congyang <wency@cn.fujitsu.com>
218e99
+ *
218e99
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
218e99
+ * See the COPYING file in the top-level directory.
218e99
+ *
218e99
+ */
218e99
+
218e99
+#include "qemu-common.h"
218e99
+#include "sysemu/dump.h"
218e99
+#include "qapi/qmp/qerror.h"
218e99
+#include "qmp-commands.h"
218e99
+
218e99
+/* we need this function in hmp.c */
218e99
+void qmp_dump_guest_memory(bool paging, const char *file, bool has_begin,
218e99
+                           int64_t begin, bool has_length, int64_t length,
218e99
+                           Error **errp)
218e99
+{
218e99
+    error_set(errp, QERR_UNSUPPORTED);
218e99
+}
218e99
+
218e99
+int cpu_get_dump_info(ArchDumpInfo *info)
218e99
+{
218e99
+    return -1;
218e99
+}
218e99
+
218e99
+ssize_t cpu_get_note_size(int class, int machine, int nr_cpus)
218e99
+{
218e99
+    return -1;
218e99
+}
218e99
+