From nobody Thu May 2 15:41:32 2024 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=1601645976; cv=none; d=zohomail.com; s=zohoarc; b=YAy2fwRtJbuNR/kEPsDoeS3l1KfKDO2sijhA7mXs0CepyIs5iZxVfQs2hELTYvn7/IP31jYyGsmjrY4pw0HsIsSx9+vwMs9zZ7VfZ7i3Ow/6uKDvpejexQi8HxMdumpXTdqEAS5S5WbHy4XLqEKeKPbkqIoBV8NVUi2PEZh3158= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601645976; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=iLAVKEu0s8buMQigPSDDQRm3nwhcH7vFMDI5aBMruk4=; b=Z8tmwHkYdJ8T3Z96/1/X4HSP9WWDBJXINNZ+fXDM/g/4TKM07WvMZywyyRd7DKSmm/NNtdw0NcrYQnpx8MMQ2ifMs74gL3j0bXa1FAk7HrT1/8uDOeiN7vj97FWJ1oLFYcj7LjDuQry9N0aHAEluwC5LaFYbeUoljvDsCpoYk1A= 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 1601645976142906.4898879507195; Fri, 2 Oct 2020 06:39:36 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-435-LEBSnRt4PomGR0Itsc-40Q-1; Fri, 02 Oct 2020 09:39:33 -0400 Received: by mail-wr1-f69.google.com with SMTP id r16so553967wrm.18 for ; Fri, 02 Oct 2020 06:39:33 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (74.red-83-53-161.dynamicip.rima-tde.net. [83.53.161.74]) by smtp.gmail.com with ESMTPSA id 91sm1979455wrq.9.2020.10.02.06.39.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 06:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601645974; 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=iLAVKEu0s8buMQigPSDDQRm3nwhcH7vFMDI5aBMruk4=; b=MAPUZ6OtTa7F65/yqXmUfC2qx8tgMCYX9FyYLk6J9RTic2cn3s4obJZNiMGfStUqbGBcTQ i6C1oesWGpdlmmRmARB9/VBSGU1oNE5Sba3nY2ErhNNHDlQq3dchSEMp7n+0iE1qcWV5Fa Z5Nkrwutab+fcBWAsyu2GaUq/Yip6s4= X-MC-Unique: LEBSnRt4PomGR0Itsc-40Q-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=iLAVKEu0s8buMQigPSDDQRm3nwhcH7vFMDI5aBMruk4=; b=VtSeGnqnx3KDHkpnttqn2jRMZVCmqCLQQ3MvPm1Bw6Jha/lhNgy+JE0SUs1TGd7pn2 OwQujmWyM1KKW9/085YmrO7D2qfV/7wXYlmB9lot13IU8USjjuq4wHa+udW1e54PyG/v rEEGxR+IYBP99DemQRYF86uNeq7WCkAJ4KW0k2jj+EZ6ccV48iyBFxU54IB5IhgG4ZsH lxVuxZ70Dy83vbvSEsGP7zhmBgKa+yqBLiu9zfr40akAvQ0NCjzTQiaAuqSxsVz/mqPu P2nJ52Xc7o73kZ8EjyVn+8nrR2A8mhkuZkDeAeuK8ZAEwX8gqedS4ROwnvvnbVel+EuA MGuA== X-Gm-Message-State: AOAM532kQ43PpObseZSs548wc2D3wbNu64pwVMRsNSMA2TIpBjQTJ2rM 3imwZq+Xq+t6XL5V3/b8sj50efo0rENZ5EJyaVm9VvQymj730Bh0phwXz+TIE6X0kl+BsQqC/qG ypkamj82ziU7adw== X-Received: by 2002:a7b:cc02:: with SMTP id f2mr2894066wmh.1.1601645972084; Fri, 02 Oct 2020 06:39:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqQv1qlyQpjgjGTEtLJvUYyUltyIpiDUFPSX1enMbbtlK6dt49SmY4VWfHBJPv80MAhGkeEw== X-Received: by 2002:a7b:cc02:: with SMTP id f2mr2894034wmh.1.1601645971831; Fri, 02 Oct 2020 06:39:31 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Marcel Apfelbaum , "Dr. David Alan Gilbert" , xen-devel@lists.xenproject.org, Gerd Hoffmann , Markus Armbruster , Paolo Bonzini , Juan Quintela , Stefano Stabellini , Anthony Perard , Eric Blake , Paul Durrant , Peter Maydell , "Michael S. Tsirkin" , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/5] qapi: Restrict 'inject-nmi' command to machine code Date: Fri, 2 Oct 2020 15:39:19 +0200 Message-Id: <20201002133923.1716645-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201002133923.1716645-1-philmd@redhat.com> References: <20201002133923.1716645-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 'inject-nmi' to machine.json pulls slightly less QAPI-generated code into user-mode and tools. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini --- qapi/machine.json | 20 ++++++++++++++++++++ qapi/misc.json | 20 -------------------- softmmu/cpus.c | 1 + 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index 756dacb06f..073b1c98b2 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -484,6 +484,26 @@ { 'enum': 'LostTickPolicy', 'data': ['discard', 'delay', 'slew' ] } =20 +## +# @inject-nmi: +# +# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all = CPUs (ppc64). +# The command fails when the guest doesn't support injecting. +# +# Returns: If successful, nothing +# +# Since: 0.14.0 +# +# Note: prior to 2.1, this command was only supported for x86 and s390 VMs +# +# Example: +# +# -> { "execute": "inject-nmi" } +# <- { "return": {} } +# +## +{ 'command': 'inject-nmi' } + ## # @NumaOptionsType: # diff --git a/qapi/misc.json b/qapi/misc.json index 694d2142f3..37b3e04cec 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -341,26 +341,6 @@ ## { 'command': 'system_wakeup' } =20 -## -# @inject-nmi: -# -# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all = CPUs (ppc64). -# The command fails when the guest doesn't support injecting. -# -# Returns: If successful, nothing -# -# Since: 0.14.0 -# -# Note: prior to 2.1, this command was only supported for x86 and s390 VMs -# -# Example: -# -# -> { "execute": "inject-nmi" } -# <- { "return": {} } -# -## -{ 'command': 'inject-nmi' } - ## # @human-monitor-command: # diff --git a/softmmu/cpus.c b/softmmu/cpus.c index ac8940d52e..bd040d6cdd 100644 --- a/softmmu/cpus.c +++ b/softmmu/cpus.c @@ -29,6 +29,7 @@ #include "migration/vmstate.h" #include "monitor/monitor.h" #include "qapi/error.h" +#include "qapi/qapi-commands-machine.h" #include "qapi/qapi-commands-misc.h" #include "qapi/qapi-events-run-state.h" #include "qapi/qmp/qerror.h" --=20 2.26.2 From nobody Thu May 2 15:41:32 2024 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=1601645981; cv=none; d=zohomail.com; s=zohoarc; b=bj788NXaOfdMaeuvM7T83FecMbR1NufM7hKUm92FV6E79EXPTRy/rq5g9wX3GHMO4fTnIqaib6ez+sw5UJb5BnH6bmFi2EljlyD2PFvZn1gkS4jebMPEuXputpc1Nd96v46R2lGYHU8L1TwEmkIGKtLSgV54BVvKXqfra6q7LvY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601645981; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=kbK1m63mIh7G9YoSTt+lY9Rt1IngmCv52ys5F1Xv+Ck=; b=P0c5o7BWycuYc175UIAEcgr08FMc8E4ocsLHhrGxSO2C72JJa8aitMrt6peVnepfihI6iUlG3GyTtw1CL6fMvvd+QzYvL4In/ogEZdETEUmgELo4D2JQU0bD90LCxfPRa+NeoMwxnmoqq6VVcmj1/rvxGQ+ipjcPRmWJFOadpMY= 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 1601645981463578.2844226102136; Fri, 2 Oct 2020 06:39:41 -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-484-HL8WkiTePaG-cAcbhd93Xg-1; Fri, 02 Oct 2020 09:39:38 -0400 Received: by mail-wm1-f70.google.com with SMTP id y6so539166wmi.7 for ; Fri, 02 Oct 2020 06:39:38 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (74.red-83-53-161.dynamicip.rima-tde.net. [83.53.161.74]) by smtp.gmail.com with ESMTPSA id r19sm1784306wmh.7.2020.10.02.06.39.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 06:39:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601645980; 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=kbK1m63mIh7G9YoSTt+lY9Rt1IngmCv52ys5F1Xv+Ck=; b=Uu3UBB/eBIZLRBxr/GKPc14VcSn2csCaxmXks06WflkrmIpYV2LU+DmKnQ+akzhTI+nipx QuR9bXjyODJjqrv8WyqmIQw0oopDoIHWDh/3k5bJcmDoTSjvROhQFa82GfXqqxp+Vhecey Cff8hZKjnDACwarcTk8YZGmgaNWQclc= X-MC-Unique: HL8WkiTePaG-cAcbhd93Xg-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=kbK1m63mIh7G9YoSTt+lY9Rt1IngmCv52ys5F1Xv+Ck=; b=bePfh8T4n161TXYM8PW6gYLbR0i9GbmADHmY+E+RLLlXqwA+y7cstr/tGWopYSXeD2 WJR7y7H3luwUWU2PIqZfDkQ96nwFtx/uDCabnC/TEGAyyy4/egF9PQZd5ZCE02JD1Bdw uLnxj7sGYjkrqg/vsCnYxhjEkMPnK+WhTPyJ8oigktzsajWWt9Mf6xEU/C0Vr2fYDyfq ekJs3xegxMB5AEFrlxQWRp/FkX/LONfofHT9hwl5JhZFtIlzcvu4j2SWWFkiadcnKo0z ldZkIAMelxTx55CPOFtnx0xw92aKIexAwfX4E0YzeAyB4bHJbr+KHcsdjDwz5zcG3BTw PI4w== X-Gm-Message-State: AOAM532Z6pmuTcTD+ntxTdJ60Mv7jSQcdg4j8akR7+03Ef3eeTZYJ76o NFAwqbxWZGiLTLozRUWvTg8lE5H6gT3U1umN4ap4ryIqWDEymKKsPsgF5TJW07r64aonXDg6bNP LwEQTZ6iHteGjpA== X-Received: by 2002:a1c:63c1:: with SMTP id x184mr3042783wmb.138.1601645977324; Fri, 02 Oct 2020 06:39:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwD/heYmqaLVMQtumsMQOWyseI2hOgaXTBn2HXZs+0th/9VfQZ/6fqWSoQPr8a9Q2Va+FrerA== X-Received: by 2002:a1c:63c1:: with SMTP id x184mr3042765wmb.138.1601645977099; Fri, 02 Oct 2020 06:39:37 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Marcel Apfelbaum , "Dr. David Alan Gilbert" , xen-devel@lists.xenproject.org, Gerd Hoffmann , Markus Armbruster , Paolo Bonzini , Juan Quintela , Stefano Stabellini , Anthony Perard , Eric Blake , Paul Durrant , Peter Maydell , "Michael S. Tsirkin" , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/5] qapi: Restrict 'system wakeup/reset/powerdown' commands to machine.json Date: Fri, 2 Oct 2020 15:39:20 +0200 Message-Id: <20201002133923.1716645-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201002133923.1716645-1-philmd@redhat.com> References: <20201002133923.1716645-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 system_wakeup/system_reset/system_powerdown to machine.json pulls slightly less QAPI-generated code into user-mode and tools. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini --- qapi/machine.json | 57 +++++++++++++++++++++++++++++++++++++++++++++++ qapi/misc.json | 57 ----------------------------------------------- ui/gtk.c | 1 + ui/cocoa.m | 1 + 4 files changed, 59 insertions(+), 57 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index 073b1c98b2..55328d4f3c 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -452,6 +452,63 @@ ## { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' } =20 +## +# @system_reset: +# +# Performs a hard reset of a guest. +# +# Since: 0.14.0 +# +# Example: +# +# -> { "execute": "system_reset" } +# <- { "return": {} } +# +## +{ 'command': 'system_reset' } + +## +# @system_powerdown: +# +# Requests that a guest perform a powerdown operation. +# +# Since: 0.14.0 +# +# Notes: A guest may or may not respond to this command. This command +# returning does not indicate that a guest has accepted the request= or +# that it has shut down. Many guests will respond to this command = by +# prompting the user in some way. +# Example: +# +# -> { "execute": "system_powerdown" } +# <- { "return": {} } +# +## +{ 'command': 'system_powerdown' } + +## +# @system_wakeup: +# +# Wake up guest from suspend. If the guest has wake-up from suspend +# support enabled (wakeup-suspend-support flag from +# query-current-machine), wake-up guest from suspend if the guest is +# in SUSPENDED state. Return an error otherwise. +# +# Since: 1.1 +# +# Returns: nothing. +# +# Note: prior to 4.0, this command does nothing in case the guest +# isn't suspended. +# +# Example: +# +# -> { "execute": "system_wakeup" } +# <- { "return": {} } +# +## +{ 'command': 'system_wakeup' } + ## # @LostTickPolicy: # diff --git a/qapi/misc.json b/qapi/misc.json index 37b3e04cec..cce2e71e9c 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -177,40 +177,6 @@ ## { 'command': 'stop' } =20 -## -# @system_reset: -# -# Performs a hard reset of a guest. -# -# Since: 0.14.0 -# -# Example: -# -# -> { "execute": "system_reset" } -# <- { "return": {} } -# -## -{ 'command': 'system_reset' } - -## -# @system_powerdown: -# -# Requests that a guest perform a powerdown operation. -# -# Since: 0.14.0 -# -# Notes: A guest may or may not respond to this command. This command -# returning does not indicate that a guest has accepted the request= or -# that it has shut down. Many guests will respond to this command = by -# prompting the user in some way. -# Example: -# -# -> { "execute": "system_powerdown" } -# <- { "return": {} } -# -## -{ 'command': 'system_powerdown' } - ## # @memsave: # @@ -318,29 +284,6 @@ ## { 'command': 'x-exit-preconfig', 'allow-preconfig': true } =20 -## -# @system_wakeup: -# -# Wake up guest from suspend. If the guest has wake-up from suspend -# support enabled (wakeup-suspend-support flag from -# query-current-machine), wake-up guest from suspend if the guest is -# in SUSPENDED state. Return an error otherwise. -# -# Since: 1.1 -# -# Returns: nothing. -# -# Note: prior to 4.0, this command does nothing in case the guest -# isn't suspended. -# -# Example: -# -# -> { "execute": "system_wakeup" } -# <- { "return": {} } -# -## -{ 'command': 'system_wakeup' } - ## # @human-monitor-command: # diff --git a/ui/gtk.c b/ui/gtk.c index b11594d817..a752aa22be 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -33,6 +33,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qapi/qapi-commands-control.h" +#include "qapi/qapi-commands-machine.h" #include "qapi/qapi-commands-misc.h" #include "qemu/cutils.h" =20 diff --git a/ui/cocoa.m b/ui/cocoa.m index 0910b4a716..f32adc3074 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -35,6 +35,7 @@ #include "sysemu/cpu-throttle.h" #include "qapi/error.h" #include "qapi/qapi-commands-block.h" +#include "qapi/qapi-commands-machine.h" #include "qapi/qapi-commands-misc.h" #include "sysemu/blockdev.h" #include "qemu-version.h" --=20 2.26.2 From nobody Thu May 2 15:41:32 2024 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=1601645991; cv=none; d=zohomail.com; s=zohoarc; b=Y8v1hmbOr2Ds4B+GkNXaCVXBS8YBJkn05drRdWagkXq7Ke+v0pVw0twFl6FfNR3PvuHo3f8gO6TMKHkLJwYNFfNdbD4msZfvvrj/ckJe79J2dr3gB/IuXEeHyLT8BTrB3daWm7KVsBGWF0fylJFDmrLA2htxjo/YouujFXPljEM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601645991; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=l++0FncV4p/balcOSro5u4OfFvevG6nmzhJ8fBAOs6w=; b=fb4764CDUzxNiXUJzvA6/1NEsCw10v3KNid7C5xgcRqkrLxVjdUFbPdGKNKOuymOtqhhZga5u0m24XCGQQrNWecf+QdFt2jRCkKFQ9UIE4ewZZXm7Q4pJlLyDJ0CPiKqMhgp5VXn2qIhqUmYEk06+inlowjUu7FrMa5883rDnLQ= 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 1601645991898485.9130599992495; Fri, 2 Oct 2020 06:39:51 -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-328-cHdHvFR3MSSYTliAzDBXQg-1; Fri, 02 Oct 2020 09:39:44 -0400 Received: by mail-wm1-f70.google.com with SMTP id y6so539245wmi.7 for ; Fri, 02 Oct 2020 06:39:43 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (74.red-83-53-161.dynamicip.rima-tde.net. [83.53.161.74]) by smtp.gmail.com with ESMTPSA id 13sm1358682wmk.30.2020.10.02.06.39.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 06:39:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601645990; 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=l++0FncV4p/balcOSro5u4OfFvevG6nmzhJ8fBAOs6w=; b=T0u8BqO43ZW0AEHIF4fqgz6L60dSYBZrl0wQxNuP73yGwfft0V1U/OJyg4XOo/p3hydeY1 hJ+/+/3/a9XaBnEcwFXaGB8CSG3IOmgdawmWlFBA7NHp0fsYrOeEK++dG29yiYPJEgHBYj BIZUHtKNF7TV1Fh3dAINk6oBfbcD6AM= X-MC-Unique: cHdHvFR3MSSYTliAzDBXQg-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=l++0FncV4p/balcOSro5u4OfFvevG6nmzhJ8fBAOs6w=; b=Rm4AkY3u66BXn4uAPY/xKkT929zQ4Rwo82AHwMVtApF5VQKpAldpWE3dfGQGs0kmnv LmVmJnUU386xSl2i3YwRDnnUDN7ntmmgUtFCUcV/fCvgN8kGQpOIoqhcBVLthvmC1LPa iZeZMRMTe9NYBmsh/6juS6avWIa/XUHruae31UfBUovtSdrpO/PsU464b7PoRkTzKTzF WcC3yn0kY2pEYx01/jkOPN1IWWvDZw9oF3cOn+nOCaiFvLE2dJMoC/pTIFKYRdKmFUWh Ph8bLJIc33kEILTf4BF2shhCzYOkvGoY9xStutErb9lXINE547hbxvsGDy3eTly+Vqry hShA== X-Gm-Message-State: AOAM533nlfhrSu+ScIh1CMGsDgyoVSLPBCeS+q3scjnbT4HopDXp26Ab 9oAv2c7/JYENZ+ieUPVcagTUubNWEqHwbncuytTAWDihufsMcvimQFTQY/NhFjDtMkHhjlf3WIl 31G5QwhCej/JbUw== X-Received: by 2002:a1c:9a0c:: with SMTP id c12mr3069206wme.85.1601645982657; Fri, 02 Oct 2020 06:39:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytnflmvzG2NbHjeDXeHd5cEjLZ7ujLVl3vbAMVyGFRFjZMyWEyqKmjFZCL5TRb0S/3cpVZiw== X-Received: by 2002:a1c:9a0c:: with SMTP id c12mr3069171wme.85.1601645982462; Fri, 02 Oct 2020 06:39:42 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Marcel Apfelbaum , "Dr. David Alan Gilbert" , xen-devel@lists.xenproject.org, Gerd Hoffmann , Markus Armbruster , Paolo Bonzini , Juan Quintela , Stefano Stabellini , Anthony Perard , Eric Blake , Paul Durrant , Peter Maydell , "Michael S. Tsirkin" , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/5] qapi: Restrict '(p)memsave' command to machine code Date: Fri, 2 Oct 2020 15:39:21 +0200 Message-Id: <20201002133923.1716645-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201002133923.1716645-1-philmd@redhat.com> References: <20201002133923.1716645-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 memsave/pmemsave to machine.json pulls slightly less QAPI-generated code into user-mode and tools. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini --- qapi/machine.json | 61 +++++++++++++++++++++++++++++++++++++++++++++++ qapi/misc.json | 61 ----------------------------------------------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index 55328d4f3c..5a3bbcae01 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -887,6 +887,67 @@ { 'enum': 'HostMemPolicy', 'data': [ 'default', 'preferred', 'bind', 'interleave' ] } =20 +## +# @memsave: +# +# Save a portion of guest memory to a file. +# +# @val: the virtual address of the guest to start from +# +# @size: the size of memory region to save +# +# @filename: the file to save the memory to as binary data +# +# @cpu-index: the index of the virtual CPU to use for translating the +# virtual address (defaults to CPU 0) +# +# Returns: Nothing on success +# +# Since: 0.14.0 +# +# Notes: Errors were not reliably returned until 1.1 +# +# Example: +# +# -> { "execute": "memsave", +# "arguments": { "val": 10, +# "size": 100, +# "filename": "/tmp/virtual-mem-dump" } } +# <- { "return": {} } +# +## +{ 'command': 'memsave', + 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': '= int'} } + +## +# @pmemsave: +# +# Save a portion of guest physical memory to a file. +# +# @val: the physical address of the guest to start from +# +# @size: the size of memory region to save +# +# @filename: the file to save the memory to as binary data +# +# Returns: Nothing on success +# +# Since: 0.14.0 +# +# Notes: Errors were not reliably returned until 1.1 +# +# Example: +# +# -> { "execute": "pmemsave", +# "arguments": { "val": 10, +# "size": 100, +# "filename": "/tmp/physical-mem-dump" } } +# <- { "return": {} } +# +## +{ 'command': 'pmemsave', + 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} } + ## # @Memdev: # diff --git a/qapi/misc.json b/qapi/misc.json index cce2e71e9c..2a5d03a69e 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -177,67 +177,6 @@ ## { 'command': 'stop' } =20 -## -# @memsave: -# -# Save a portion of guest memory to a file. -# -# @val: the virtual address of the guest to start from -# -# @size: the size of memory region to save -# -# @filename: the file to save the memory to as binary data -# -# @cpu-index: the index of the virtual CPU to use for translating the -# virtual address (defaults to CPU 0) -# -# Returns: Nothing on success -# -# Since: 0.14.0 -# -# Notes: Errors were not reliably returned until 1.1 -# -# Example: -# -# -> { "execute": "memsave", -# "arguments": { "val": 10, -# "size": 100, -# "filename": "/tmp/virtual-mem-dump" } } -# <- { "return": {} } -# -## -{ 'command': 'memsave', - 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': '= int'} } - -## -# @pmemsave: -# -# Save a portion of guest physical memory to a file. -# -# @val: the physical address of the guest to start from -# -# @size: the size of memory region to save -# -# @filename: the file to save the memory to as binary data -# -# Returns: Nothing on success -# -# Since: 0.14.0 -# -# Notes: Errors were not reliably returned until 1.1 -# -# Example: -# -# -> { "execute": "pmemsave", -# "arguments": { "val": 10, -# "size": 100, -# "filename": "/tmp/physical-mem-dump" } } -# <- { "return": {} } -# -## -{ 'command': 'pmemsave', - 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} } - ## # @cont: # --=20 2.26.2 From nobody Thu May 2 15:41:32 2024 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=1601645991; cv=none; d=zohomail.com; s=zohoarc; b=OHUN8d1rZSedzE7pd5N/zTOxxiQa5tl0hJoZIh0aDRoWXEugQzdgiM6Jo+d/jh69drxWo/NcoX8JnAlIaiyUWeBFZQv+3ISMEeEdi19GE4k39JS0O0VYF6z+YsJlIb6cJGSRPVdnRitzlX/e8ISIxfYZLSTbU5Kf9lGhAcbN3KA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601645991; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=tvVXKSfjWkoZJFhCHk1dGuX00kfrmBZkcI+Ka1f3ccA=; b=Fyhb+ngF4gCUGYOhjrY4BUdNEiR2GOZUd4E76N1TpebD3uX/uyr6oisFKfmIvZNlu5GGh/hC7ZxgA4krBltVtvOF2lc6OdsgHhkpHE4pGqo6o2zjvXaQCwa+Fc+cc1oitgoL4MMnYU4YkH37+/l6dXs90gAg2IoZ/S5BLoTZjBw= 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 1601645991979239.86056648217095; Fri, 2 Oct 2020 06:39:51 -0700 (PDT) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-4-rNZRteNTM5W_ZM9dE8OzWw-1; Fri, 02 Oct 2020 09:39:49 -0400 Received: by mail-wr1-f72.google.com with SMTP id a2so561892wrp.8 for ; Fri, 02 Oct 2020 06:39:49 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (74.red-83-53-161.dynamicip.rima-tde.net. [83.53.161.74]) by smtp.gmail.com with ESMTPSA id d18sm1779795wrm.10.2020.10.02.06.39.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 06:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601645990; 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=tvVXKSfjWkoZJFhCHk1dGuX00kfrmBZkcI+Ka1f3ccA=; b=WLnR9ETfDS4r/AKBNje6d4yfmzyiqvTwaUreLh30eQ6pSwV7xqInImU0HYuHJ6YTXF3kMc S3kGoKovKhN2PMSpSJ2RtMuEXJja6ki5bjjaKx0hfMDqDbTsyXpBx4VZdsKb75uPqd5H92 gbs29dFhDH749aiGKcl1vJKdg1qwXnI= X-MC-Unique: rNZRteNTM5W_ZM9dE8OzWw-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=tvVXKSfjWkoZJFhCHk1dGuX00kfrmBZkcI+Ka1f3ccA=; b=PGL59d0X7WozZpgAQgJNMnkKjSsLq6jCAm9IH6VMkyyZVkYimegXnEQhpQ9xEWmv/C l3OvOf7p1cEaByhSJEYCDaBGJjS79FiKMtzE9Vqk8K+moyWuFXJK+1Xtenz8xTi7xrkB uS7mg4ZTnzIkQ7DBkzu3R009U9ndmhzFV/+rd69Bcamf71yfI5QVtdOPpVIc9aUkASJB 8tBkCpLAscqXk69iTns/qi/d8Z7PnqFfAmnDKnBTCsLzQ8yElftkyfGz/Kz1qgqOd6SI S5Plp8akQt+nnNLUWnVjObXn43tPd3s+1znp4nfcNqDM1zBWUs7oNfgk1YDDToaelsYd B/Ew== X-Gm-Message-State: AOAM533C4ckMrLuG5grtG/1YYWu+icGInkpIQJGHdF82Y3cg/kxYI2Cm LxlI77IGvrNUq8Cdex2F2hh2+UmB2H/7uDJgQvi0xWMF4q3M05ItAFjcNlFYHBsKUtlAKGjnqmi q+cDygnpl7qLiZw== X-Received: by 2002:adf:9bcf:: with SMTP id e15mr3075486wrc.93.1601645987716; Fri, 02 Oct 2020 06:39:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXZ0DUtM8ag+Gzw12Jr6+YpFZwVTHU0tycGVTY/5KbE5Wb3wWL4PNJqnB0Xi/zQrZCrmxEzA== X-Received: by 2002:adf:9bcf:: with SMTP id e15mr3075463wrc.93.1601645987503; Fri, 02 Oct 2020 06:39:47 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Marcel Apfelbaum , "Dr. David Alan Gilbert" , xen-devel@lists.xenproject.org, Gerd Hoffmann , Markus Armbruster , Paolo Bonzini , Juan Quintela , Stefano Stabellini , Anthony Perard , Eric Blake , Paul Durrant , Peter Maydell , "Michael S. Tsirkin" , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 4/5] qapi: Restrict 'query-kvm' command to machine code Date: Fri, 2 Oct 2020 15:39:22 +0200 Message-Id: <20201002133923.1716645-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201002133923.1716645-1-philmd@redhat.com> References: <20201002133923.1716645-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. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paolo Bonzini --- 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 5a3bbcae01..7c9a263778 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 2a5d03a69e..9813893269 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 From nobody Thu May 2 15:41:32 2024 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=1601645997; cv=none; d=zohomail.com; s=zohoarc; b=n3oiePtY+XkkEBwtKl8ZfhGwyFSFSaTOyGB6/PmYqPtq8l5rou+1edIZuii6fFcF7MXbWpbqeslp2SI2+rk33yKqUG+xqxzIaimhHwv6p+uaG47ybkJanbTwAQEAMKQEXDPL2UEqYdyCOLH5tk5pYk2GC+BIvN0usF52+wIp8ps= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601645997; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=8IRn/Y0aJt1eGijTbQmkn/6JoyPalvnCOEAPCHm0k58=; b=Uyz78QDUbRkY6SRYB+6/FHRvxPC7yxiGG76ipGjopz9GMggcJ6U9SNHyov9p6mOrzYbaJf2TpZ/131ZoYIk7TMZwkOqBDr7IgYjSAWjIMhS46spTPnGM5ysqyPAXPrhWtbwacRx14iNcNX0gOvk+Ax/yYc4qjyONp3dMzzPfnJk= 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 1601645997568664.9281735786831; Fri, 2 Oct 2020 06:39:57 -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-477-1vDidrFoNx6Wlr8u4h42Dg-1; Fri, 02 Oct 2020 09:39:55 -0400 Received: by mail-wm1-f71.google.com with SMTP id f205so418513wmf.1 for ; Fri, 02 Oct 2020 06:39:54 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (74.red-83-53-161.dynamicip.rima-tde.net. [83.53.161.74]) by smtp.gmail.com with ESMTPSA id f6sm1818116wro.5.2020.10.02.06.39.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 06:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601645996; 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=8IRn/Y0aJt1eGijTbQmkn/6JoyPalvnCOEAPCHm0k58=; b=MQBD7F11kpTxjsik9FV6v8rcS/d9u9imMaejaRE/Bxo/GCKTGsv0NS3RkRWzB26fpurtiF ppSTEh9sI0MYvAL97aZy/g05cmU4HsvU/KxLrvfpaRITcMoQdfoeBViwIjsdMEdeG6//kC 3WJxhDOFSI0uwC82k17eJCSKScBXZGI= X-MC-Unique: 1vDidrFoNx6Wlr8u4h42Dg-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=8IRn/Y0aJt1eGijTbQmkn/6JoyPalvnCOEAPCHm0k58=; b=bOr7PYtQeH1Gi49/6xDH18z/5kJMgzjDGyu/FoRdxn5ifZz5qgiVNjc4FNPyvaP/Zm XrSb+tcaYBDxkhNRqRwqcVX6XgH65hv2s8nuXzfKLCeHVUuJrKreoStQi+xEywk1Sn7b h6PuybYLO0YgEDxiPjOiDEuLGHYxgY4w3V7VjZY1r5QwP6wYuARdvZDd0VPnfG5y6JNc ohFuI0c3YOSDn9uzY6zGipUNmuOhRYzuxez68lPb/tHdCAJkWTyedr3a60Ajh+EILERp gMfJFOkmzP6o03Xp4PZ7UiiFRCMgP36WhCUp63kiWjjbN/Vxwj/abMKMS3GwtqiE6qgA KLpg== X-Gm-Message-State: AOAM530kFJUYZkuQx2II5xDjmRNKeflJ6kPwtmvSQoziLSFEKCrq3umG T1e+8ryNf7PhRBTfC/St5m2iRRe/GTqwLzBUs220bXVEXBBNIRp3oY+1lzQnWR6xaLYXYZa06rJ QybyAtEyLKON0vQ== X-Received: by 2002:a5d:43cf:: with SMTP id v15mr3203836wrr.269.1601645993165; Fri, 02 Oct 2020 06:39:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrtjDxbvNT2qZx2AnpZX/U8SDHXTxctCni5ZD+jg0EWfaGOVq2AOPJli+/iQHk1imFPhnyVw== X-Received: by 2002:a5d:43cf:: with SMTP id v15mr3203803wrr.269.1601645992898; Fri, 02 Oct 2020 06:39:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Marcel Apfelbaum , "Dr. David Alan Gilbert" , xen-devel@lists.xenproject.org, Gerd Hoffmann , Markus Armbruster , Paolo Bonzini , Juan Quintela , Stefano Stabellini , Anthony Perard , Eric Blake , Paul Durrant , Peter Maydell , "Michael S. Tsirkin" , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 5/5] qapi: Restrict Xen migration commands to migration.json Date: Fri, 2 Oct 2020 15:39:23 +0200 Message-Id: <20201002133923.1716645-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201002133923.1716645-1-philmd@redhat.com> References: <20201002133923.1716645-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 xen-set-global-dirty-log and xen-load-devices-state commands migration.json pulls slightly less QAPI-generated code into user-mode and tools. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Dr. David Alan Gilbert Acked-by: Paolo Bonzini --- qapi/migration.json | 41 +++++++++++++++++++++++++++++++++++++++++ qapi/misc.json | 41 ----------------------------------------- accel/stubs/xen-stub.c | 2 +- hw/i386/xen/xen-hvm.c | 2 +- migration/savevm.c | 1 - 5 files changed, 43 insertions(+), 44 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index 7f5e6fd681..cb30f4c729 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1551,6 +1551,47 @@ { 'command': 'xen-save-devices-state', 'data': {'filename': 'str', '*live':'bool' } } =20 +## +# @xen-set-global-dirty-log: +# +# Enable or disable the global dirty log mode. +# +# @enable: true to enable, false to disable. +# +# Returns: nothing +# +# Since: 1.3 +# +# Example: +# +# -> { "execute": "xen-set-global-dirty-log", +# "arguments": { "enable": true } } +# <- { "return": {} } +# +## +{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } } + +## +# @xen-load-devices-state: +# +# Load the state of all devices from file. The RAM and the block devices +# of the VM are not loaded by this command. +# +# @filename: the file to load the state of the devices from as binary +# data. See xen-save-devices-state.txt for a description of the= binary +# format. +# +# Since: 2.7 +# +# Example: +# +# -> { "execute": "xen-load-devices-state", +# "arguments": { "filename": "/tmp/resume" } } +# <- { "return": {} } +# +## +{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} } + ## # @xen-set-replication: # diff --git a/qapi/misc.json b/qapi/misc.json index 9813893269..afe936b45b 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -287,26 +287,6 @@ 'data': {'device': 'str', 'target': 'str', '*arg': 'str'}, 'features': [ 'deprecated' ] } =20 -## -# @xen-set-global-dirty-log: -# -# Enable or disable the global dirty log mode. -# -# @enable: true to enable, false to disable. -# -# Returns: nothing -# -# Since: 1.3 -# -# Example: -# -# -> { "execute": "xen-set-global-dirty-log", -# "arguments": { "enable": true } } -# <- { "return": {} } -# -## -{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } } - ## # @getfd: # @@ -606,24 +586,3 @@ ## { 'enum': 'ReplayMode', 'data': [ 'none', 'record', 'play' ] } - -## -# @xen-load-devices-state: -# -# Load the state of all devices from file. The RAM and the block devices -# of the VM are not loaded by this command. -# -# @filename: the file to load the state of the devices from as binary -# data. See xen-save-devices-state.txt for a description of the= binary -# format. -# -# Since: 2.7 -# -# Example: -# -# -> { "execute": "xen-load-devices-state", -# "arguments": { "filename": "/tmp/resume" } } -# <- { "return": {} } -# -## -{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} } diff --git a/accel/stubs/xen-stub.c b/accel/stubs/xen-stub.c index 7ba0b697f4..7054965c48 100644 --- a/accel/stubs/xen-stub.c +++ b/accel/stubs/xen-stub.c @@ -7,7 +7,7 @@ =20 #include "qemu/osdep.h" #include "sysemu/xen.h" -#include "qapi/qapi-commands-misc.h" +#include "qapi/qapi-commands-migration.h" =20 bool xen_allowed; =20 diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index f3ababf33b..9519c33c09 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -24,7 +24,7 @@ #include "hw/xen/xen-bus.h" #include "hw/xen/xen-x86.h" #include "qapi/error.h" -#include "qapi/qapi-commands-misc.h" +#include "qapi/qapi-commands-migration.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" #include "qemu/range.h" diff --git a/migration/savevm.c b/migration/savevm.c index 34e4b71052..1fdf3f76c2 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -42,7 +42,6 @@ #include "postcopy-ram.h" #include "qapi/error.h" #include "qapi/qapi-commands-migration.h" -#include "qapi/qapi-commands-misc.h" #include "qapi/qmp/qerror.h" #include "qemu/error-report.h" #include "sysemu/cpus.h" --=20 2.26.2