yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-dump-guest-memory-disable-dump-when-in-INMIGRATE-sta.patch

5d360b
From 10a4f18fb24f6d005e00828018f38285347b6fd8 Mon Sep 17 00:00:00 2001
5d360b
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
5d360b
Date: Wed, 13 Dec 2017 13:38:58 +0100
5d360b
Subject: [PATCH 27/41] dump-guest-memory: disable dump when in INMIGRATE state
5d360b
MIME-Version: 1.0
5d360b
Content-Type: text/plain; charset=UTF-8
5d360b
Content-Transfer-Encoding: 8bit
5d360b
5d360b
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
5d360b
Message-id: <20171213133912.26176-28-marcandre.lureau@redhat.com>
5d360b
Patchwork-id: 78381
5d360b
O-Subject: [RHEL-7.5 qemu-kvm PATCH v3 27/41] dump-guest-memory: disable dump when in INMIGRATE state
5d360b
Bugzilla: 1411490
5d360b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
5d360b
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
5d360b
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
5d360b
5d360b
From: Peter Xu <peterx@redhat.com>
5d360b
5d360b
Signed-off-by: Peter Xu <peterx@redhat.com>
5d360b
Reviewed-by: Fam Zheng <famz@redhat.com>
5d360b
Message-Id: <1455772616-8668-7-git-send-email-peterx@redhat.com>
5d360b
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
5d360b
5d360b
(cherry picked from commit 63e27f28f281986de791f099efa4fa15cc47f4fc)
5d360b
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5d360b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
5d360b
---
5d360b
 dump.c | 5 +++++
5d360b
 1 file changed, 5 insertions(+)
5d360b
5d360b
diff --git a/dump.c b/dump.c
5d360b
index 4bce6cf..8618230 100644
5d360b
--- a/dump.c
5d360b
+++ b/dump.c
5d360b
@@ -1658,6 +1658,11 @@ void qmp_dump_guest_memory(bool paging, const char *file,
5d360b
     DumpState *s;
5d360b
     Error *local_err = NULL;
5d360b
 
5d360b
+    if (runstate_check(RUN_STATE_INMIGRATE)) {
5d360b
+        error_setg(errp, "Dump not allowed during incoming migration.");
5d360b
+        return;
5d360b
+    }
5d360b
+
5d360b
     /* if there is a dump in background, we should wait until the dump
5d360b
      * finished */
5d360b
     if (dump_in_progress()) {
5d360b
-- 
5d360b
1.8.3.1
5d360b