From nobody Sat May 18 22:31:10 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1635160322; cv=none; d=zohomail.com; s=zohoarc; b=VHfNscR14BL66eFpn7YTzdbNLmJ6eooRBT2W4bpajZcqQT0Y0fIpdkMVe+iyCJ7gDKWpvmjtMCDPQRqvdlCz+752P1Tmf4XonGZxXn7fX1c15NtLTJSFhJbGLQcH/jfSrQRHPb9jwDTbW6cjcyIguIpRJ8GnMQ60Wf2PUvQTdO8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635160322; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=rHS/SiEYGWt3UwElG9d7AZ++K4uQxrv+/xonv2j8tzI=; b=aDFmDTv4sFBJ2pzVM/w0Wm6tu8IKLU+X/j+lv4kGZrDMMRgG6SZC/i2oMUjZKA3MF026RFrwrW1IviP3TzwGIK6ZEsVPdqle0Hf+46RSOmvCm5NPMW80DB+ElgWaGq0+GD8bsKWcoxmckvVR2wR0ZchsXpToFbxcBXNsCrFN6UM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1635160322790812.7023824168873; Mon, 25 Oct 2021 04:12:02 -0700 (PDT) Received: from localhost ([::1]:48312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mextZ-0003hK-63 for importer@patchew.org; Mon, 25 Oct 2021 07:12:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mexri-0002nz-BY for qemu-devel@nongnu.org; Mon, 25 Oct 2021 07:10:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.153.124]:32361) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mexrf-0003io-L8 for qemu-devel@nongnu.org; Mon, 25 Oct 2021 07:10:05 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-470-HipuOq-INIO1WVqTpP20wA-1; Mon, 25 Oct 2021 07:08:17 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 43FB4101AFBF for ; Mon, 25 Oct 2021 11:08:16 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id BEF0F57CAB for ; Mon, 25 Oct 2021 11:08:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635160202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rHS/SiEYGWt3UwElG9d7AZ++K4uQxrv+/xonv2j8tzI=; b=SSBbFu96tCcdHLAxc6SNOL0r/87GsPnPFzHEKIZNa6EvHTOZV7CsVDEuddx/hHPHgn5CTv Zoc19fCQNVYuVGDPPpp/YnA3FkG6pNjIO9+yOotsG57eHrpnBOhnl1uzk73vrGfxbBX0Fj BHJKNAmmYAgp1hiRZ28q37yWqW33XkI= X-MC-Unique: HipuOq-INIO1WVqTpP20wA-1 From: Michal Privoznik To: qemu-devel@nongnu.org Subject: [PATCH] qmp: Stabilize preconfig Date: Mon, 25 Oct 2021 13:08:05 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mprivozn@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.153.124; envelope-from=mprivozn@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1635160324113100001 Content-Type: text/plain; charset="utf-8" The -preconfig option and exit-preconfig command are around for quite some time now. However, they are still marked as unstable. This is suboptimal because it may block some upper layer in consuming it. In this specific case - Libvirt avoids using experimental features. Signed-off-by: Michal Privoznik --- docs/system/managed-startup.rst | 2 +- monitor/hmp-cmds.c | 2 +- qapi/misc.json | 6 +++--- qemu-options.hx | 5 ++--- softmmu/vl.c | 4 ++-- tests/qtest/numa-test.c | 8 ++++---- tests/qtest/qmp-test.c | 6 +++--- 7 files changed, 16 insertions(+), 17 deletions(-) diff --git a/docs/system/managed-startup.rst b/docs/system/managed-startup.= rst index 9bcf98ea79..f3291b867b 100644 --- a/docs/system/managed-startup.rst +++ b/docs/system/managed-startup.rst @@ -32,4 +32,4 @@ machine, including but not limited to: - ``query-qmp-schema`` - ``query-commands`` - ``query-status`` -- ``x-exit-preconfig`` +- ``exit-preconfig`` diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index bcaa41350e..5ccb823b97 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -1001,7 +1001,7 @@ void hmp_exit_preconfig(Monitor *mon, const QDict *qd= ict) { Error *err =3D NULL; =20 - qmp_x_exit_preconfig(&err); + qmp_exit_preconfig(&err); hmp_handle_error(mon, err); } =20 diff --git a/qapi/misc.json b/qapi/misc.json index 5c2ca3b556..0f75d60996 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -175,7 +175,7 @@ { 'command': 'cont' } =20 ## -# @x-exit-preconfig: +# @exit-preconfig: # # Exit from "preconfig" state # @@ -191,11 +191,11 @@ # # Example: # -# -> { "execute": "x-exit-preconfig" } +# -> { "execute": "exit-preconfig" } # <- { "return": {} } # ## -{ 'command': 'x-exit-preconfig', 'allow-preconfig': true } +{ 'command': 'exit-preconfig', 'allow-preconfig': true } =20 ## # @human-monitor-command: diff --git a/qemu-options.hx b/qemu-options.hx index 5f375bbfa6..d27778869b 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3936,10 +3936,9 @@ SRST ``--preconfig`` Pause QEMU for interactive configuration before the machine is created, which allows querying and configuring properties that will - affect machine initialization. Use QMP command 'x-exit-preconfig' to + affect machine initialization. Use QMP command 'exit-preconfig' to exit the preconfig state and move to the next state (i.e. run guest - if -S isn't used or pause the second time if -S is used). This - option is experimental. + if -S isn't used or pause the second time if -S is used). ERST =20 DEF("S", 0, QEMU_OPTION_S, \ diff --git a/softmmu/vl.c b/softmmu/vl.c index af0c4cbd99..09a9ec06f9 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2730,7 +2730,7 @@ static void qemu_machine_creation_done(void) } } =20 -void qmp_x_exit_preconfig(Error **errp) +void qmp_exit_preconfig(Error **errp) { if (phase_check(PHASE_MACHINE_INITIALIZED)) { error_setg(errp, "The command is permitted only before machine ini= tialization"); @@ -3770,7 +3770,7 @@ void qemu_init(int argc, char **argv, char **envp) } =20 if (!preconfig_requested) { - qmp_x_exit_preconfig(&error_fatal); + qmp_exit_preconfig(&error_fatal); } qemu_init_displays(); accel_setup_post(current_machine); diff --git a/tests/qtest/numa-test.c b/tests/qtest/numa-test.c index 90bf68a5b3..bea95b1832 100644 --- a/tests/qtest/numa-test.c +++ b/tests/qtest/numa-test.c @@ -285,7 +285,7 @@ static void pc_dynamic_cpu_cfg(const void *data) " 'arguments': { 'type': 'cpu', 'node-id': 1, 'socket-id': 0 } }")= )); =20 /* let machine initialization to complete and run */ - g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig= ' }"))); + g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'exit-preconfig' = }"))); qtest_qmp_eventwait(qs, "RESUME"); =20 /* check that CPUs are mapped as expected */ @@ -443,7 +443,7 @@ static void pc_hmat_build_cfg(const void *data) =20 /* let machine initialization to complete and run */ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, - "{ 'execute': 'x-exit-preconfig' }"))); + "{ 'execute': 'exit-preconfig' }"))); qtest_qmp_eventwait(qs, "RESUME"); =20 qtest_quit(qs); @@ -482,7 +482,7 @@ static void pc_hmat_off_cfg(const void *data) =20 /* let machine initialization to complete and run */ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, - "{ 'execute': 'x-exit-preconfig' }"))); + "{ 'execute': 'exit-preconfig' }"))); qtest_qmp_eventwait(qs, "RESUME"); =20 qtest_quit(qs); @@ -533,7 +533,7 @@ static void pc_hmat_erange_cfg(const void *data) =20 /* let machine initialization to complete and run */ g_assert_false(qmp_rsp_is_err(qtest_qmp(qs, - "{ 'execute': 'x-exit-preconfig' }"))); + "{ 'execute': 'exit-preconfig' }"))); qtest_qmp_eventwait(qs, "RESUME"); =20 qtest_quit(qs); diff --git a/tests/qtest/qmp-test.c b/tests/qtest/qmp-test.c index cd27fae3de..f0aaa94d8a 100644 --- a/tests/qtest/qmp-test.c +++ b/tests/qtest/qmp-test.c @@ -299,7 +299,7 @@ static void test_qmp_preconfig(void) qobject_unref(rsp); =20 /* exit preconfig state */ - g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig= ' }"))); + g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'exit-preconfig' = }"))); qtest_qmp_eventwait(qs, "RESUME"); =20 /* check that query-status returns running state */ @@ -309,8 +309,8 @@ static void test_qmp_preconfig(void) g_assert_cmpstr(qdict_get_try_str(ret, "status"), =3D=3D, "running"); qobject_unref(rsp); =20 - /* check that x-exit-preconfig returns error after exiting preconfig */ - g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig'= }"))); + /* check that exit-preconfig returns error after exiting preconfig */ + g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'exit-preconfig' }= "))); =20 /* enabled commands, no error expected */ g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast'= }"))); --=20 2.32.0