Blame SOURCES/kvm-dump-Drop-qmp_dump_guest_memory-stub-and-build-for-a.patch

958e1b
From bf8262fae14e0dd80ad8a9c302bd2317139d18a3 Mon Sep 17 00:00:00 2001
958e1b
From: Laszlo Ersek <lersek@redhat.com>
958e1b
Date: Fri, 7 Nov 2014 17:18:02 +0100
958e1b
Subject: [PATCH 15/41] dump: Drop qmp_dump_guest_memory() stub and build for
958e1b
 all targets
958e1b
MIME-Version: 1.0
958e1b
Content-Type: text/plain; charset=UTF-8
958e1b
Content-Transfer-Encoding: 8bit
958e1b
958e1b
Message-id: <1415380693-16593-16-git-send-email-lersek@redhat.com>
958e1b
Patchwork-id: 62201
958e1b
O-Subject: [RHEL-7.1 qemu-kvm PATCH 15/26] dump: Drop qmp_dump_guest_memory() stub and build for all targets
958e1b
Bugzilla: 1157798
958e1b
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
958e1b
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
958e1b
RH-Acked-by: dgibson <dgibson@redhat.com>
958e1b
958e1b
From: Andreas Färber <afaerber@suse.de>
958e1b
958e1b
qmp_dump_guest_memory() calls dump_init() and returns an Error when
958e1b
cpu_get_dump_info() returns an error, as done by the stub.
958e1b
So there is no need to have a stub for qmp_dump_guest_memory().
958e1b
958e1b
Enable the documentation of the always-present dump-guest-memory command.
958e1b
958e1b
That way we can drop CONFIG_HAVE_CORE_DUMP and leave configure
958e1b
completely out of the picture for target CPU features.
958e1b
958e1b
Signed-off-by: Andreas Färber <afaerber@suse.de>
958e1b
(cherry picked from commit 2a78636bd204e389068d203473ec76558083b44b)
958e1b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
958e1b
958e1b
Conflicts:
958e1b
	Makefile.target
958e1b
	stubs/dump.c
958e1b
958e1b
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
958e1b
---
958e1b
 Makefile.target | 2 +-
958e1b
 configure       | 4 ----
958e1b
 hmp-commands.hx | 2 --
958e1b
 stubs/dump.c    | 8 --------
958e1b
 4 files changed, 1 insertion(+), 15 deletions(-)
958e1b
958e1b
diff --git a/Makefile.target b/Makefile.target
958e1b
index ca407d7..ea874c9 100644
958e1b
--- a/Makefile.target
958e1b
+++ b/Makefile.target
958e1b
@@ -119,7 +119,7 @@ obj-$(CONFIG_FDT) += device_tree.o
958e1b
 obj-$(CONFIG_KVM) += kvm-all.o
958e1b
 obj-y += memory.o savevm.o cputlb.o
958e1b
 obj-$(CONFIG_HAVE_GET_MEMORY_MAPPING) += memory_mapping.o
958e1b
-obj-$(CONFIG_HAVE_CORE_DUMP) += dump.o
958e1b
+obj-y += dump.o
958e1b
 obj-$(CONFIG_NO_GET_MEMORY_MAPPING) += memory_mapping-stub.o
958e1b
 LIBS+=$(libs_softmmu)
958e1b
 
958e1b
diff --git a/configure b/configure
958e1b
index 5373237..ca8b107 100755
958e1b
--- a/configure
958e1b
+++ b/configure
958e1b
@@ -4483,10 +4483,6 @@ if test "$target_bigendian" = "yes" ; then
958e1b
 fi
958e1b
 if test "$target_softmmu" = "yes" ; then
958e1b
   echo "CONFIG_SOFTMMU=y" >> $config_target_mak
958e1b
-  case "$target_arch2" in
958e1b
-    i386|x86_64)
958e1b
-      echo "CONFIG_HAVE_CORE_DUMP=y" >> $config_target_mak
958e1b
-  esac
958e1b
 fi
958e1b
 if test "$target_user_only" = "yes" ; then
958e1b
   echo "CONFIG_USER_ONLY=y" >> $config_target_mak
958e1b
diff --git a/hmp-commands.hx b/hmp-commands.hx
958e1b
index 467dd70..58498f7 100644
958e1b
--- a/hmp-commands.hx
958e1b
+++ b/hmp-commands.hx
958e1b
@@ -1013,7 +1013,6 @@ server will ask the spice/vnc client to automatically reconnect using the
958e1b
 new parameters (if specified) once the vm migration finished successfully.
958e1b
 ETEXI
958e1b
 
958e1b
-#if defined(CONFIG_HAVE_CORE_DUMP)
958e1b
     {
958e1b
         .name       = "dump-guest-memory",
958e1b
         .args_type  = "paging:-p,filename:F,begin:i?,length:i?",
958e1b
@@ -1037,7 +1036,6 @@ gdb.
958e1b
     length: the memory size, in bytes. It's optional, and should be specified
958e1b
             with begin together.
958e1b
 ETEXI
958e1b
-#endif
958e1b
 
958e1b
 #ifdef CONFIG_LIVE_BLOCK_OPS
958e1b
     {
958e1b
diff --git a/stubs/dump.c b/stubs/dump.c
958e1b
index 5749e2c..370cd96 100644
958e1b
--- a/stubs/dump.c
958e1b
+++ b/stubs/dump.c
958e1b
@@ -16,14 +16,6 @@
958e1b
 #include "qapi/qmp/qerror.h"
958e1b
 #include "qmp-commands.h"
958e1b
 
958e1b
-/* we need this function in hmp.c */
958e1b
-void qmp_dump_guest_memory(bool paging, const char *file, bool has_begin,
958e1b
-                           int64_t begin, bool has_length, int64_t length,
958e1b
-                           Error **errp)
958e1b
-{
958e1b
-    error_set(errp, QERR_UNSUPPORTED);
958e1b
-}
958e1b
-
958e1b
 int cpu_get_dump_info(ArchDumpInfo *info,
958e1b
                       const struct GuestPhysBlockList *guest_phys_blocks)
958e1b
 {
958e1b
-- 
958e1b
1.8.3.1
958e1b