From nobody Mon Feb 9 09:34:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600026859; cv=none; d=zohomail.com; s=zohoarc; b=g3NxAr8Y7ywfsvzYIqXS9ikvdedHupMRLf0GcaqJPrepbZVvdcPPqwJLFmL6PSHHE58SQCNop2/BSaPYvpXtwMgKS44OCZivvjZuwPNU5PXcBUWmjHGdyJODN2MPiF7ZFs/bjmUzrsWNRNGB9znwuTFWcshTj7oZRpVAwCvscXE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600026859; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=NqVl6gN7jdmxdMWUHNKtIYsmgxfGAIKur+nDAT3Se9E=; b=T4+ca4ImBheSt2uNqSVSo3Ezp7jsj46ROPIIpGEHfWnI8pJFm+OtuDX3r4EYXL8H+wP4rk4I+DWTEBsxB85EB6rPIgowGpgS/eaUW9iHBy5WOH/BFq8w8JAR9XUB+N7tACNeX48+TJUTG0MKMtsO5222i3Vu8IlSqZPI3TBcCFw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1600026859454479.30603307026706; Sun, 13 Sep 2020 12:54:19 -0700 (PDT) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-516-PIrsy2kMNwihtssv8438wA-1; Sun, 13 Sep 2020 15:54:16 -0400 Received: by mail-wr1-f70.google.com with SMTP id w7so5940428wrp.2 for ; Sun, 13 Sep 2020 12:54:16 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id y1sm15454264wma.36.2020.09.13.12.54.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Sep 2020 12:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600026858; 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: in-reply-to:in-reply-to:references:references; bh=NqVl6gN7jdmxdMWUHNKtIYsmgxfGAIKur+nDAT3Se9E=; b=SCkokcLvrMYfBnAM3I//sCetM6i3pyYApSCxtS4fhjswVviQ9kWNS0WijBs1LQ6gTpR1ew KyCFewGDBGnu6U6nOoPDNn6PKQZy+zW8JCVwbCFTX5vUwIaHI31tep1vQPQrcFgu5Hiuu9 uS3tGAoSw7c6yeaQBVR3s0eFsUShMRk= X-MC-Unique: PIrsy2kMNwihtssv8438wA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NqVl6gN7jdmxdMWUHNKtIYsmgxfGAIKur+nDAT3Se9E=; b=YTPHfLFMWsBDnjHU/SbIVzdtTEX52bbPoq02jeu735zhK7gpCgUNo4j+t2o20B4n8W 3eLlTIwYVRSIKugnbbVAOk7C68m3gs4Bd/ZEmVhyo3TUWNrry4Denq1GYiVV9963Rhgr NXqKfpKkPS3Rde0/auLj+I4dzuwLljobY56gRlbT9b7jwqkFOk5xzEgnODjtqtusRmV/ 4j4tJ5Epgjc9rc5MRprlMnQP2JW94mXsNrvl6PVz2nwm5LjGQMpU3B6DjZp3OyRkCze2 6lATh5uQBBGCz0ADXJCKzuOaZZZ7Iur6lk40+eBiIY61YwtDyUU9or36eLxnEuKeHLyH UJVg== X-Gm-Message-State: AOAM530vg4KiSoRQTD+aUHF89xjwcXwIHruJy6h1koItF08uFtnxfwwj DUUjGc63rYEz5FSe16EWU00RyU3MFqSN38k5BNgXQPwB8jyzMmLyh8xKEXkTEAF2O5ploWx0+Ie 9n28CZjuWIM862Q== X-Received: by 2002:a5d:6311:: with SMTP id i17mr11689500wru.243.1600026855312; Sun, 13 Sep 2020 12:54:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyulBi4lh5itvxJwq/+H6e9XW2IkB7Y8Cv8cHB4Av2ZszWJJMtd9B8Iwa019XSvXoASyQUf0A== X-Received: by 2002:a5d:6311:: with SMTP id i17mr11689487wru.243.1600026855136; Sun, 13 Sep 2020 12:54:15 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v5 5/8] qapi: Restrict query-uuid command to machine code Date: Sun, 13 Sep 2020 21:53:45 +0200 Message-Id: <20200913195348.1064154-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200913195348.1064154-1-philmd@redhat.com> References: <20200913195348.1064154-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Only qemu-system-FOO and qemu-storage-daemon provide QMP monitors, therefore such declarations and definitions are irrelevant for user-mode emulation. Restricting the query-uuid command to machine.json allows pulling less declarations/definitions to user-mode. Acked-by: Markus Armbruster Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- qapi/machine.json | 30 ++++++++++++++++++++++++++++++ qapi/misc.json | 30 ------------------------------ block/iscsi.c | 2 +- stubs/uuid.c | 2 +- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index dd2815fa670..9b849be2aa6 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -426,6 +426,36 @@ ## { 'command': 'query-target', 'returns': 'TargetInfo' } =20 +## +# @UuidInfo: +# +# Guest UUID information (Universally Unique Identifier). +# +# @UUID: the UUID of the guest +# +# Since: 0.14.0 +# +# Notes: If no UUID was specified for the guest, a null UUID is returned. +## +{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} } + +## +# @query-uuid: +# +# Query the guest UUID information. +# +# Returns: The @UuidInfo for the guest +# +# Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-uuid" } +# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } } +# +## +{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true } + ## # @GuidInfo: # diff --git a/qapi/misc.json b/qapi/misc.json index edcc91e1060..05db6295fe0 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -98,36 +98,6 @@ ## { 'command': 'query-kvm', 'returns': 'KvmInfo' } =20 -## -# @UuidInfo: -# -# Guest UUID information (Universally Unique Identifier). -# -# @UUID: the UUID of the guest -# -# Since: 0.14.0 -# -# Notes: If no UUID was specified for the guest, a null UUID is returned. -## -{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} } - -## -# @query-uuid: -# -# Query the guest UUID information. -# -# Returns: The @UuidInfo for the guest -# -# Since: 0.14.0 -# -# Example: -# -# -> { "execute": "query-uuid" } -# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } } -# -## -{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true } - ## # @IOThreadInfo: # diff --git a/block/iscsi.c b/block/iscsi.c index bd2122a3a44..e30a7e3606b 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -42,7 +42,7 @@ #include "qemu/uuid.h" #include "sysemu/replay.h" #include "qapi/error.h" -#include "qapi/qapi-commands-misc.h" +#include "qapi/qapi-commands-machine.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qstring.h" #include "crypto/secret.h" diff --git a/stubs/uuid.c b/stubs/uuid.c index 67f182fa3aa..e5112eb3f60 100644 --- a/stubs/uuid.c +++ b/stubs/uuid.c @@ -1,5 +1,5 @@ #include "qemu/osdep.h" -#include "qapi/qapi-commands-misc.h" +#include "qapi/qapi-commands-machine.h" #include "qemu/uuid.h" =20 UuidInfo *qmp_query_uuid(Error **errp) --=20 2.26.2