Received: from eggs.gnu.org ([2001:4830:134:3::10]:46336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVaQH-0000IB-5J for qemu-devel@nongnu.org; Tue, 16 Feb 2016 02:51:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVaQD-00011g-W3 for qemu-devel@nongnu.org; Tue, 16 Feb 2016 02:51:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVaQD-00011a-QN for qemu-devel@nongnu.org; Tue, 16 Feb 2016 02:51:45 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 6C80580508 for ; Tue, 16 Feb 2016 07:51:45 +0000 (UTC) From: Peter Xu Date: Tue, 16 Feb 2016 15:50:56 +0800 Message-Id: <1455609061-16279-7-git-send-email-peterx@redhat.com> In-Reply-To: <1455609061-16279-1-git-send-email-peterx@redhat.com> References: <1455609061-16279-1-git-send-email-peterx@redhat.com> Subject: [Qemu-devel] [PATCH v7 06/11] dump-guest-memory: disable dump when in INMIGRATE state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: drjones@redhat.com, famz@redhat.com, armbru@redhat.com, peterx@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com, lersek@redhat.com Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dump.c b/dump.c index fed84a6..923e3a5 100644 --- a/dump.c +++ b/dump.c @@ -1654,6 +1654,11 @@ void qmp_dump_guest_memory(bool paging, const char *file, DumpState *s; Error *local_err = NULL; + if (runstate_check(RUN_STATE_INMIGRATE)) { + error_setg(errp, "Dump not allowed during incoming migration."); + return; + } + /* if there is a dump in background, we should wait until the dump * finished */ if (dump_in_progress()) { -- 2.4.3