From nobody Mon May 13 03:29:23 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=1602504947; cv=none; d=zohomail.com; s=zohoarc; b=TmmG+HMgUFLqPiXtdJwtpnQqFgdeOZUo27LBq4gZrKIpL6Y5FsTh/8lLVXQIJDYMC8O8OYBJkvNfwMT2lgXsp7m/DZLeTlt4J1nrkRbj/pkI2LtTK2DowiTlGJOIh+8lEbxMepLab9ymeP8CtylH0pzpJOtFx5HJQlyeqoZR0QI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602504947; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=VljrrgYZ6yThKHfd9uj04aHsD9sMK+domcRaiReXGvI=; b=TiCTHi6CHVBgAC1XXi+KneMERh6X1pvLJ+2/oS37mM2B/83FB7iFAFYAEKlrLHQU0ihz8l18gyq3oR9T5mhPatiOEK4dfqlers60M3vPKkC4spFwI8vK6SJrfLM05YicWTd904zMovSyxjI1Jf2DjBJwdDvC7V/HtA3FKsBFyvw= 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 1602504947252743.821416804419; Mon, 12 Oct 2020 05:15:47 -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-189-4-P-tBiQMJKHI65Q19woBQ-1; Mon, 12 Oct 2020 08:15:44 -0400 Received: by mail-wm1-f70.google.com with SMTP id u5so5165774wme.3 for ; Mon, 12 Oct 2020 05:15:44 -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 h3sm20166066wrw.78.2020.10.12.05.15.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 05:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602504946; 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=VljrrgYZ6yThKHfd9uj04aHsD9sMK+domcRaiReXGvI=; b=iuqZaVzudq/K6FBVu3V0a78Wc21ASZy24F4bka6ZKpfiJ4c6MPE4y93U2cRJz1eAqI7/fQ yVTC3xuJ2aeOOhkW8AnwK1/g1k+EPGYs34tBorqFpDPNzhbt+E+rGYGLE4AoOxyHE1zF2R tvD91WYDf36gOjp9W5vosw8tj7hIiIs= X-MC-Unique: 4-P-tBiQMJKHI65Q19woBQ-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=VljrrgYZ6yThKHfd9uj04aHsD9sMK+domcRaiReXGvI=; b=kWZeVqLoym3PQRHAt3UBzSnRGlVxEcHbnb05KCTntUPBUvWXDCuragy0ii0oUdLat1 QREn5E7QjSN3ai/409x8ly/JwnfpoJwMgTTPBpyj61TF8af0Qo+lYhiP6M71tbmYwNKo 8VE3sPvCwaJNG1Dtif9CPJVqa+KdmjFPHX6JVhKm4emT8eZ2ie6PJEJCe7jNeyFadmDT WoKNNbRS4rsRbSViTjtneAvtUVC3DKpzJ7gMk0YLnpKNV1MENg0a/UvHEAvE5FgA9Kmp F+s4PP+WKgvamhbE9KmproopUOA1sPdT8UrvVvh2u93Qr7Oe9MQGqOe73uaUFqE05Y13 IZ/Q== X-Gm-Message-State: AOAM533EMKZ69cw49/Tyq/C/0HYoD7VgQeERwdu7rdRU0/WT+3MgqGQ0 6oY/2qaMtJDJ6a6LGVY7WZqDHilVno3jedrXxsNTeRYnvGhJxZMS/nlh1J3L7MVlSQxzXP88mvC ZJBh322DT3qBYgA== X-Received: by 2002:a1c:8106:: with SMTP id c6mr10246646wmd.115.1602504943466; Mon, 12 Oct 2020 05:15:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzh3ZneB/UaUdSoyR60V43L1kyczsgzSaFKhjYzwTNzI2F3Pio1H9f6yUbIk64TiICjXP1PeA== X-Received: by 2002:a1c:8106:: with SMTP id c6mr10246635wmd.115.1602504943284; Mon, 12 Oct 2020 05:15:43 -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 1/5] qapi: Restrict 'inject-nmi' command to machine code Date: Mon, 12 Oct 2020 14:15:32 +0200 Message-Id: <20201012121536.3381997-2-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 'inject-nmi' 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 Reviewed-by: Eduardo Habkost --- 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 756dacb06fd..073b1c98b26 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 7d1e2e9aaef..3fe9cc21b4b 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 47cceddd805..e46ac68ad09 100644 --- a/softmmu/cpus.c +++ b/softmmu/cpus.c @@ -26,6 +26,7 @@ #include "qemu-common.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 Mon May 13 03:29:23 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=1602504957; cv=none; d=zohomail.com; s=zohoarc; b=BtYTeTQyB7MiYWAzY+87qxOwSTmLEqN0smKEFy1BLSH5/hXWR1q8Cx0gGO254cYVpc9gz9j616FrdOeaYzQmu9LSszhGgE1P3VVWaYZGhsvShEKf4W/nj8mHP5d56gLxAa3QsRIvI0owkn7b8+hp16DwJKHX1lyH5UYslWOhJ4Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602504957; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=viKqtW92d35xTJa7T+6wHwnDgQrq/MCwuurOHJMzxPg=; b=VA+0mbnaaJqgs0DSM0CoClRW4N9x+va/Rv2iIpwpyp5Ed3WvGBKVZe/rBvyYD2AFg7aQ/bpkwwITToqkeVC7KxM8nkW6sF9lveNz/og9uX/G9z6pJP0Yqrb6aiuwYvCoUJ5Bif/DjTBgSvU5XwI7mcZB3DWfI/de9sgjdhbVCwk= 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 1602504957061555.0292306392313; Mon, 12 Oct 2020 05:15:57 -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-504-C3DWX3UNNo6M5tk6yo_S_w-1; Mon, 12 Oct 2020 08:15:52 -0400 Received: by mail-wr1-f69.google.com with SMTP id j15so1577575wrd.16 for ; Mon, 12 Oct 2020 05:15:52 -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 s125sm10868074wms.42.2020.10.12.05.15.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 05:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602504954; 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=viKqtW92d35xTJa7T+6wHwnDgQrq/MCwuurOHJMzxPg=; b=eLP6KBJIy+jv1fIIbc8U6Iwf4cavPGZVw6vB5rvBmX364l4JRsEu+fS8cWX6oOuhJMQawH eXNHsIGVWKw0aJqXRsbMtdaSi5G7wjHA8HxutJ/g9RFAV9ffdCoj8gphKRoVmyBnC9EUP1 +qGSkyRRsWPqD+yjg1S3W44AXl97oRI= X-MC-Unique: C3DWX3UNNo6M5tk6yo_S_w-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=viKqtW92d35xTJa7T+6wHwnDgQrq/MCwuurOHJMzxPg=; b=ZNW1HHB7hN6jP4ORA1SBHINoxwMlrTbO4/ooew5xSSpTZMq40c4d/R8LDvYcNKYoFf OKJH/4lkWWEe/Y01Xym3qnHzNtaYOtScxgwVkU08nWVBYzmxJZXukGUB5SE+XnjNIV9Y WkcpAqorgf1F9McWmUY/fuatEDhHJGSVO7Zw9ShABsKK9SxpOzvqxus4lCOeSc15N7bP DvTtnq/LwfK8H2ZtTl1KY4eIRP3hX9YOnLl3erijDLR1VdJirBmDvxP5qzvxjs+hDW3N JASAT4Z2K7nBfAs4u/Ch1zh/uaqlGzh/1CEc5e5iQLf9u8NYMpCExNablVKrW3hFvnjR HNTQ== X-Gm-Message-State: AOAM533ckwwaNjtOFny1/W6IQgKBoRKePPYtTgnbASixdIUELV+RJGtB nrWGYwivbVComjRhhmabo7WHWNsJYTRIVbjcChdw2cZ4PqJwhLbsAtoLb1qDGZmf5ABBBQ746g7 mkm4/2tpyqynZlA== X-Received: by 2002:a7b:cb44:: with SMTP id v4mr10494750wmj.101.1602504948403; Mon, 12 Oct 2020 05:15:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSTp5oA+ATMwskMLC15+i15T52Bsgl0BpNcXAQsz6ECrlKNn5AKLL7KnqTgukOGhRYBfouZw== X-Received: by 2002:a7b:cb44:: with SMTP id v4mr10494731wmj.101.1602504948134; Mon, 12 Oct 2020 05:15:48 -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 2/5] qapi: Restrict 'system wakeup/reset/powerdown' commands to machine.json Date: Mon, 12 Oct 2020 14:15:33 +0200 Message-Id: <20201012121536.3381997-3-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 system_wakeup/system_reset/system_powerdown 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 Reviewed-by: Eduardo Habkost --- 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 073b1c98b26..55328d4f3ca 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 3fe9cc21b4b..90fd862a6cb 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 b11594d817a..a752aa22be0 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 0910b4a7166..f32adc3074f 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 Mon May 13 03:29:23 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=1602504956; cv=none; d=zohomail.com; s=zohoarc; b=Q7GTgIIw4+o6pYtU+hkjzi8TV1DBmevc6UD1vl58bzIgd79WBodCOHpfrjiyQvAKANsHsy/r49pnZe7PXKGwoSVWDewBVhGwQxqUjEjG7HdUq6YFTX2gv5LVSSTpGAbGiR1UgYv+d21XjeV+Kl8Kjd0mUi3ZB3ntl+HZ1o6gz8g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602504956; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=PgJl3lyw3zlJ4rwBHSsLrJq7aR281tmH8GHtlDsXSws=; b=c+HRLWwNd1ZzL5S7yYPRycs3iQl+MCd1kZoJcMtLaKhsZrPRl7Nv1sPy9MsGDz8pMpgWBMScQPhIU5VaOEQjkEdFNCz51CV6xTkb9indyUrxFIpCef+TctXNyn2jL4+dcTla+LZJDS9acc6PkZSmvGfo17Hj1NG9T/Vk/aCv4dM= 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 1602504956868694.8865690588282; Mon, 12 Oct 2020 05:15:56 -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-145-CBkCsRHlNM6C4VznvUO9Cg-1; Mon, 12 Oct 2020 08:15:54 -0400 Received: by mail-wr1-f72.google.com with SMTP id t17so9256231wrm.13 for ; Mon, 12 Oct 2020 05:15:54 -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 w1sm25023393wrp.95.2020.10.12.05.15.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 05:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602504955; 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=PgJl3lyw3zlJ4rwBHSsLrJq7aR281tmH8GHtlDsXSws=; b=A/Ai0aBDVusjZBPcrleFOQNWHfTHShl+mO74S2utxXK9LA4s4zkteSD8R1QQdkWSK3JYxf amJO0OsivwT/3f1DrFT07rKNVjCyltNTfLockG4Rw9kBQ9I0De8CuFgaf5tmT+VYYkiH7r lfhIo2kV9/eCdtRaamMP/h1DFWOo1wU= X-MC-Unique: CBkCsRHlNM6C4VznvUO9Cg-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=PgJl3lyw3zlJ4rwBHSsLrJq7aR281tmH8GHtlDsXSws=; b=sEKp41wkFLDh+u5bEuJJc3DBoAjOO4myVnjrNFG0m4i/MDZHqU0pj1h73tqgCOtdeX BfqtlRyKNAaxILMTwbBApEvZmPvwBeI6MwZNlOvqWsAnOKT8fzU84IGS9DngHaz6WsxX bf8GgAgcDor9lGnsEYufd3hJgja0FUDareqSF00ot4AIvKUR56dgBa3TkV2S/dlTFtzS rtaq9uN3g3mQx6T30WajFbpW3nP9hlx8QSLArisLGP3pyDVmQuKINMPc6RijZnGGqkAC yl3HlO0R20C88PvS0dnduaLmnmBaslhKh7PZo8ni4LWDZCK0gNw8oOuNT0bzi/D7iYHJ YxUQ== X-Gm-Message-State: AOAM531qZcI3uT47jZvOPGgeHBbnoy52xF+rfVp0R2Xv0ektBbKeu5oO I4afVFE2FE5BSlK0LHLuy0YGijWCJhPYHp6JMgROAu7rYyqQYdAwI7CFN0Isxz/TbldNXkA/com AenmzwBaK7tge+g== X-Received: by 2002:a5d:40cb:: with SMTP id b11mr27530570wrq.254.1602504953124; Mon, 12 Oct 2020 05:15:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPXKJoRuNkuaLK5MItsZ/rjhub7YYwh4l98TVQ1DKvOc5WgBpacVjym95pHEXhqN3TaHPhTA== X-Received: by 2002:a5d:40cb:: with SMTP id b11mr27530544wrq.254.1602504952929; Mon, 12 Oct 2020 05:15:52 -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 3/5] qapi: Restrict '(p)memsave' command to machine code Date: Mon, 12 Oct 2020 14:15:34 +0200 Message-Id: <20201012121536.3381997-4-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 memsave/pmemsave 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 Reviewed-by: Eduardo Habkost --- 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 55328d4f3ca..5a3bbcae01b 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 90fd862a6cb..9fa702b0f66 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 Mon May 13 03:29:23 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=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 Reviewed-by: Eduardo Habkost --- 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 From nobody Mon May 13 03:29:23 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=1602504969; cv=none; d=zohomail.com; s=zohoarc; b=n4rivrFz2o1Kn2mgjBW4nZ7LVFhMQjINepdZ+r5S04za09vGqdhNg+NEFP0io5EESFu8KsmlAuG+jreVjpeygO091KFFZIj8ok6r23ExyEQ+v9d/ECtx5ryYDFX3/2aeneVvo0R+lpDjwFZ7HwvnSUWd03QuEHQSpFXnqvK+ilU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602504969; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=eGWvxcwdrYMZ1U8s3C0BMwWriO7oH4iIj3hu/+vjyUQ=; b=JkrvbDwyljGOG6GqhQoV4c2x9Ds9d78LizV+zIueU9z1IxV3Xmns0dgWdRGgkqqtPRQ8WYxSKoDWf27eLMGHUB3ybqweulyD5c4gTEFNiMWWGi91nWqWaETwIab77OO2FD6lmFfzPp4dqJOLH4HQN+aiRi7zjfYp5HFwkx64evA= 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 1602504969119849.0413669314207; Mon, 12 Oct 2020 05:16:09 -0700 (PDT) Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-181-x4Q4ga9jMseP5J9JqxRqpA-1; Mon, 12 Oct 2020 08:16:06 -0400 Received: by mail-wm1-f69.google.com with SMTP id l15so5154395wmh.9 for ; Mon, 12 Oct 2020 05:16:06 -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 t4sm21334591wra.75.2020.10.12.05.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 05:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602504968; 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=eGWvxcwdrYMZ1U8s3C0BMwWriO7oH4iIj3hu/+vjyUQ=; b=YLQSZ7CQVMSiKr7PqMXLSKW5S7ynjJNu3z3WSoUeS2j5DsdIpwHRKVJs28sN0tSlmxE0wn PHT//Rb4xdnpVxT9wRnzfJvkL8OLolHn219h1PJhK0flaJdumGTcRzUVDQv39B+Gcj6943 DdMUUlIrntDPFAvrhCqVaoh/D2bCQNk= X-MC-Unique: x4Q4ga9jMseP5J9JqxRqpA-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=eGWvxcwdrYMZ1U8s3C0BMwWriO7oH4iIj3hu/+vjyUQ=; b=ja3kgVwN7gk0vUvSyZot1Kh1ZiGTa5JPMm/gZDeK6NEhNzTPKixMrNLQXZdXYhdYxd gIE4Wbmpse0uP0u2PdCn+Rg0LdjAbhpEaUWy7FrQOxANor2TZGnfahLBZ8I5qYFn7hLS NDHNqurHNVKyaCfz6i+hVSw7Pl/GuPurpew99XEE55By8pEQbS47HKnJeoPHDaeMZXKt O3PzWJIlLCvAXNLkg0x4tTzEE2PMLl1nZ3UmQFrewFUyJTLrzC7J3ZcGtw2+5WvDIVqM aEK9ZPFafBym0tNhcW04iFy26lPIFQI6qkqX3wg/2wE69vaWgMh72tGQ/ZWQW7e5NW8M lN0g== X-Gm-Message-State: AOAM531dwBK9mHEVlmGGIa3/ig7ZORLcN8aqn25o2uJo3NXxg+JDl3Go 6I62TUVDwm8PRGL93ObJvt5j3CNDdr0B9RBDnKkzcKjPl/TCTgyK19pcQAF8HqZizeQp4XQKAog OwRmS7RJUbfeZ5Q== X-Received: by 2002:a1c:bdc4:: with SMTP id n187mr11195536wmf.185.1602504962597; Mon, 12 Oct 2020 05:16:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVoBK3vIdraNkihHbdy1G43EDRyjn8K86gMv0QE7t1U7YCMFjR7hseHjvHb4G0NoNXa5zFGw== X-Received: by 2002:a1c:bdc4:: with SMTP id n187mr11195524wmf.185.1602504962357; Mon, 12 Oct 2020 05:16:02 -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?= , "Dr . David Alan Gilbert" Subject: [PATCH v2 5/5] qapi: Restrict Xen migration commands to migration.json Date: Mon, 12 Oct 2020 14:15:36 +0200 Message-Id: <20201012121536.3381997-6-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 xen-set-global-dirty-log and xen-load-devices-state commands migration.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Dr. David Alan Gilbert Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Eduardo Habkost --- 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 7f5e6fd681a..cb30f4c729b 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 363115c1edb..40df513856e 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: # @@ -588,24 +568,3 @@ 'data': { '*option': 'str' }, 'returns': ['CommandLineOptionInfo'], 'allow-preconfig': true } - -## -# @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 7ba0b697f49..7054965c480 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 f3ababf33b6..9519c33c098 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 d2e141f7b1d..ff33e210eb0 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