From nobody Sat May 18 19:47:47 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=1626880320; cv=none; d=zohomail.com; s=zohoarc; b=U80vvl13WTMLzh9wSemv7+ho6LAt2uP3NX1Dx07qQGHSNLtZGWKSh4DAcdCDA68ru0c68TQ0Rqa4Jc01N33w+Vk/zxQvfYotj5CBjtb/XoXajnoxP0jXzADbH61Ep6zLebP11U0cP5f3yQGtzOBxe4PG2m34EAcWCz+p8srD6q4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626880320; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=q+RHA6VatZNb8CmzJ8p5WZhUnXsDxHpHtOVLLXZ39kM=; b=lOjIXkH4o8SNL1qQ7FV2RkkI6LMd7GEEs0pHMATBK2KJDm4E6GDJAaqEURNTC6Ik9C2maZCWBFWQ0OFs5OnhMD0Th5X/oeVk8Nzd1XzSFV0i44QbAGLOhj3suhR7i9LxSLx0dloo4ADQZVi+UB0PBNkTrhuUKHclT3v7+X+dnIM= 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 1626880320044568.4159027867045; Wed, 21 Jul 2021 08:12:00 -0700 (PDT) Received: from localhost ([::1]:56142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6Dt8-0002pk-42 for importer@patchew.org; Wed, 21 Jul 2021 11:11:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6DsL-00027S-3T for qemu-devel@nongnu.org; Wed, 21 Jul 2021 11:11:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34261) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6DsI-0001nu-H3 for qemu-devel@nongnu.org; Wed, 21 Jul 2021 11:11:08 -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-427-zjcDdJ_rOMm-iwnBn744EA-1; Wed, 21 Jul 2021 11:11:02 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 31144800D62 for ; Wed, 21 Jul 2021 15:11:01 +0000 (UTC) Received: from localhost (ovpn-114-233.ams2.redhat.com [10.36.114.233]) by smtp.corp.redhat.com (Postfix) with ESMTP id 883621009962; Wed, 21 Jul 2021 15:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626880263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q+RHA6VatZNb8CmzJ8p5WZhUnXsDxHpHtOVLLXZ39kM=; b=gExdbsFBDEjIqUXgOy/vmJlks/h7QenwhxHUVjTaZ0CaaTaWrdagHU4qvqERQ2OG2mQiVf qUrSeh1ObBuBxQViH0jzAZH1z4ahRlVD4w/As7lEVKT+j5zWCXOBn/DEO5aeDmbaiIekA/ RxckxJkEgV1MyYuFTSaSyIcP5zmhHNg= X-MC-Unique: zjcDdJ_rOMm-iwnBn744EA-1 From: Stefan Hajnoczi To: qemu-devel@nongnu.org Subject: [PATCH for-6.1] qemu-config: restore "machine" in qmp_query_command_line_options() Date: Wed, 21 Jul 2021 16:10:55 +0100 Message-Id: <20210721151055.424580-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=stefanha@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=216.205.24.124; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.459, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MIME_BASE64_TEXT=1.741, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: , Cc: Paolo Bonzini , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626880321258100001 Content-Type: text/plain; charset="utf-8" Commit d8fb7d0969d5c32b3d1b9e20b63ec6c0abe80be4 ("vl: switch -M parsing to keyval") stopped adding the "machine" QemuOptsList. This causes "machine" options to not show up in QMP query-command-line-options output. For example, libvirt cannot detect that kernel_irqchip support is available. Adjust the "machine" opts enumeration in qmp_query_command_line_options() so that options are properly reported. Fixes: d8fb7d0969d5 ("vl: switch -M parsing to keyval") Cc: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- I'm not familiar with this code. Better solutions welcome! --- util/qemu-config.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/util/qemu-config.c b/util/qemu-config.c index 84ee6dc4ea..52db5e743c 100644 --- a/util/qemu-config.c +++ b/util/qemu-config.c @@ -255,8 +255,6 @@ CommandLineOptionInfoList *qmp_query_command_line_optio= ns(bool has_option, info->option =3D g_strdup(vm_config_groups[i]->name); if (!strcmp("drive", vm_config_groups[i]->name)) { info->parameters =3D get_drive_infolist(); - } else if (!strcmp("machine", vm_config_groups[i]->name)) { - info->parameters =3D query_option_descs(machine_opts.desc); } else { info->parameters =3D query_option_descs(vm_config_groups[i]->desc); @@ -265,6 +263,13 @@ CommandLineOptionInfoList *qmp_query_command_line_opti= ons(bool has_option, } } =20 + if (!has_option || !strcmp(option, "machine")) { + info =3D g_malloc0(sizeof(*info)); + info->option =3D g_strdup("machine"); + info->parameters =3D query_option_descs(machine_opts.desc); + QAPI_LIST_PREPEND(conf_list, info); + } + if (conf_list =3D=3D NULL) { error_setg(errp, "invalid option name: %s", option); } --=20 2.31.1