From nobody Mon Feb 9 16:50:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1602504961; cv=none; d=zohomail.com; s=zohoarc; b=EaE2/eqWHXlHG2lk0i7/WcgmBvwvFKRYTtiqlqXcfjkb4Eu0TeKLYUpcARTPwdmfUD8W8Wkar1h5IjXBBXFof6WWxd+/NRdfvw0ur7ycptxSLcNG7WLSz9ISev+wphwpT8l2KM1yFI9I5sBCGYCbcRuO3wNj8H9+/d7Xl54rbdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602504961; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=eVbl2qcLfPZK8dPLUOsl+/Lzy6Uv2A5ihgqCUULlvlE=; b=g4MHePOL17bd0IahJxJDNYqB7daRr3JccvTH/7QL5BeTgL8HJUm/hS6Buv9H2D0saCkZurX7ZbPf1L+b1bvpC9luSRNXKQm0oyfHCb8SJe+/p5k+Vw9KrXu6p2H+re5/HaxacjcM3uCg5F76SfGtGG7NNGZiInxoEXbVo29Rl30= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 16025049616231002.9654575474033; Mon, 12 Oct 2020 05:16:01 -0700 (PDT) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-197-DZKqBvj8ODykr50IxhUW4g-1; Mon, 12 Oct 2020 08:15:59 -0400 Received: by mail-wm1-f70.google.com with SMTP id m14so5169437wmi.0 for ; Mon, 12 Oct 2020 05:15:58 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (106.red-83-59-162.dynamicip.rima-tde.net. [83.59.162.106]) by smtp.gmail.com with ESMTPSA id g83sm22920027wmf.15.2020.10.12.05.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 05:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602504960; 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=eVbl2qcLfPZK8dPLUOsl+/Lzy6Uv2A5ihgqCUULlvlE=; b=EpBuij37qpzP/DyVOeClt5swhn4kaKok96oOx0IywUVrqRDx7Gi92tpfkjIuSYlqaPVL1F nac3f8Ry/hk5yDZPp32Dv2PoBkDZbYQv1XMa1tubiYkDyHEfcgRd2FAydHVHKk2lIIHhwi afLJl6B1+i/YGm6uIQyWdwmuWgs4OV4= X-MC-Unique: DZKqBvj8ODykr50IxhUW4g-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=eVbl2qcLfPZK8dPLUOsl+/Lzy6Uv2A5ihgqCUULlvlE=; b=ODjPPFkeykk9AOMhzTd3njR5fN75c3k16YLRUeZF6kRHTbzy6g/VW5mJmIsFIOB0kc nU8m+AHYHck1KAtu9ozzRUXybCQm3flotx1AENtdNAgq8HmZR7nNBoeX3IGLe2rSSr8d DLJ0zz8uHSQLDW/binBXNW0PFrv8qaR33CAj/2RPIJV4EiuQgqB4AyHIcoQvtC2Ycgqw 5vTkbEmcGVc7eQBZaSLmzQ6I6BqJtq/mrFw1omLQWem4fUiZS+o52nWbm3269XdhJmOz IafP2JNh9KkFRlpJiZwmbK5RRJqY8POhYJEN5NjjsxQLga8DDu78r731WrmS+5LrTZHH D0tg== X-Gm-Message-State: AOAM533XybLRbV2dSPQHeQcAsDWCgllV1icKxxDf+gFQPLqoz03/RlAa pgEMllFNgPOPFrwiPrJOIa4rgKlp5777nhW3htsFYL1U3yee7m2g7kS+p/GB6kdtRzFievO9Fcu 9jQi46OjA+axboQ== X-Received: by 2002:adf:ef51:: with SMTP id c17mr31772481wrp.301.1602504957777; Mon, 12 Oct 2020 05:15:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymFeRl3j1aDWUmV0KgxGAEjfscYfHtOnoUSc501uNPKWvhbXQ1OAoLW4eYPA98OGvbNf0HRQ== X-Received: by 2002:adf:ef51:: with SMTP id c17mr31772466wrp.301.1602504957618; Mon, 12 Oct 2020 05:15:57 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Marcel Apfelbaum , Eduardo Habkost Cc: Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini Subject: [PATCH v2 4/5] qapi: Restrict 'query-kvm' command to machine code Date: Mon, 12 Oct 2020 14:15:35 +0200 Message-Id: <20201012121536.3381997-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201012121536.3381997-1-philmd@redhat.com> References: <20201012121536.3381997-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 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Restricting query-kvm to machine.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- qapi/machine.json | 30 ++++++++++++++++++++++++++++++ qapi/misc.json | 30 ------------------------------ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index 5a3bbcae01b..7c9a263778d 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -561,6 +561,36 @@ ## { 'command': 'inject-nmi' } =20 +## +# @KvmInfo: +# +# Information about support for KVM acceleration +# +# @enabled: true if KVM acceleration is active +# +# @present: true if KVM acceleration is built into this executable +# +# Since: 0.14.0 +## +{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } + +## +# @query-kvm: +# +# Returns information about KVM acceleration +# +# Returns: @KvmInfo +# +# Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-kvm" } +# <- { "return": { "enabled": true, "present": true } } +# +## +{ 'command': 'query-kvm', 'returns': 'KvmInfo' } + ## # @NumaOptionsType: # diff --git a/qapi/misc.json b/qapi/misc.json index 9fa702b0f66..363115c1edb 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -68,36 +68,6 @@ ## { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true } =20 -## -# @KvmInfo: -# -# Information about support for KVM acceleration -# -# @enabled: true if KVM acceleration is active -# -# @present: true if KVM acceleration is built into this executable -# -# Since: 0.14.0 -## -{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } - -## -# @query-kvm: -# -# Returns information about KVM acceleration -# -# Returns: @KvmInfo -# -# Since: 0.14.0 -# -# Example: -# -# -> { "execute": "query-kvm" } -# <- { "return": { "enabled": true, "present": true } } -# -## -{ 'command': 'query-kvm', 'returns': 'KvmInfo' } - ## # @IOThreadInfo: # --=20 2.26.2