From nobody Mon Feb 9 23:39:11 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=1600026855; cv=none; d=zohomail.com; s=zohoarc; b=VJ5KXFKjeUPtZSLK4QpPME7hJAOW6PQ4u3zUxaR+ZdH+gs52amEMHII/ExggFzFDZQJhQYRsQcBywe64TUDVy8dxtCCfgr2NtTCU4EDtUSvW3hDQu5Lp6YtQ3cmXP/8jTH7NzCG8T9wMg0IFtUL5TVZa23nXuuT+aF/6YyEeSdc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600026855; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=fQxGCFGFZIPrIS0+25PGhLER6VDhh3qQR1cx3IEfDOs=; b=TSNl7HgUe0r7vJ+pZ1Yi0qBDdj/GMvJQx1LITcRNxsDIlSlHp7AkveH0KK0YJ2aJlTRkTbhQmsjdW1pmTGGmh0oTn3aCL8eQUhEYO9rsk8RJBcEdyLTX1o5jWy0P64DqRzRnVRVHnp8NyCzrhU4WXyUlOAC7qpYRlYcRWOgAZ0s= 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-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1600026855062797.4916197298471; Sun, 13 Sep 2020 12:54:15 -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-268-0Kg8BrY1MImN2xYaqBxKaQ-1; Sun, 13 Sep 2020 15:54:12 -0400 Received: by mail-wm1-f71.google.com with SMTP id s24so2739068wmh.1 for ; Sun, 13 Sep 2020 12:54:12 -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 g12sm16949914wro.89.2020.09.13.12.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Sep 2020 12:54:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600026854; 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=fQxGCFGFZIPrIS0+25PGhLER6VDhh3qQR1cx3IEfDOs=; b=ZAHt1DSrEvkAhO/wic2ZVU8js6CyrSpuDJoSaa3ox8N/OEcOZToUj9VM/ytvx/ysofZk8x j5UVNDVryhrkYsye6eMTozTCvbHzP30JkcsjYu3hhIn5+J2rlTA2A+i0OVRVJWRy/5BTwL 22Lf3/QcCrBzEoKh0XkBnEf5ekAYpm0= X-MC-Unique: 0Kg8BrY1MImN2xYaqBxKaQ-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=fQxGCFGFZIPrIS0+25PGhLER6VDhh3qQR1cx3IEfDOs=; b=DoWQOKrJkXztodwRNTvVfdTvdE2aqd4E8jzQ1OPSTl4f0S4kuaRI6qMLnhIrMlsU2d E3zNasDA1Fl6Bw8z0roIROa3KaOSD5cGgFMce4s0GwVGQZP8irdD/fHfjJjaet8NfY2i 4Lhj1ZK2//TGQ91nFZj/ZyRaquyHr0cJyOFAUIfaitcvY8kwaC9gLIe7zzwIHzxaEFLp xZU2PnyfIDvABGKgYdr1mfWTgkBtLks7rN8hnYXoAPP7WVAfV83ktgsTFYbnInFqw6Cu joVWyHEoMDr3+oe0vqV0Of3JyecR4tTvfOwQ8/fbXcW2RsVh2Wh8FEUiZdUCV2ZxExq3 hxdQ== X-Gm-Message-State: AOAM532DJsVk2z2IMNkWh4fDZ/xMdkGNGejZ7vpK0NiKbGMnnj6HydTw kJ3b/bLEWyJAKEQ2b6/Si9T+jLi3dK9evvA6CXZUd6YRv2NsYDhdvt73/HqXwDkXw8hS0vTRSg8 xhhDXhBZPSeh0vw== X-Received: by 2002:a7b:cb4e:: with SMTP id v14mr11600948wmj.5.1600026850768; Sun, 13 Sep 2020 12:54:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiXS9OvI/5tKHzLKENq3JUzOxjJWcGitz9hO833vmqPKAKNMWoQTQs70rRZgMaOSKxa+NGaQ== X-Received: by 2002:a7b:cb4e:: with SMTP id v14mr11600940wmj.5.1600026850609; Sun, 13 Sep 2020 12:54:10 -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 4/8] qapi: Restrict query-vm-generation-id command to machine code Date: Sun, 13 Sep 2020 21:53:44 +0200 Message-Id: <20200913195348.1064154-5-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.003 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-vm-generation-id command to machine.json allows pulling less declarations/definitions to user-mode. Acked-by: Igor Mammedov Acked-by: Markus Armbruster Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- qapi/machine.json | 20 ++++++++++++++++++++ qapi/misc.json | 21 --------------------- hw/acpi/vmgenid.c | 2 +- stubs/vmgenid.c | 2 +- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index 04f0a907c75..dd2815fa670 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -426,6 +426,26 @@ ## { 'command': 'query-target', 'returns': 'TargetInfo' } =20 +## +# @GuidInfo: +# +# GUID information. +# +# @guid: the globally unique identifier +# +# Since: 2.9 +## +{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} } + +## +# @query-vm-generation-id: +# +# Show Virtual Machine Generation ID +# +# Since: 2.9 +## +{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' } + ## # @LostTickPolicy: # diff --git a/qapi/misc.json b/qapi/misc.json index 7a14c50094d..edcc91e1060 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -1479,24 +1479,3 @@ # ## { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} } - -## -# @GuidInfo: -# -# GUID information. -# -# @guid: the globally unique identifier -# -# Since: 2.9 -## -{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} } - -## -# @query-vm-generation-id: -# -# Show Virtual Machine Generation ID -# -# Since: 2.9 -## -{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' } - diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c index 53db6af75d0..2c8152d5088 100644 --- a/hw/acpi/vmgenid.c +++ b/hw/acpi/vmgenid.c @@ -12,7 +12,7 @@ =20 #include "qemu/osdep.h" #include "qapi/error.h" -#include "qapi/qapi-commands-misc.h" +#include "qapi/qapi-commands-machine.h" #include "qemu/module.h" #include "hw/acpi/acpi.h" #include "hw/acpi/aml-build.h" diff --git a/stubs/vmgenid.c b/stubs/vmgenid.c index 568e42b0648..bfad656c6cc 100644 --- a/stubs/vmgenid.c +++ b/stubs/vmgenid.c @@ -1,6 +1,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "qapi/qapi-commands-misc.h" +#include "qapi/qapi-commands-machine.h" #include "qapi/qmp/qerror.h" =20 GuidInfo *qmp_query_vm_generation_id(Error **errp) --=20 2.26.2