From nobody Mon Feb 9 19:52:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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=1599751384; cv=none; d=zohomail.com; s=zohoarc; b=CMEx9HDviscQvd+kPW23m34xSeUbmkc1KClHEsuq/q7ls0W1r3x1YjSw4LAc8ePylBzHgMv3znsvoD9jejsJurghHCqe3f7CWasBqOnupihEaIk4c2WyCZaWckfiziOZSlOv/axLu/Yhx16aDowuIMcI7ZzyRA61kei7UtOlRTQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599751384; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=0AFeQPAzVVhz+6GgdLSr+TbEOa0+V0j3040P7zvKLpM=; b=e3MLxSmlVfSLbc2fdFb4yD7M1pzqSuXyGVFLu8Fy7+SjnWjr9LezlaHPgLbYzlLe8/xzTFAgf9PZDUNo2QHeRMmJbS+auOFeHw0s/H5t3+5t88FMy7hzZRsGDudHHgln87+hKXVNtwq8nDCrfTXxx3+ese86aLVfg8QkZjdLBOU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1599751384958765.0281458102131; Thu, 10 Sep 2020 08:23:04 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-594-l7MagwqSPAW41LDeXOfLjQ-1; Thu, 10 Sep 2020 11:23:01 -0400 Received: by mail-wm1-f71.google.com with SMTP id s24so133185wmh.1 for ; Thu, 10 Sep 2020 08:23:01 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id q18sm9692188wre.78.2020.09.10.08.22.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599751383; 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=0AFeQPAzVVhz+6GgdLSr+TbEOa0+V0j3040P7zvKLpM=; b=TpaMsnFLa9aEFFU2Drxc45RuZ/6m7+2ffOtMdO8vaHrld6XB4vLFJrRvEl90x7/YoKJngY AZ7D07SqxQCOk5oIgUnc07Kk6E+NXAy2NG+ClFMDcCho9BDMxi8m5wC1ZTQ4/WN8szD1Q0 D/1QnfUDV1en7NEL15fwEblyyW3DQtg= X-MC-Unique: l7MagwqSPAW41LDeXOfLjQ-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=0AFeQPAzVVhz+6GgdLSr+TbEOa0+V0j3040P7zvKLpM=; b=Am+HlNzwKRemFnYeN30xdn+HyE9vgMmD/5HGiozF5PaW1rQXTUcFDYwrJG8bjuxtwu FrIOcIJ0fTqW7LWEy59KYACCD/HyWhDcVwDKsZ+J4yPSMsjCkv1+zJWsJ+dHzkOQv+Mu XaPbIfyJodjpMbMovfPPwBRC/p+nHO0xsEkL7kNeXsXz97SCJ366sOO/pJtQwKLVDSp6 QcFzl6KVVaCXKlKiwtjcb6XSEUylIN6QZThQomS07ddlnWg5M+Ob2OjOsHyuEO40h1Qw FMLuXdQn0hIMNzBLSaNND1HCHo1r8cgMKVsjZzHfY4LXTtHJcuyb7rnBBJrAXaq1veRj Wi0A== X-Gm-Message-State: AOAM531ACafTBzl+Q112VJRnuwfFgY1t48HWiG12OBr6glXpy+Vk249n 702g+dcnE2nTOQ99/eJoGQkn2ASyMcAdZsSTKI1fbC8yvGk4CBRnjp4FgPr0/m5iIoDTc2c3OPH gI8DZthOE5oRRnQ== X-Received: by 2002:a1c:99c7:: with SMTP id b190mr532433wme.44.1599751380616; Thu, 10 Sep 2020 08:23:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlJkaAW8h2mLyXwfntdZgkY1IMOIiICgj0RwYSoBNV5xtkrWrMpnykq6FYsWeTKpFELPayqw== X-Received: by 2002:a1c:99c7:: with SMTP id b190mr532414wme.44.1599751380372; Thu, 10 Sep 2020 08:23:00 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Ben Warren , "Dr. David Alan Gilbert" , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Richard Henderson , Eric Blake , Peter Lieven , Eduardo Habkost , Igor Mammedov , Ronnie Sahlberg , qemu-block@nongnu.org, Marcel Apfelbaum , Michael Roth , Markus Armbruster , David Hildenbrand , Paolo Bonzini , Kevin Wolf , "Michael S. Tsirkin" , Max Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 6/9] qapi: Restrict query-uuid command to machine code Date: Thu, 10 Sep 2020 17:22:22 +0200 Message-Id: <20200910152225.524322-7-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200910152225.524322-1-philmd@redhat.com> References: <20200910152225.524322-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 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 ba61e6ccea4..eb3bf81d008 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