From patchwork Thu Jun 21 16:47:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 932819 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41BSTD0DYxz9s2L for ; Fri, 22 Jun 2018 02:53:52 +1000 (AEST) Received: from localhost ([::1]:56652 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW2qD-0008Kz-Oc for incoming@patchwork.ozlabs.org; Thu, 21 Jun 2018 12:53:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW2kH-00045a-1r for qemu-devel@nongnu.org; Thu, 21 Jun 2018 12:47:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fW2kF-0003kb-4Q for qemu-devel@nongnu.org; Thu, 21 Jun 2018 12:47:41 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:49336 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fW2kE-0003kI-VU for qemu-devel@nongnu.org; Thu, 21 Jun 2018 12:47:39 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C86B4007389; Thu, 21 Jun 2018 16:47:38 +0000 (UTC) Received: from dgilbert-t530.redhat.com (ovpn-117-193.ams2.redhat.com [10.36.117.193]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A0A52156880; Thu, 21 Jun 2018 16:47:37 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, imammedo@redhat.com, sjitindarsingh@gmail.com, walling@linux.ibm.com Date: Thu, 21 Jun 2018 17:47:26 +0100 Message-Id: <20180621164727.36626-9-dgilbert@redhat.com> In-Reply-To: <20180621164727.36626-1-dgilbert@redhat.com> References: <20180621164727.36626-1-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 21 Jun 2018 16:47:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 21 Jun 2018 16:47:38 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dgilbert@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 8/9] hmp: add exit_preconfig X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: armbru@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Dr. David Alan Gilbert" Add the exit_preconfig command to return to normality. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Igor Mammedov Message-Id: <20180620153947.30834-7-dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- hmp-commands.hx | 19 +++++++++++++++++++ hmp.c | 8 ++++++++ hmp.h | 1 + 3 files changed, 28 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 4acf6a3222..ba9cdb8800 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -55,6 +55,25 @@ STEXI @item q or quit @findex quit Quit the emulator. +ETEXI + + { + .name = "exit_preconfig", + .args_type = "", + .params = "", + .help = "exit the preconfig state", + .cmd = hmp_exit_preconfig, + .flags = "p", + }, + +STEXI +@item exit_preconfig +@findex exit_preconfig +This command makes QEMU exit the preconfig state and proceed with +VM initialization using configuration data provided on the command line +and via the QMP monitor during the preconfig state. The command is only +available during the preconfig state (i.e. when the --preconfig command +line option was in use). ETEXI { diff --git a/hmp.c b/hmp.c index f40d8279cf..f601099f90 100644 --- a/hmp.c +++ b/hmp.c @@ -1068,6 +1068,14 @@ void hmp_system_powerdown(Monitor *mon, const QDict *qdict) qmp_system_powerdown(NULL); } +void hmp_exit_preconfig(Monitor *mon, const QDict *qdict) +{ + Error *err = NULL; + + qmp_exit_preconfig(&err); + hmp_handle_error(mon, &err); +} + void hmp_cpu(Monitor *mon, const QDict *qdict) { int64_t cpu_index; diff --git a/hmp.h b/hmp.h index 20f27439d3..33354f1bdd 100644 --- a/hmp.h +++ b/hmp.h @@ -44,6 +44,7 @@ void hmp_quit(Monitor *mon, const QDict *qdict); void hmp_stop(Monitor *mon, const QDict *qdict); void hmp_system_reset(Monitor *mon, const QDict *qdict); void hmp_system_powerdown(Monitor *mon, const QDict *qdict); +void hmp_exit_preconfig(Monitor *mon, const QDict *qdict); void hmp_cpu(Monitor *mon, const QDict *qdict); void hmp_memsave(Monitor *mon, const QDict *qdict); void hmp_pmemsave(Monitor *mon, const QDict *qdict);