From patchwork Wed May 14 23:40:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 889886 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2875624wrr; Wed, 14 May 2025 16:42:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVUT0lX0eJw4hU/TYlpaDRLp4I3KQmIxlJxSO7eDvB6VGJ517TsDOUJ6Mx2PM1cJ/V2S03Vwg==@linaro.org X-Google-Smtp-Source: AGHT+IHA00MWv/xv9QoXffN5B9Z8ZWjaw+5DyDGhspcSMKbc/5xWUMCEgIvNIHjGj9yBHLwoqlXg X-Received: by 2002:a05:622a:4c0a:b0:476:9252:ce8 with SMTP id d75a77b69052e-49495cb39bamr72093651cf.10.1747266121298; Wed, 14 May 2025 16:42:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747266121; cv=none; d=google.com; s=arc-20240605; b=TEBBuY4t7JLE1jvgN21QA0XsKqKmRIqMGyXpf1ugyARlwRlkBRczOR8eU+dQeq9ix2 iA+Rjpd9182gbO1tcNW4lF2FjhUmKCF6l87gAB9lXBTeGRdRK2nX3jCSJdBq/zMkXLen 4OhJqBVQN8uafnHo5oUoUKgAMvhRzGne+XyhFL8tfhRWrRHPZO9F0TMl+oRZvYFZm6T8 PRh2YLtyrsvL009EbqGmAkV0dKTRC4P6F8tHv56dN+H2rhWHyu3XpfCVF1TqkNTxMF5/ As8Pl3UTtXESp4lKmZLBwHYuJG+3UeTrqqUNBf8TsEvFSmISP87XIsfLcxZijS8+wV57 VLRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LDGlYtC2FxMGnGIBYrCy9HdUcV5JJ+RJBA5NGrp/BIQ=; fh=VLmoI/6EX8QpenFjusv8qhWaEfIPciazAbyYTbMJFJo=; b=JsKgXbIbCLLoC9pHXaCHMjNiRaG1+zaJaBTORtTxuIN+KHjXHKMy6C3KBCZ2sy9FIA OeHByqWeWsmqgMBLSVjGkDLEs2hab3ZR3Pcay/wGOcgFT3F6iu7LcjL6n9KZMN91HOLi rGUly9OMRCSczSx/JEwFB9VhLFrU4DiAMwwizlvANHlAbLGq4NDdIPVbFqLkzKBE8wGl gY2+uFxJw3iOoPuZCaVyR8mecpeGKmyUUNxzeYuuVE7xUf/vvqmu2epmPPmUEvjyXJvg MkOGTKFHEG2YGcoApVy1FP8OSvtU5Gp5H4a0QLuU3laoZnG2ctyBYhyKKvmkXXdE1BLu mE6w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Va0t89zq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4945259c302si143329281cf.588.2025.05.14.16.42.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 16:42:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Va0t89zq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFLj0-0001Ly-Mz; Wed, 14 May 2025 19:41:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFLiy-0001GL-7O for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:20 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFLiw-00031o-AR for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:19 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-2301ac32320so3627345ad.1 for ; Wed, 14 May 2025 16:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747266077; x=1747870877; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LDGlYtC2FxMGnGIBYrCy9HdUcV5JJ+RJBA5NGrp/BIQ=; b=Va0t89zqwzLZYJY0BtfMW9tghtqy9oLwpBGATVkWBzHSlH2Pqi0E8QWaGrYzQQ/7Hn HF4VaUXJ2kgPE472gfwv22g78htDvmjwgqyfIrPB9yMAC7nRYaDL1dhfkpiqG4I5WXVQ qgpsDuZ37UobUiH534Y/NxB44r89yP1nw/ALSlsLsPO55oNeQMKQOuIBdWaS+9BzObkY +kqCL1Om+I+4ZtQ5umJNeLvmMafcIhLqlzoPFTcEHj/jBS+vOpxy/pbNu3hzb0srnwqS RB4QvztSEAj1Aq7idECzjawI15Pk+cInlYj8Yawq9RGutX3+mvpHmyu95n+iJXsMnqo+ ryJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747266077; x=1747870877; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LDGlYtC2FxMGnGIBYrCy9HdUcV5JJ+RJBA5NGrp/BIQ=; b=iuurA7WEJlIMJvcZ6D6ecjGM2WNBV7EkaIQGmVC3CwqrIDP+GteFirSKBgez5LTO4B 8qdY+WTswDHdTbK5DvpwM2ESCzsp6b2H93ycjxHkZKSkibZPWT9rnKbeQTnDoskXdFVu Gl8IkI4aXw6Dfmkxz6RbefNTul/LmxrYFO9l3l7aqoYnN1EadOWNpvoVxcnUa4K3PDE3 FgtLmeXfTvBOV1XoogjX5joVz2L2wUqwCJmi/cjXxsVG8RmhH8pj5xPNj8K+65+XRdT5 cVKGSTiensjp9OuDTINWrk7yNb19sWfN7sEqVqeWpOSLp97g771S1myOupaxCRdfhrBs 9BjQ== X-Gm-Message-State: AOJu0YwK6t62MYw1hHtTVWTTMgrUKEt6fjAXQW1SPPvEBMG1LnHeKc7f ah7JlYigursaKSRn7+k+VFlowL+IYT/IiCENfA0MoDVEFgFEzscswCVPgxzzllnmebqG+o/G8/D HK1Y= X-Gm-Gg: ASbGncs2u8h6EsQLDSmDqfkyezlt46CKsXaXcMMTGaQOA2x7zAU3CaOASea1eAKKNW8 Ulvu2Pnluu75bPouSl4506R7snQCHZLhzNFRd0U8P6Q5ux4bD8PKeX07gDLJTQaxOyPbTfWTF8q Z29x6Yn+xaPcoCl1s4cJyPgkorpiRFJB9ceTuk9OuBz+LhVYF3P7pVpWnmRUfIg3sX8DTqaDziG duIh3j5+ohKXddM5tSvWYI23Be5Apa2OwEgZwQ31RWi2wW2QhqlvBCEq7tsN562qatujm3fajQ6 pD2qcT6+qprFidPlp03c2P0irW3QY1a9b4HvSOm/673P8QUdiME= X-Received: by 2002:a17:902:ebcd:b0:22e:634b:14ca with SMTP id d9443c01a7336-231981736c2mr77258405ad.50.1747266076721; Wed, 14 May 2025 16:41:16 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc828b4e4sm104583615ad.182.2025.05.14.16.41.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 16:41:16 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Michael Roth , alex.bennee@linaro.org, Paolo Bonzini , Thomas Huth , berrange@redhat.com, Richard Henderson , peter.maydell@linaro.org, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 01/12] qapi: expose rtc-reset-reinjection command unconditionally Date: Wed, 14 May 2025 16:40:57 -0700 Message-ID: <20250514234108.3746675-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> References: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé This removes the TARGET_I386 condition from the rtc-reset-reinjection command. This requires providing a QMP command stub for non-i386 target. This in turn requires moving the command out of misc-target.json, since that will trigger symbol poisoning errors when built from target independent code. Rather than putting the command into misc.json, it is proposed to create misc-$TARGET.json files to hold commands whose impl is conceptually only applicable to a single target. This gives an obvious docs hint to consumers that the command is only useful in relation a specific target, while misc.json is for commands applicable to 2 or more targets. The current impl of qmp_rtc_reset_reinject() is a no-op if the i386 RTC is disabled in Kconfig, or if the running machine type lack any RTC device. Thus the stub impl for non-i386 targets retains this no-op behaviour, instead of reporting a Error which is the more usual choice for commands invoked against unsupported configurations. Signed-off-by: Daniel P. Berrangé Signed-off-by: Pierrick Bouvier --- qapi/misc-i386.json | 24 ++++++++++++++++++++++++ qapi/misc-target.json | 17 ----------------- qapi/qapi-schema.json | 1 + hw/i386/monitor.c | 2 +- stubs/monitor-i386-rtc.c | 14 ++++++++++++++ qapi/meson.build | 1 + stubs/meson.build | 1 + 7 files changed, 42 insertions(+), 18 deletions(-) create mode 100644 qapi/misc-i386.json create mode 100644 stubs/monitor-i386-rtc.c diff --git a/qapi/misc-i386.json b/qapi/misc-i386.json new file mode 100644 index 00000000000..d5bfd91405e --- /dev/null +++ b/qapi/misc-i386.json @@ -0,0 +1,24 @@ +# -*- Mode: Python -*- +# vim: filetype=python +# +# SPDX-License-Identifier: GPL-2.0-or-later + +## +# @rtc-reset-reinjection: +# +# This command will reset the RTC interrupt reinjection backlog. Can +# be used if another mechanism to synchronize guest time is in effect, +# for example QEMU guest agent's guest-set-time command. +# +# Use of this command is only applicable for x86 machines with an RTC, +# and on other machines will silently return without performing any +# action. +# +# Since: 2.1 +# +# .. qmp-example:: +# +# -> { "execute": "rtc-reset-reinjection" } +# <- { "return": {} } +## +{ 'command': 'rtc-reset-reinjection' } diff --git a/qapi/misc-target.json b/qapi/misc-target.json index 42e4a7417dc..5d0ffb0164f 100644 --- a/qapi/misc-target.json +++ b/qapi/misc-target.json @@ -2,23 +2,6 @@ # vim: filetype=python # -## -# @rtc-reset-reinjection: -# -# This command will reset the RTC interrupt reinjection backlog. Can -# be used if another mechanism to synchronize guest time is in effect, -# for example QEMU guest agent's guest-set-time command. -# -# Since: 2.1 -# -# .. qmp-example:: -# -# -> { "execute": "rtc-reset-reinjection" } -# <- { "return": {} } -## -{ 'command': 'rtc-reset-reinjection', - 'if': 'TARGET_I386' } - ## # @SevState: # diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json index 7bc600bb768..96f6aa44133 100644 --- a/qapi/qapi-schema.json +++ b/qapi/qapi-schema.json @@ -61,6 +61,7 @@ { 'include': 'replay.json' } { 'include': 'yank.json' } { 'include': 'misc.json' } +{ 'include': 'misc-i386.json' } { 'include': 'misc-target.json' } { 'include': 'audio.json' } { 'include': 'acpi.json' } diff --git a/hw/i386/monitor.c b/hw/i386/monitor.c index 1921e4d52e9..79df96562f6 100644 --- a/hw/i386/monitor.c +++ b/hw/i386/monitor.c @@ -26,7 +26,7 @@ #include "monitor/monitor.h" #include "qobject/qdict.h" #include "qapi/error.h" -#include "qapi/qapi-commands-misc-target.h" +#include "qapi/qapi-commands-misc-i386.h" #include "hw/i386/x86.h" #include "hw/rtc/mc146818rtc.h" diff --git a/stubs/monitor-i386-rtc.c b/stubs/monitor-i386-rtc.c new file mode 100644 index 00000000000..e78757b24f2 --- /dev/null +++ b/stubs/monitor-i386-rtc.c @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-misc-i386.h" + +void qmp_rtc_reset_reinjection(Error **errp) +{ + /* + * Use of this command is only applicable for x86 machines with an RTC, + * and on other machines will silently return without performing any + * action. + */ +} diff --git a/qapi/meson.build b/qapi/meson.build index eadde4db307..3a9bd061047 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -64,6 +64,7 @@ if have_system 'qdev', 'pci', 'rocker', + 'misc-i386', 'tpm', 'uefi', ] diff --git a/stubs/meson.build b/stubs/meson.build index 63392f5e785..9907b54c1e6 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -77,6 +77,7 @@ if have_system stub_ss.add(files('target-monitor-defs.c')) stub_ss.add(files('win32-kbd-hook.c')) stub_ss.add(files('xen-hw-stub.c')) + stub_ss.add(files('monitor-i386-rtc.c')) endif if have_system or have_user From patchwork Wed May 14 23:40:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 889889 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2875780wrr; Wed, 14 May 2025 16:42:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV49PR+xrSZC+bc9nbtvnTzoyztL/siGZc/vZjUz9K7Kl0IP5emQpfHpgLJazhaUCHOe5WnoA==@linaro.org X-Google-Smtp-Source: AGHT+IEEXxApbfjJPgNnjhDckBnpCnujEb5hTEfZI4+3jJEq3mnGHPaK8ilMvGk/RsJl/mMdvoj+ X-Received: by 2002:a05:622a:259b:b0:476:7eca:57e7 with SMTP id d75a77b69052e-494a3387b6fmr8785731cf.26.1747266157230; Wed, 14 May 2025 16:42:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747266157; cv=none; d=google.com; s=arc-20240605; b=ADm0fnbyIcrVWwLT6E+3yFqABysmT56HUZ+QkobWi1UnE4fJmr7W8IMAUzdYaSbYwG IzeL+T/vEZW7ZFCyCUDTuJpLUDCgErDDYdGceKeSNUaShS9ineB30CoISytigNFBeMS4 tgT262e3p52aMM9xDbRsHZaU+nWppoHxWksFVbpiY5MHiIEhFk3vSCfWZKQ9QIkZHlfu y90U1d8ie4DYaznOam5/i0eaiJD2/dxxDSS+MD5l9rVAa/bFmdBGafpAikwhOKlRfFbL 2AmSjOlEnC3NvuruD0aNHBMJJel42i6RGC3o13DlUaPhrs3iwjvMaT9jQAslo6lBLBjO LhSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BumM4a0ZkPuppUUYHu5+IcPL4OW4nu6E6qjLxZN9PWM=; fh=VLmoI/6EX8QpenFjusv8qhWaEfIPciazAbyYTbMJFJo=; b=Z185SSBaaFEfb/GrVqoc2yZQBKyvyL/D4mHLm+jkgnA13j4j5YiZdhuB6R+BygKMKt ihRLfOwZamNY6JeGpZuwXQHC4rpMFZoLC4/xRQssRPlNZNkTfP56geHQWZgOTX/iqIHK rTJvxWy59PgKFb5BIdYY4XtT7hpvwGMKPMM4W8O+OLpCmIscO3yrGprLxK0Tuc++Wkt3 ttBSWbuZu+xBMNBnuknm4psV6x3g1vxK05srcb0+IyP7J4C8gCuWJzlqVkHKQ54+pU/R GeY/w/ZDStqIfcGNcY/1oBpfaTbI2PI4gqoQohUdekSjqZAECEM9IZzyXvDrrB0Xb0p8 HWkg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=exwCNdpG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4945258873fsi149217371cf.464.2025.05.14.16.42.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 16:42:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=exwCNdpG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFLj3-0001UR-PA; Wed, 14 May 2025 19:41:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFLiz-0001Ka-W7 for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:22 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFLiw-00031v-W8 for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:21 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-b074d908e56so150825a12.2 for ; Wed, 14 May 2025 16:41:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747266077; x=1747870877; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BumM4a0ZkPuppUUYHu5+IcPL4OW4nu6E6qjLxZN9PWM=; b=exwCNdpG6KFBHV9ZxLzxDQw6+UMlmwflE1tssJTln9dQaurPpV1RnORlxTjuj5H1wl Ck9RmBoAT34f+tuZDRuTaaHdp11g3IhYPheLIKmGx34aEffnzc3bFNCrbq1+EAodDY+W oIlgaaQNUUD4UJnqTS7kYbPpoCR25LPExskPSpnUWYfO/nhk7Feb1Sqt1/XUo+/jOfOn 01VhQY4lnlBM3nQA45hujP+pE20Nd2aEWSt5+U4hd2BcJE5i/jyGYDa9GZoxFpAZ9FQW K8DKWGDkgwSv4Bl7oHNRb1MHAqCCyHHXIvb8D+vMEoqMEdVw1J2BSzuY+XOXH0+VQcWH S/tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747266077; x=1747870877; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BumM4a0ZkPuppUUYHu5+IcPL4OW4nu6E6qjLxZN9PWM=; b=Z2MQCV66V6Do5xWDMw3XLs1heVvZ5d+J3QsieULpA3m7pkKAw9GxYbvLa3SbCX0F8w ibHVy8zyTS74u9dRwHgzFiF0vjLccnlAnyotFOwnJbPpJVrVeQG7xhxOhGYehEg6dudk B+L2k03UiJqWfIvA2yp/4BAyPIjLVBQV35TbDQL4xAUDlskMQOowCZ0fr6VvvrvaMqLY bNy71vR95IMrI2KLB1bMODiob8sqhURmRQkdW5KIgQ5cKBtrsZ2jZL+HmrP4jHClce7D zRWvEdt2IZBHfolhY/qILwJjU1gQ2rQH49tkqKjGnpwANALc+UkIZsKzPINH5sj9PJ9A 0AtA== X-Gm-Message-State: AOJu0YyXHLxZqIiae0OQRKKey1rIfFTbsn93ASI+pNinYi9oWcDwm0ND ynhaCbgu4L+QGH1zcDp92x+V/qFhLm6GxOZJaASp35YPBoxyTwyniq57ah1lIbqvJ6WTzQpxJbf qyss= X-Gm-Gg: ASbGnctltqw15+uzRk/Du4X6rtVGZsA1pim4TcHwRui/IWcP000gdaH1ecSQuFOD21m QxlscoXe0QbHBn1ldY/q01Z1hSlMiIFCLuEiasZYLcZCzlDgSU2oq+NPf3QQ+Mi40eUyMI6Z4xl BCVvjiIZ1hzGYJgk0pwhtJdUi4EbEKJ+7Mex9YdxBPPChT4drvJUBFjEQDmjh7SxZe89BlyDI+U Sut/GkjPvRb0TuCwwO1Eq6K2NNfDFhIkhQrEs0ud6W2f3TsmcVlSriB3UQ0Nij0bmMX0wfh1oZd ax5vPr3vpNvYsEC5TJeALFfchuIoVC4zwZJq/0dQgqsHcgCozDhY9TbhuQtHRw== X-Received: by 2002:a17:902:ea09:b0:223:628c:199 with SMTP id d9443c01a7336-231b6035614mr4519855ad.52.1747266077676; Wed, 14 May 2025 16:41:17 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc828b4e4sm104583615ad.182.2025.05.14.16.41.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 16:41:17 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Michael Roth , alex.bennee@linaro.org, Paolo Bonzini , Thomas Huth , berrange@redhat.com, Richard Henderson , peter.maydell@linaro.org, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 02/12] qapi: expand docs for SEV commands Date: Wed, 14 May 2025 16:40:58 -0700 Message-ID: <20250514234108.3746675-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> References: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x530.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé This gives some more context about the behaviour of the commands in unsupported guest configuration or platform scenarios. Signed-off-by: Daniel P. Berrangé Signed-off-by: Pierrick Bouvier --- qapi/misc-target.json | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/qapi/misc-target.json b/qapi/misc-target.json index 5d0ffb0164f..ae55e437a5f 100644 --- a/qapi/misc-target.json +++ b/qapi/misc-target.json @@ -110,7 +110,11 @@ ## # @query-sev: # -# Returns information about SEV +# Returns information about SEV/SEV-ES/SEV-SNP. +# +# If unavailable due to an incompatible configuration the +# returned @enabled field will be set to 'false' and the +# state of all other fields is undefined. # # Returns: @SevInfo # @@ -141,7 +145,16 @@ ## # @query-sev-launch-measure: # -# Query the SEV guest launch information. +# Query the SEV/SEV-ES guest launch information. +# +# This is only valid on x86 machines configured with KVM and the +# 'sev-guest' confidential virtualization object. The launch +# measurement for SEV-SNP guests is only available within +# the guest. +# +# This will return an error if the launch measurement is +# unavailable, either due to an invalid guest configuration +# or if the guest has not reached the required SEV state. # # Returns: The @SevLaunchMeasureInfo for the guest # @@ -185,8 +198,9 @@ ## # @query-sev-capabilities: # -# This command is used to get the SEV capabilities, and is supported -# on AMD X86 platforms only. +# This command is used to get the SEV capabilities, and is only +# supported on AMD X86 platforms with KVM enabled. If SEV is not +# available on the platform an error will be returned. # # Returns: SevCapability objects. # @@ -205,7 +219,15 @@ ## # @sev-inject-launch-secret: # -# This command injects a secret blob into memory of SEV guest. +# This command injects a secret blob into memory of a SEV/SEV-ES guest. +# +# This is only valid on x86 machines configured with KVM and the +# 'sev-guest' confidential virtualization object. SEV-SNP guests +# do not support launch secret injection +# +# This will return an error if launch secret injection is not possible, +# either due to an invalid guest configuration, or if the guest has not +# reached the required SEV state. # # @packet-header: the launch secret packet header encoded in base64 # @@ -236,8 +258,15 @@ ## # @query-sev-attestation-report: # -# This command is used to get the SEV attestation report, and is -# supported on AMD X86 platforms only. +# This command is used to get the SEV attestation report. +# +# This is only valid on x86 machines configured with KVM and the +# 'sev-guest' confidential virtualization object. The attestation +# report for SEV-SNP guests is only available within the guest. +# +# This will return an error if the attestation report is +# unavailable, either due to an invalid guest configuration +# or if the guest has not reached the required SEV state. # # @mnonce: a random 16 bytes value encoded in base64 (it will be # included in report) From patchwork Wed May 14 23:40:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 889895 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2875958wrr; Wed, 14 May 2025 16:43:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWrvTL42e5wWp3+5i8GfnG1SGdobCCKRLXEkfPLL1pGi6np5bbQ+95/wZ+0TKoys9jf+i4Rsw==@linaro.org X-Google-Smtp-Source: AGHT+IGcDzha5OZPl8kVGzBjtzuaF2eiJH2wOLWI2N+xlubbRPbObWD84VEaoeMIcG/qMTR7kb4C X-Received: by 2002:a05:620a:27d6:b0:7c5:56c0:a8 with SMTP id af79cd13be357-7cd3c652cf5mr49939285a.1.1747266202700; Wed, 14 May 2025 16:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747266202; cv=none; d=google.com; s=arc-20240605; b=PhzKKvBy3+byZaY/uj94C8u7zFKNFmYn0CBRavjqfk5nX1VRyLrSQ34K4UHiX+EWWK ZnySjTdj9pGVWQT6xGm1R84OkfsA1uwrWYll4zPmNWwD7CJQWM2MlWZuYL/U6PSBXYVM /j9lmSqjlRkmpSCqdAFHwZgTBQ6eaz2QFlKtKDGW45BH3+QQcqmSRvdlRT7f8i1wCTx2 CNN19ckTaQ4sBjzsUsVG2nh2biruoYwEafo+wNyvUGSJMm6U2ViYgchiA7n9f3A7LRQs NSthit3eQLKiwA4IGjX8fTScIY5lsLGrkPFL16M5k8sguc/i9G8pnezIs3xBOqEdMd3O 02kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GhaKqPunO5jQGD2jRXZP/caxecwZDh8t1+iHErQ93s8=; fh=VLmoI/6EX8QpenFjusv8qhWaEfIPciazAbyYTbMJFJo=; b=kpgWoTR6FY5VABeJCEjoi6tqmi8oHcaxdhOEJLAX2NDyW/3ElmPXLiYCcv0OdAa3qA qD9uofhFj/7AIwqnX6REjWztzLAvAMO+180Q0XZYRRhz0EWku4WzWz7GBeMQouIirGa2 hv09cAGaa03X33C/R1gssnVhco5mfeXsP9ZYH/VGrFAdHSf9Mmx9VwDqqnllMQ1fTh1V LWoFadF9gnekXVxTeFxbVIDUI9XlLaWUeGI8X1jKmxTXA/K6MxjeuKKnpv1uPsKm/LdS kOrHUkWs4VN7b7i3U4kN9XsVIXrwo/yB34Bic1MI3hTcxEhNSGGnnqcCeyWPCn5ZmLb5 r0OQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v7HRLwJL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cd00fee995si1460237085a.539.2025.05.14.16.43.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 16:43:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v7HRLwJL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFLj6-0001XF-TJ; Wed, 14 May 2025 19:41:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFLj1-0001Nj-3r for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:23 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFLiy-000321-5I for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:22 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-22e5df32197so3826785ad.0 for ; Wed, 14 May 2025 16:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747266079; x=1747870879; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GhaKqPunO5jQGD2jRXZP/caxecwZDh8t1+iHErQ93s8=; b=v7HRLwJLb3td3hBil5Wbxy+bJi7lFVdP8pRz+snZHrdMkxXpVAXdNlTZ6acWml1tW+ YYtEzzYmiDFjR1YUsPsvzD+3Zpb6dK81wR2e7bCbVm7zAvbgwel/nFAXqrAZBUnlQlp4 mIKSwVF1zk1+MXbOFY37N01zQTvd3cLRhsouD9jCHBaZsXLFfTDqZEVnVqfoviKN547i a1KY+ujC1cpF2n9ZAnzcVcTU5KkOCvbCHvyb4uyj4B4MMdDsYwkGUpr8Oo2rm2axcnP4 D+HiqZdOdK7VusyePIf5x4zOpH6cHQ3VUVg5fIT/lzTtSZgUPMD4L25Q94QCG7MUtzQ9 VwDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747266079; x=1747870879; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GhaKqPunO5jQGD2jRXZP/caxecwZDh8t1+iHErQ93s8=; b=IokA2Rbe8VlGMQ/NLkuvepI+X42GCVglfdTpZk9zTdGpvAT0BN2KO/bPJ11yAjYa88 ufuIRoRvTzeoBHONUSLE68vxCZ+vgCVuv4Mxa+kza9yxfofu5pZaXx0GWsrmJUBNFcEY V3IxhChC1XyG8C48zwDG9Qmw3N7DJwUsbkFep1m4Dh6X34+6s5/V/apQJFzircK2mFk0 8kKXcUYuC4goA8PZRJIkHZwiBggtUaZzFF7VhUmPW5na9Y5amlOrUSB1d4RwZIlNvFFS hSmH6GvpDkmWZM73HKP/NblZO9742j9aheGGuBgBw04/2cQLSSbunOsiHCHOM7U1Tbou o03A== X-Gm-Message-State: AOJu0YwXz28ayk26X/QFNjIQgIPGV5oQFQ1o749OshAIlKwJ/hdVc8qY HHyL4UQvo9eUIPexHKdGA21iOjEsC6Swa/2GONRdJea5FLQkbBcmzz7ErZKqH1fQWB7exdqLWNA EMeQ= X-Gm-Gg: ASbGncuxwuiGnYSE3IXUg+4iVlgbLZIl6xQQwUvKkIxPcJ4DHOw2t+GOh+XwHYegHa7 svucZc5dMYBtoYOTUyVkw2o0GvIMhvaBIw/48u55ykCV/a8R6BquWhE98xUca3jPZ7ODiDchCey D8P76cc/cVoFhXVRycEQuPpD3gn5yCyao6eMUIId50ngPwy6ub7OH/0HvAFGNVYHeg5IcSFSxui fnRFNK9gFkpaAC67CXHh4QP7AbtxF3l86rsZp2A5eWjSb4iqZfmH7QDEyqKnHbvObGWu6MTMSSf +YN3Lc2qduulVWya14vbPZZqlGuXkn3YScSzJ1U//tTTN7leqdo= X-Received: by 2002:a17:902:ea02:b0:224:f12:3735 with SMTP id d9443c01a7336-231b5ec683bmr5110145ad.31.1747266078590; Wed, 14 May 2025 16:41:18 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc828b4e4sm104583615ad.182.2025.05.14.16.41.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 16:41:18 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Michael Roth , alex.bennee@linaro.org, Paolo Bonzini , Thomas Huth , berrange@redhat.com, Richard Henderson , peter.maydell@linaro.org, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 03/12] qapi: make SEV commands unconditionally available Date: Wed, 14 May 2025 16:40:59 -0700 Message-ID: <20250514234108.3746675-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> References: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé This removes the TARGET_I386 condition from the SEV confidential virtualization commands, moving them to the recently introduced misc-i386.json QAPI file, given they are inherantly i386 specific commands. Signed-off-by: Daniel P. Berrangé Signed-off-by: Pierrick Bouvier --- qapi/misc-i386.json | 271 ++++++++++++++++++++++++++++++++ qapi/misc-target.json | 284 ---------------------------------- stubs/monitor-i386-sev.c | 36 +++++ target/i386/sev-system-stub.c | 32 ---- target/i386/sev.c | 2 +- stubs/meson.build | 1 + 6 files changed, 309 insertions(+), 317 deletions(-) create mode 100644 stubs/monitor-i386-sev.c diff --git a/qapi/misc-i386.json b/qapi/misc-i386.json index d5bfd91405e..de0e4ab67ff 100644 --- a/qapi/misc-i386.json +++ b/qapi/misc-i386.json @@ -22,3 +22,274 @@ # <- { "return": {} } ## { 'command': 'rtc-reset-reinjection' } + +## +# @SevState: +# +# An enumeration of SEV state information used during @query-sev. +# +# @uninit: The guest is uninitialized. +# +# @launch-update: The guest is currently being launched; plaintext +# data and register state is being imported. +# +# @launch-secret: The guest is currently being launched; ciphertext +# data is being imported. +# +# @running: The guest is fully launched or migrated in. +# +# @send-update: The guest is currently being migrated out to another +# machine. +# +# @receive-update: The guest is currently being migrated from another +# machine. +# +# Since: 2.12 +## +{ 'enum': 'SevState', + 'data': ['uninit', 'launch-update', 'launch-secret', 'running', + 'send-update', 'receive-update' ] } + +## +# @SevGuestType: +# +# An enumeration indicating the type of SEV guest being run. +# +# @sev: The guest is a legacy SEV or SEV-ES guest. +# +# @sev-snp: The guest is an SEV-SNP guest. +# +# Since: 6.2 +## +{ 'enum': 'SevGuestType', + 'data': [ 'sev', 'sev-snp' ] } + +## +# @SevGuestInfo: +# +# Information specific to legacy SEV/SEV-ES guests. +# +# @policy: SEV policy value +# +# @handle: SEV firmware handle +# +# Since: 2.12 +## +{ 'struct': 'SevGuestInfo', + 'data': { 'policy': 'uint32', + 'handle': 'uint32' } } + +## +# @SevSnpGuestInfo: +# +# Information specific to SEV-SNP guests. +# +# @snp-policy: SEV-SNP policy value +# +# Since: 9.1 +## +{ 'struct': 'SevSnpGuestInfo', + 'data': { 'snp-policy': 'uint64' } } + +## +# @SevInfo: +# +# Information about Secure Encrypted Virtualization (SEV) support +# +# @enabled: true if SEV is active +# +# @api-major: SEV API major version +# +# @api-minor: SEV API minor version +# +# @build-id: SEV FW build id +# +# @state: SEV guest state +# +# @sev-type: Type of SEV guest being run +# +# Since: 2.12 +## +{ 'union': 'SevInfo', + 'base': { 'enabled': 'bool', + 'api-major': 'uint8', + 'api-minor' : 'uint8', + 'build-id' : 'uint8', + 'state' : 'SevState', + 'sev-type' : 'SevGuestType' }, + 'discriminator': 'sev-type', + 'data': { + 'sev': 'SevGuestInfo', + 'sev-snp': 'SevSnpGuestInfo' } } + + +## +# @query-sev: +# +# Returns information about SEV/SEV-ES/SEV-SNP. +# +# If unavailable due to an incompatible configuration the +# returned @enabled field will be set to 'false' and the +# state of all other fields is undefined. +# +# Returns: @SevInfo +# +# Since: 2.12 +# +# .. qmp-example:: +# +# -> { "execute": "query-sev" } +# <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0, +# "build-id" : 0, "policy" : 0, "state" : "running", +# "handle" : 1 } } +## +{ 'command': 'query-sev', 'returns': 'SevInfo' } + +## +# @SevLaunchMeasureInfo: +# +# SEV Guest Launch measurement information +# +# @data: the measurement value encoded in base64 +# +# Since: 2.12 +## +{ 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'} } + +## +# @query-sev-launch-measure: +# +# Query the SEV/SEV-ES guest launch information. +# +# This is only valid on x86 machines configured with KVM and the +# 'sev-guest' confidential virtualization object. The launch +# measurement for SEV-SNP guests is only available within +# the guest. +# +# This will return an error if the launch measurement is +# unavailable, either due to an invalid guest configuration +# or if the guest has not reached the required SEV state. +# +# Returns: The @SevLaunchMeasureInfo for the guest +# +# Since: 2.12 +# +# .. qmp-example:: +# +# -> { "execute": "query-sev-launch-measure" } +# <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } } +## +{ 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo' } + +## +# @SevCapability: +# +# The struct describes capability for a Secure Encrypted +# Virtualization feature. +# +# @pdh: Platform Diffie-Hellman key (base64 encoded) +# +# @cert-chain: PDH certificate chain (base64 encoded) +# +# @cpu0-id: Unique ID of CPU0 (base64 encoded) (since 7.1) +# +# @cbitpos: C-bit location in page table entry +# +# @reduced-phys-bits: Number of physical Address bit reduction when +# SEV is enabled +# +# Since: 2.12 +## +{ 'struct': 'SevCapability', + 'data': { 'pdh': 'str', + 'cert-chain': 'str', + 'cpu0-id': 'str', + 'cbitpos': 'int', + 'reduced-phys-bits': 'int'} } + +## +# @query-sev-capabilities: +# +# This command is used to get the SEV capabilities, and is only +# supported on AMD X86 platforms with KVM enabled. If SEV is not +# available on the platform an error will be returned. +# +# Returns: SevCapability objects. +# +# Since: 2.12 +# +# .. qmp-example:: +# +# -> { "execute": "query-sev-capabilities" } +# <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE", +# "cpu0-id": "2lvmGwo+...61iEinw==", +# "cbitpos": 47, "reduced-phys-bits": 1}} +## +{ 'command': 'query-sev-capabilities', 'returns': 'SevCapability' } + +## +# @sev-inject-launch-secret: +# +# This command injects a secret blob into memory of a SEV/SEV-ES guest. +# +# This is only valid on x86 machines configured with KVM and the +# 'sev-guest' confidential virtualization object. SEV-SNP guests +# do not support launch secret injection +# +# This will return an error if launch secret injection is not possible, +# either due to an invalid guest configuration, or if the guest has not +# reached the required SEV state. +# +# @packet-header: the launch secret packet header encoded in base64 +# +# @secret: the launch secret data to be injected encoded in base64 +# +# @gpa: the guest physical address where secret will be injected. +# +# Since: 6.0 +## +{ 'command': 'sev-inject-launch-secret', + 'data': { 'packet-header': 'str', 'secret': 'str', '*gpa': 'uint64' } } + +## +# @SevAttestationReport: +# +# The struct describes attestation report for a Secure Encrypted +# Virtualization feature. +# +# @data: guest attestation report (base64 encoded) +# +# Since: 6.1 +## +{ 'struct': 'SevAttestationReport', + 'data': { 'data': 'str'} } + +## +# @query-sev-attestation-report: +# +# This command is used to get the SEV attestation report. +# +# This is only valid on x86 machines configured with KVM and the +# 'sev-guest' confidential virtualization object. The attestation +# report for SEV-SNP guests is only available within the guest. +# +# This will return an error if the attestation report is +# unavailable, either due to an invalid guest configuration +# or if the guest has not reached the required SEV state. +# +# @mnonce: a random 16 bytes value encoded in base64 (it will be +# included in report) +# +# Returns: SevAttestationReport objects. +# +# Since: 6.1 +# +# .. qmp-example:: +# +# -> { "execute" : "query-sev-attestation-report", +# "arguments": { "mnonce": "aaaaaaa" } } +# <- { "return" : { "data": "aaaaaaaabbbddddd"} } +## +{ 'command': 'query-sev-attestation-report', + 'data': { 'mnonce': 'str' }, + 'returns': 'SevAttestationReport' } diff --git a/qapi/misc-target.json b/qapi/misc-target.json index ae55e437a5f..ba4403a9241 100644 --- a/qapi/misc-target.json +++ b/qapi/misc-target.json @@ -2,290 +2,6 @@ # vim: filetype=python # -## -# @SevState: -# -# An enumeration of SEV state information used during @query-sev. -# -# @uninit: The guest is uninitialized. -# -# @launch-update: The guest is currently being launched; plaintext -# data and register state is being imported. -# -# @launch-secret: The guest is currently being launched; ciphertext -# data is being imported. -# -# @running: The guest is fully launched or migrated in. -# -# @send-update: The guest is currently being migrated out to another -# machine. -# -# @receive-update: The guest is currently being migrated from another -# machine. -# -# Since: 2.12 -## -{ 'enum': 'SevState', - 'data': ['uninit', 'launch-update', 'launch-secret', 'running', - 'send-update', 'receive-update' ], - 'if': 'TARGET_I386' } - -## -# @SevGuestType: -# -# An enumeration indicating the type of SEV guest being run. -# -# @sev: The guest is a legacy SEV or SEV-ES guest. -# -# @sev-snp: The guest is an SEV-SNP guest. -# -# Since: 6.2 -## -{ 'enum': 'SevGuestType', - 'data': [ 'sev', 'sev-snp' ], - 'if': 'TARGET_I386' } - -## -# @SevGuestInfo: -# -# Information specific to legacy SEV/SEV-ES guests. -# -# @policy: SEV policy value -# -# @handle: SEV firmware handle -# -# Since: 2.12 -## -{ 'struct': 'SevGuestInfo', - 'data': { 'policy': 'uint32', - 'handle': 'uint32' }, - 'if': 'TARGET_I386' } - -## -# @SevSnpGuestInfo: -# -# Information specific to SEV-SNP guests. -# -# @snp-policy: SEV-SNP policy value -# -# Since: 9.1 -## -{ 'struct': 'SevSnpGuestInfo', - 'data': { 'snp-policy': 'uint64' }, - 'if': 'TARGET_I386' } - -## -# @SevInfo: -# -# Information about Secure Encrypted Virtualization (SEV) support -# -# @enabled: true if SEV is active -# -# @api-major: SEV API major version -# -# @api-minor: SEV API minor version -# -# @build-id: SEV FW build id -# -# @state: SEV guest state -# -# @sev-type: Type of SEV guest being run -# -# Since: 2.12 -## -{ 'union': 'SevInfo', - 'base': { 'enabled': 'bool', - 'api-major': 'uint8', - 'api-minor' : 'uint8', - 'build-id' : 'uint8', - 'state' : 'SevState', - 'sev-type' : 'SevGuestType' }, - 'discriminator': 'sev-type', - 'data': { - 'sev': 'SevGuestInfo', - 'sev-snp': 'SevSnpGuestInfo' }, - 'if': 'TARGET_I386' } - - -## -# @query-sev: -# -# Returns information about SEV/SEV-ES/SEV-SNP. -# -# If unavailable due to an incompatible configuration the -# returned @enabled field will be set to 'false' and the -# state of all other fields is undefined. -# -# Returns: @SevInfo -# -# Since: 2.12 -# -# .. qmp-example:: -# -# -> { "execute": "query-sev" } -# <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0, -# "build-id" : 0, "policy" : 0, "state" : "running", -# "handle" : 1 } } -## -{ 'command': 'query-sev', 'returns': 'SevInfo', - 'if': 'TARGET_I386' } - -## -# @SevLaunchMeasureInfo: -# -# SEV Guest Launch measurement information -# -# @data: the measurement value encoded in base64 -# -# Since: 2.12 -## -{ 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'}, - 'if': 'TARGET_I386' } - -## -# @query-sev-launch-measure: -# -# Query the SEV/SEV-ES guest launch information. -# -# This is only valid on x86 machines configured with KVM and the -# 'sev-guest' confidential virtualization object. The launch -# measurement for SEV-SNP guests is only available within -# the guest. -# -# This will return an error if the launch measurement is -# unavailable, either due to an invalid guest configuration -# or if the guest has not reached the required SEV state. -# -# Returns: The @SevLaunchMeasureInfo for the guest -# -# Since: 2.12 -# -# .. qmp-example:: -# -# -> { "execute": "query-sev-launch-measure" } -# <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } } -## -{ 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo', - 'if': 'TARGET_I386' } - -## -# @SevCapability: -# -# The struct describes capability for a Secure Encrypted -# Virtualization feature. -# -# @pdh: Platform Diffie-Hellman key (base64 encoded) -# -# @cert-chain: PDH certificate chain (base64 encoded) -# -# @cpu0-id: Unique ID of CPU0 (base64 encoded) (since 7.1) -# -# @cbitpos: C-bit location in page table entry -# -# @reduced-phys-bits: Number of physical Address bit reduction when -# SEV is enabled -# -# Since: 2.12 -## -{ 'struct': 'SevCapability', - 'data': { 'pdh': 'str', - 'cert-chain': 'str', - 'cpu0-id': 'str', - 'cbitpos': 'int', - 'reduced-phys-bits': 'int'}, - 'if': 'TARGET_I386' } - -## -# @query-sev-capabilities: -# -# This command is used to get the SEV capabilities, and is only -# supported on AMD X86 platforms with KVM enabled. If SEV is not -# available on the platform an error will be returned. -# -# Returns: SevCapability objects. -# -# Since: 2.12 -# -# .. qmp-example:: -# -# -> { "execute": "query-sev-capabilities" } -# <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE", -# "cpu0-id": "2lvmGwo+...61iEinw==", -# "cbitpos": 47, "reduced-phys-bits": 1}} -## -{ 'command': 'query-sev-capabilities', 'returns': 'SevCapability', - 'if': 'TARGET_I386' } - -## -# @sev-inject-launch-secret: -# -# This command injects a secret blob into memory of a SEV/SEV-ES guest. -# -# This is only valid on x86 machines configured with KVM and the -# 'sev-guest' confidential virtualization object. SEV-SNP guests -# do not support launch secret injection -# -# This will return an error if launch secret injection is not possible, -# either due to an invalid guest configuration, or if the guest has not -# reached the required SEV state. -# -# @packet-header: the launch secret packet header encoded in base64 -# -# @secret: the launch secret data to be injected encoded in base64 -# -# @gpa: the guest physical address where secret will be injected. -# -# Since: 6.0 -## -{ 'command': 'sev-inject-launch-secret', - 'data': { 'packet-header': 'str', 'secret': 'str', '*gpa': 'uint64' }, - 'if': 'TARGET_I386' } - -## -# @SevAttestationReport: -# -# The struct describes attestation report for a Secure Encrypted -# Virtualization feature. -# -# @data: guest attestation report (base64 encoded) -# -# Since: 6.1 -## -{ 'struct': 'SevAttestationReport', - 'data': { 'data': 'str'}, - 'if': 'TARGET_I386' } - -## -# @query-sev-attestation-report: -# -# This command is used to get the SEV attestation report. -# -# This is only valid on x86 machines configured with KVM and the -# 'sev-guest' confidential virtualization object. The attestation -# report for SEV-SNP guests is only available within the guest. -# -# This will return an error if the attestation report is -# unavailable, either due to an invalid guest configuration -# or if the guest has not reached the required SEV state. -# -# @mnonce: a random 16 bytes value encoded in base64 (it will be -# included in report) -# -# Returns: SevAttestationReport objects. -# -# Since: 6.1 -# -# .. qmp-example:: -# -# -> { "execute" : "query-sev-attestation-report", -# "arguments": { "mnonce": "aaaaaaa" } } -# <- { "return" : { "data": "aaaaaaaabbbddddd"} } -## -{ 'command': 'query-sev-attestation-report', - 'data': { 'mnonce': 'str' }, - 'returns': 'SevAttestationReport', - 'if': 'TARGET_I386' } - ## # @GICCapability: # diff --git a/stubs/monitor-i386-sev.c b/stubs/monitor-i386-sev.c new file mode 100644 index 00000000000..d4f024128ca --- /dev/null +++ b/stubs/monitor-i386-sev.c @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-misc-i386.h" + +SevInfo *qmp_query_sev(Error **errp) +{ + error_setg(errp, "SEV is not available in this QEMU"); + return NULL; +} + +SevLaunchMeasureInfo *qmp_query_sev_launch_measure(Error **errp) +{ + error_setg(errp, "SEV is not available in this QEMU"); + return NULL; +} + +SevCapability *qmp_query_sev_capabilities(Error **errp) +{ + error_setg(errp, "SEV is not available in this QEMU"); + return NULL; +} + +void qmp_sev_inject_launch_secret(const char *packet_header, const char *secret, + bool has_gpa, uint64_t gpa, Error **errp) +{ + error_setg(errp, "SEV is not available in this QEMU"); +} + +SevAttestationReport *qmp_query_sev_attestation_report(const char *mnonce, + Error **errp) +{ + error_setg(errp, "SEV is not available in this QEMU"); + return NULL; +} diff --git a/target/i386/sev-system-stub.c b/target/i386/sev-system-stub.c index d5bf886e799..7c5c02a5657 100644 --- a/target/i386/sev-system-stub.c +++ b/target/i386/sev-system-stub.c @@ -14,34 +14,9 @@ #include "qemu/osdep.h" #include "monitor/monitor.h" #include "monitor/hmp-target.h" -#include "qapi/qapi-commands-misc-target.h" #include "qapi/error.h" #include "sev.h" -SevInfo *qmp_query_sev(Error **errp) -{ - error_setg(errp, "SEV is not available in this QEMU"); - return NULL; -} - -SevLaunchMeasureInfo *qmp_query_sev_launch_measure(Error **errp) -{ - error_setg(errp, "SEV is not available in this QEMU"); - return NULL; -} - -SevCapability *qmp_query_sev_capabilities(Error **errp) -{ - error_setg(errp, "SEV is not available in this QEMU"); - return NULL; -} - -void qmp_sev_inject_launch_secret(const char *packet_header, const char *secret, - bool has_gpa, uint64_t gpa, Error **errp) -{ - error_setg(errp, "SEV is not available in this QEMU"); -} - int sev_encrypt_flash(hwaddr gpa, uint8_t *ptr, uint64_t len, Error **errp) { g_assert_not_reached(); @@ -56,13 +31,6 @@ int sev_es_save_reset_vector(void *flash_ptr, uint64_t flash_size) g_assert_not_reached(); } -SevAttestationReport *qmp_query_sev_attestation_report(const char *mnonce, - Error **errp) -{ - error_setg(errp, "SEV is not available in this QEMU"); - return NULL; -} - void hmp_info_sev(Monitor *mon, const QDict *qdict) { monitor_printf(mon, "SEV is not available in this QEMU\n"); diff --git a/target/i386/sev.c b/target/i386/sev.c index 7ee700d6a35..56dd64e659a 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -37,7 +37,7 @@ #include "qom/object.h" #include "monitor/monitor.h" #include "monitor/hmp-target.h" -#include "qapi/qapi-commands-misc-target.h" +#include "qapi/qapi-commands-misc-i386.h" #include "confidential-guest.h" #include "hw/i386/pc.h" #include "system/address-spaces.h" diff --git a/stubs/meson.build b/stubs/meson.build index 9907b54c1e6..9922ec7b88e 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -78,6 +78,7 @@ if have_system stub_ss.add(files('win32-kbd-hook.c')) stub_ss.add(files('xen-hw-stub.c')) stub_ss.add(files('monitor-i386-rtc.c')) + stub_ss.add(files('monitor-i386-sev.c')) endif if have_system or have_user From patchwork Wed May 14 23:41:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 889896 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2875962wrr; Wed, 14 May 2025 16:43:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVxIlDxzCfqP9xhTbWf7VRMinhHPxYQQLvC/+PvlvfrIYQL5nrXLnKDkksXNOYWqqZANAUQ+Q==@linaro.org X-Google-Smtp-Source: AGHT+IGKhVoOO+Re5N6BBHQ/7eOOYHkRsVfcjI2ViSMm0JwUijnHJk0XRBYAMaOgYWZ0QXI3J1xW X-Received: by 2002:a05:620a:4051:b0:7c5:4c49:769c with SMTP id af79cd13be357-7cd3c652791mr46155485a.6.1747266203404; Wed, 14 May 2025 16:43:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747266203; cv=none; d=google.com; s=arc-20240605; b=LxUHx63ylz/ErOkj36kcfNQBsFnoLyNztZ7Ijv9yiiprzeO6ZnkkS/Jd2qNsbsk5BE yMSw5x6L2VX0kOD2WPwJnTjI3sHo7INS+bl6iqNSgNQ7h0qA4jpHkgWAy4rZDHTqzYvD ABCUy/peUdlBkVqeN04MwY/iDxPNck0o42T6nxzhhqLJmBrEFikgmwvoQreu5Yg3cD9u 0rNoiTJxcy7M8K1vwitv8ZfaB5H7nSIc0vWHi7/ancXMm5Uhlq3jYrHgWi1ZHkcH7ET6 WgRDK3GeVkmvArpteqVapaSpUpGIDjO6cqEOni5Zm0M3R1aoxc7cNAm5mINVzmGP8LnO KnRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NqewT8RcOqdr655RwHxx5Aazd/ICT+n56pHpqqFvRbw=; fh=VLmoI/6EX8QpenFjusv8qhWaEfIPciazAbyYTbMJFJo=; b=emEiUX+YD4RKCBLYtqu39djoUQxoLzGcG3i4ZYHqqS38uBbfEIzpUnopPCG1Sk+/iR FzSEZWxCIXUqwpJeowiFMfxJ6YgWA9kXM5D3+gL0cX7ECx5TrALpyYHG7Ve9bE23nzmE HTE5+RPHHKX/0c1tzzQwZheH32CNK1vM7gZf0WN1bHsMjOAg3ejWZmHkwoiKABgllPdi cxJek6wZQtVZLBcQk66BOBm4zZlGbci2An+oi9eOAwd/m1MwRV0CZSkjCwAai0CTZKrl etuKsHfUWQ8JlC++wdShMhc652bxc8jSIyDtL4p+Ew7rD57il6vh9+zIRBbWVeXcP3mg Dl/A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="W1izTu/2"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cd00fed4e1si1441405185a.475.2025.05.14.16.43.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 16:43:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="W1izTu/2"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFLj4-0001Uq-5c; Wed, 14 May 2025 19:41:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFLj1-0001Pa-Lb for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:23 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFLiz-00032O-19 for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:23 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-22e4db05fe8so3181665ad.0 for ; Wed, 14 May 2025 16:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747266079; x=1747870879; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NqewT8RcOqdr655RwHxx5Aazd/ICT+n56pHpqqFvRbw=; b=W1izTu/2ffk7Q2JmQrNnRvEWmx9sjlbGNRTrFuLlENTIDVn5EQTqhK9z1zhQMcRNXI 8/Gfj+67yxtFT9M85WS3SS6h410F5P65jvEZEB31W5gblQS6pspUzYdspBZPZPMChQNO Sr4CilJvw7I3kNldP0SmEvNiX7Uixde5MVUh3j3z5roeYIqJcyo9p5wgDKq9MjyvVfdG qAhQB2YYEhTDzQi1RlM2n83QyvaA2IkjikM5p6qComuCO/1IoDvN5aa7MWS6s85d3MSs FCBcF48x9pEtwPEFdyTUtrGnq4o0eehqJl09fkNjOcET39+MJVkVg3ww+tzuOeqMAwH0 UQyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747266079; x=1747870879; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NqewT8RcOqdr655RwHxx5Aazd/ICT+n56pHpqqFvRbw=; b=s4xgUqONjEBAHgS+RqCaAE5gJPa9TI79v3T/CffqoBKNBfJ9LbrCp+hCNNinKgOr70 kyu+c+P+BpKyY799wDim7xSzs0npuA0+TxzVQbxuo6IBQ7RUmiYdkWxEK6bCAiv9MPSu ukSI1DDQwxBTkIFMf1oP48VqlQ/ylS9GJYhr3fFIDMokIolUVNhNSQ7oX5n0WbSkezmL DhgrQrC1Mt/EK4FHPmyeK1mXqZWpe3v9AcHBFLmAlipbQ6h3Q0B0RwzJC+KAJ3HGgzNI YycKq5iLK9GfZZ9bF/Iyq2PJyhD5/YE76YM9lC8vHLbsA5E3FiuhJoHVJyz4zGpGUzPt NFfA== X-Gm-Message-State: AOJu0YzQ89Ens7ii3WsEExFxoHBbjSC/yPtAeCrmCZ8iOjOkMfL7nNcg 59Rg9UsLg+EVelS4E1J1+yrrxaxeHPVeAMHII9V+E0gKAgnod9r2qXgt++iP1TY0fnfithBlXZL s0gw= X-Gm-Gg: ASbGncuE9QYPv+4IZ7ksC9PnVIEchlkg8lFr5jgcvFFOxxvERaaOYnjGoJqrOtQLgBV VMj+vbAkgcenn4kfE40nVc/SPX7ksujnhuuF4YmMt0L7amj8V2vOl6fBdo2o3LYhLpMy9ZCnXlp Ah4zqc5Mk4LIK4q0YHAm2PdbUo4BOZHjNqv9HRW24iqIagXfIKPzUn2ax87X9J94CJcokHqNodl NpjzWvctBKbF78MeJApe15WYUdb7mjJ5pNEu3gjez/8y39ag50xjL5Q+F6GABINcIDpFjdB9tLL 1KF71/jo1f2I3LNQK0ohqInG7onhL5u30U8hOt/794UXoyHP9GM= X-Received: by 2002:a17:903:946:b0:22d:e57a:2795 with SMTP id d9443c01a7336-231b5ed186amr5294765ad.47.1747266079479; Wed, 14 May 2025 16:41:19 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc828b4e4sm104583615ad.182.2025.05.14.16.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 16:41:19 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Michael Roth , alex.bennee@linaro.org, Paolo Bonzini , Thomas Huth , berrange@redhat.com, Richard Henderson , peter.maydell@linaro.org, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 04/12] qapi: expose query-gic-capability command unconditionally Date: Wed, 14 May 2025 16:41:00 -0700 Message-ID: <20250514234108.3746675-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> References: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé This removes the TARGET_ARM condition from the query-gic-capability command. This requires providing a QMP command stub for non-ARM targets. This in turn requires moving the command out of misc-target.json, since that will trigger symbol poisoning errors when built from target independent code. Following the earlier precedent, this creates a misc-arm.json file to hold this ARM specific command. Signed-off-by: Daniel P. Berrangé Signed-off-by: Pierrick Bouvier --- qapi/misc-arm.json | 49 +++++++++++++++++++++++++++++++++++++++ qapi/misc-target.json | 44 ----------------------------------- qapi/qapi-schema.json | 1 + stubs/monitor-arm-gic.c | 12 ++++++++++ target/arm/arm-qmp-cmds.c | 2 +- qapi/meson.build | 1 + stubs/meson.build | 1 + 7 files changed, 65 insertions(+), 45 deletions(-) create mode 100644 qapi/misc-arm.json create mode 100644 stubs/monitor-arm-gic.c diff --git a/qapi/misc-arm.json b/qapi/misc-arm.json new file mode 100644 index 00000000000..f5341372f5a --- /dev/null +++ b/qapi/misc-arm.json @@ -0,0 +1,49 @@ +# -*- Mode: Python -*- +# vim: filetype=python +# +# SPDX-License-Identifier: GPL-2.0-or-later + +## +# @GICCapability: +# +# The struct describes capability for a specific GIC (Generic +# Interrupt Controller) version. These bits are not only decided by +# QEMU/KVM software version, but also decided by the hardware that the +# program is running upon. +# +# @version: version of GIC to be described. Currently, only 2 and 3 +# are supported. +# +# @emulated: whether current QEMU/hardware supports emulated GIC +# device in user space. +# +# @kernel: whether current QEMU/hardware supports hardware accelerated +# GIC device in kernel. +# +# Since: 2.6 +## +{ 'struct': 'GICCapability', + 'data': { 'version': 'int', + 'emulated': 'bool', + 'kernel': 'bool' } } + +## +# @query-gic-capabilities: +# +# It will return a list of GICCapability objects that describe its +# capability bits. +# +# On non-ARM targets this command will report an error as the GIC +# technology is not applicable. +# +# Returns: a list of GICCapability objects. +# +# Since: 2.6 +# +# .. qmp-example:: +# +# -> { "execute": "query-gic-capabilities" } +# <- { "return": [{ "version": 2, "emulated": true, "kernel": false }, +# { "version": 3, "emulated": false, "kernel": true } ] } +## +{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] } diff --git a/qapi/misc-target.json b/qapi/misc-target.json index ba4403a9241..d36292b3321 100644 --- a/qapi/misc-target.json +++ b/qapi/misc-target.json @@ -2,50 +2,6 @@ # vim: filetype=python # -## -# @GICCapability: -# -# The struct describes capability for a specific GIC (Generic -# Interrupt Controller) version. These bits are not only decided by -# QEMU/KVM software version, but also decided by the hardware that the -# program is running upon. -# -# @version: version of GIC to be described. Currently, only 2 and 3 -# are supported. -# -# @emulated: whether current QEMU/hardware supports emulated GIC -# device in user space. -# -# @kernel: whether current QEMU/hardware supports hardware accelerated -# GIC device in kernel. -# -# Since: 2.6 -## -{ 'struct': 'GICCapability', - 'data': { 'version': 'int', - 'emulated': 'bool', - 'kernel': 'bool' }, - 'if': 'TARGET_ARM' } - -## -# @query-gic-capabilities: -# -# This command is ARM-only. It will return a list of GICCapability -# objects that describe its capability bits. -# -# Returns: a list of GICCapability objects. -# -# Since: 2.6 -# -# .. qmp-example:: -# -# -> { "execute": "query-gic-capabilities" } -# <- { "return": [{ "version": 2, "emulated": true, "kernel": false }, -# { "version": 3, "emulated": false, "kernel": true } ] } -## -{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'], - 'if': 'TARGET_ARM' } - ## # @SGXEPCSection: # diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json index 96f6aa44133..e96bff8d38c 100644 --- a/qapi/qapi-schema.json +++ b/qapi/qapi-schema.json @@ -61,6 +61,7 @@ { 'include': 'replay.json' } { 'include': 'yank.json' } { 'include': 'misc.json' } +{ 'include': 'misc-arm.json' } { 'include': 'misc-i386.json' } { 'include': 'misc-target.json' } { 'include': 'audio.json' } diff --git a/stubs/monitor-arm-gic.c b/stubs/monitor-arm-gic.c new file mode 100644 index 00000000000..b3429243ef8 --- /dev/null +++ b/stubs/monitor-arm-gic.c @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-misc-arm.h" + + +GICCapabilityList *qmp_query_gic_capabilities(Error **errp) +{ + error_setg(errp, "GIC hardware is not available on this target"); + return NULL; +} diff --git a/target/arm/arm-qmp-cmds.c b/target/arm/arm-qmp-cmds.c index a1a944adb43..ef18c867ca4 100644 --- a/target/arm/arm-qmp-cmds.c +++ b/target/arm/arm-qmp-cmds.c @@ -27,7 +27,7 @@ #include "qapi/visitor.h" #include "qapi/qobject-input-visitor.h" #include "qapi/qapi-commands-machine-target.h" -#include "qapi/qapi-commands-misc-target.h" +#include "qapi/qapi-commands-misc-arm.h" #include "qobject/qdict.h" #include "qom/qom-qobject.h" diff --git a/qapi/meson.build b/qapi/meson.build index 3a9bd061047..5e93e6b8cfd 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -64,6 +64,7 @@ if have_system 'qdev', 'pci', 'rocker', + 'misc-arm', 'misc-i386', 'tpm', 'uefi', diff --git a/stubs/meson.build b/stubs/meson.build index 9922ec7b88e..07e9d3799a5 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -77,6 +77,7 @@ if have_system stub_ss.add(files('target-monitor-defs.c')) stub_ss.add(files('win32-kbd-hook.c')) stub_ss.add(files('xen-hw-stub.c')) + stub_ss.add(files('monitor-arm-gic.c')) stub_ss.add(files('monitor-i386-rtc.c')) stub_ss.add(files('monitor-i386-sev.c')) endif From patchwork Wed May 14 23:41:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 889891 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2875842wrr; Wed, 14 May 2025 16:42:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXGJJIhkmE7wyM959cmJW+460bdE3+ZOO80g1WPAHEOmsCfMRMMr4cMMf7EcU7iUQ1Sdo/Z6w==@linaro.org X-Google-Smtp-Source: AGHT+IEL6edRNBf1swLoiabbcg0SuTmrpUeVs4EPbqTMXc6MIT0jt3OrWIYFkCVmwVc19oJs1wVm X-Received: by 2002:a05:6214:3009:b0:6f5:40a5:e07b with SMTP id 6a1803df08f44-6f896e35101mr64245596d6.26.1747266173948; Wed, 14 May 2025 16:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747266173; cv=none; d=google.com; s=arc-20240605; b=cvcbCZBreJIzmAP7FjPJwvU7KUIcSKrTeueL0+L0gmrJvzaQmmWf1hoZBk8sjhKUVY 9NNiE4b5RLy4AUCKsnyEmnKJ+MJDex+t1z2nMgpQKqJzr68jfGDxJvdzupi+BapoOe4Q d8KQ0/J/Scf0BrF28JPZNajyrv2WaxCAO2snfmD+G/ux0uZdZaxIFpbs+aFSsVnygFOT 9YkZTtWOCwxI/qrxJKZtkoOWHPERWeU/xHCkYLmWRwoG2qbKU1APJMjT50zXL0MtFlmp kZZBW1oh4ayHIrxpXA5iGEDi31zuqX947lTtA0UvdnI6coeVhVdtF/2X4Ddz8FpfFi+K tvZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lBS2AIpxXgiP9xnU+n7gYkZBp0TynhJ2U8QSIxuWAKE=; fh=VLmoI/6EX8QpenFjusv8qhWaEfIPciazAbyYTbMJFJo=; b=LpPbTObtYYTN+DT8kHM/LhMHMJi6gHm3/j6d4MPWOzOMWqXf8SBrNXfX0fy5AakRB7 phGyG0ZTokv06q8kk7k3iYH1wwoRnWg0K/QDvtZ+5psq3wAiymqnAnvsppxD2cNOc/kq OaDh3kQI/QfLBQBH4EOW2yyEIxibTJG9codbWHBEjTgwgdcnnUWZnb1UcdZyW+JgVwfE 8VJIQucksKZrc9dlGZ2nXj3Goj9kvl4PPGmyAJGe34470rzSGJyWuuyzQ5m48+j8Menv x0ADzsQeZ1WtCq1faRaRRHN6NX+uYvsy1GTTKKSAVjwTP1oKHGJhhNY2lFaWd3hmPfCt ufXA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K4ZmI/s9"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f6e39e7272si143182266d6.98.2025.05.14.16.42.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 16:42:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K4ZmI/s9"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFLj7-0001gB-So; Wed, 14 May 2025 19:41:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFLj2-0001TR-NT for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:24 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFLj0-00032w-6i for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:24 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-22d95f0dda4so4136495ad.2 for ; Wed, 14 May 2025 16:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747266080; x=1747870880; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lBS2AIpxXgiP9xnU+n7gYkZBp0TynhJ2U8QSIxuWAKE=; b=K4ZmI/s9RnQ4Bqfu4SnDzvfLuEI2ADM2cc2U+u2K1Hi8AjEPB8iLEVS1zcLse5Sh0U 9jtAEf7HL49qSQW8gqWtIBJV2/mHAjugkwpdRzcN9ZFqtJZKM2iLerr3h1hAxCMynAP7 ULGVyXuiy/GdP/yQhgfKeogJSBV4JCN2Hfh015PBc9INbhXlhvvNp9daG6XaVeHZSr+L E6GMNVtNeo5EwnPwV2ko19LNatksk0SfNKjWn2uZ/KzEZO8BM8XEYDo/KGEQx70HOye3 twNDuBP6T2eN4FjzyXu57+TbyIKn7YNaQ4zwnzw1yDdg2RrNKyRGOF7VcsxhdArD6D0o YiTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747266080; x=1747870880; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lBS2AIpxXgiP9xnU+n7gYkZBp0TynhJ2U8QSIxuWAKE=; b=SN1K9TD1MvmaBygVeIlc2dkrWv3JMOIAvXDyBfYtm8Cd94i0z8WIOoXC5O4M/oNZf7 9i3kitO+7nck1GvT6DW9dc6zX6TEAY4+mTefa1h42vttnn+NRe5bhV3o76XqRpVUhI+S 9STnJXV8vsFT2r7XrvQeDkbvz8bcQT6ZwM1AsbziSY9I1x9fx9vw9Sid16C6aUB0byKZ f0irUsbxyKA87DZDXzt6+ZGySDYVh8bkm8u5YjrthQEZ0HUtacrPzo4iHpyGQS5xDgRO 7gOJf3VSke9XXMnBiCJlzbNs7qg53TuB0l5qJFYSYY/b7ZP0hg7q90dZ5njDol3f8JaT LJ9A== X-Gm-Message-State: AOJu0Yw/bnJeFdqA44i0lAexi3OrlbthVUorekyBP4subYdJhxB8Zz1n KyqCURmJW3fLCaYPmcc1zmm1g88T57O/sa0h3W1++GdeZoYS6Hcwf/y+zJJedU8ZyWBW4v/wR9Z msCs= X-Gm-Gg: ASbGnctrlsTh7F88GppRBCgDNs9U42R4Jcdd/U+usaFBqHE9NlKS7Mli5+kPWvZMiMQ 0butNPnmAONmr0yP6UugRfb79H2YBqBLo3B2sXtfcGeyoX6OLbtfUP8Fje1H5XOMdLamFGJkBdB 5b1xfujtu4DLkB4zSGM3aFW/G/7UuxJcZHvPRL5pPyfldsbSXpR9XGEo6hQnPgIPTLvRv87JC6v c7nQDbcO1CU4si4xIvBAWVieFqvjzCcB72+Ko0bHokUqxplcK5nlM0MssWtRXloQdI0rh7k2MwA OSUC/7+NAqibL32RcmdsBy+cctKG1Iy3o2T94ZDJQsSSboZYSIU= X-Received: by 2002:a17:903:2f85:b0:223:5ca8:5ecb with SMTP id d9443c01a7336-23198143b9bmr69090595ad.42.1747266080411; Wed, 14 May 2025 16:41:20 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc828b4e4sm104583615ad.182.2025.05.14.16.41.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 16:41:20 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Michael Roth , alex.bennee@linaro.org, Paolo Bonzini , Thomas Huth , berrange@redhat.com, Richard Henderson , peter.maydell@linaro.org, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 05/12] qapi: make SGX commands unconditionally available Date: Wed, 14 May 2025 16:41:01 -0700 Message-ID: <20250514234108.3746675-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> References: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé This removes the TARGET_I386 condition from the SGX confidential virtualization commands, moving them to the recently introduced misc-i386.json QAPI file, given they are inherantly i386 specific commands. Observe a pre-existing bug that the "SGXEPCSection" struct lacked a TARGET_I386 condition, despite its only usage being behind a TARGET_I386 condition. Signed-off-by: Daniel P. Berrangé Signed-off-by: Pierrick Bouvier --- qapi/misc-i386.json | 77 +++++++++++++++++++++++++++++++++++++++ qapi/misc-target.json | 78 ---------------------------------------- hw/i386/sgx-stub.c | 13 ------- hw/i386/sgx.c | 2 +- stubs/monitor-i386-sgx.c | 17 +++++++++ stubs/meson.build | 1 + 6 files changed, 96 insertions(+), 92 deletions(-) create mode 100644 stubs/monitor-i386-sgx.c diff --git a/qapi/misc-i386.json b/qapi/misc-i386.json index de0e4ab67ff..0ddc297ccbf 100644 --- a/qapi/misc-i386.json +++ b/qapi/misc-i386.json @@ -293,3 +293,80 @@ { 'command': 'query-sev-attestation-report', 'data': { 'mnonce': 'str' }, 'returns': 'SevAttestationReport' } + +## +# @SGXEPCSection: +# +# Information about intel SGX EPC section info +# +# @node: the numa node +# +# @size: the size of EPC section +# +# Since: 7.0 +## +{ 'struct': 'SGXEPCSection', + 'data': { 'node': 'int', + 'size': 'uint64'}} + +## +# @SGXInfo: +# +# Information about intel Safe Guard eXtension (SGX) support +# +# @sgx: true if SGX is supported +# +# @sgx1: true if SGX1 is supported +# +# @sgx2: true if SGX2 is supported +# +# @flc: true if FLC is supported +# +# @sections: The EPC sections info for guest (Since: 7.0) +# +# Since: 6.2 +## +{ 'struct': 'SGXInfo', + 'data': { 'sgx': 'bool', + 'sgx1': 'bool', + 'sgx2': 'bool', + 'flc': 'bool', + 'sections': ['SGXEPCSection']} } + +## +# @query-sgx: +# +# Returns information about SGX +# +# Returns: @SGXInfo +# +# Since: 6.2 +# +# .. qmp-example:: +# +# -> { "execute": "query-sgx" } +# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true, +# "flc": true, +# "sections": [{"node": 0, "size": 67108864}, +# {"node": 1, "size": 29360128}]} } +## +{ 'command': 'query-sgx', 'returns': 'SGXInfo' } + +## +# @query-sgx-capabilities: +# +# Returns information from host SGX capabilities +# +# Returns: @SGXInfo +# +# Since: 6.2 +# +# .. qmp-example:: +# +# -> { "execute": "query-sgx-capabilities" } +# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true, +# "flc": true, +# "section" : [{"node": 0, "size": 67108864}, +# {"node": 1, "size": 29360128}]} } +## +{ 'command': 'query-sgx-capabilities', 'returns': 'SGXInfo' } diff --git a/qapi/misc-target.json b/qapi/misc-target.json index d36292b3321..d9368a1f21f 100644 --- a/qapi/misc-target.json +++ b/qapi/misc-target.json @@ -2,84 +2,6 @@ # vim: filetype=python # -## -# @SGXEPCSection: -# -# Information about intel SGX EPC section info -# -# @node: the numa node -# -# @size: the size of EPC section -# -# Since: 7.0 -## -{ 'struct': 'SGXEPCSection', - 'data': { 'node': 'int', - 'size': 'uint64'}} - -## -# @SGXInfo: -# -# Information about intel Safe Guard eXtension (SGX) support -# -# @sgx: true if SGX is supported -# -# @sgx1: true if SGX1 is supported -# -# @sgx2: true if SGX2 is supported -# -# @flc: true if FLC is supported -# -# @sections: The EPC sections info for guest (Since: 7.0) -# -# Since: 6.2 -## -{ 'struct': 'SGXInfo', - 'data': { 'sgx': 'bool', - 'sgx1': 'bool', - 'sgx2': 'bool', - 'flc': 'bool', - 'sections': ['SGXEPCSection']}, - 'if': 'TARGET_I386' } - -## -# @query-sgx: -# -# Returns information about SGX -# -# Returns: @SGXInfo -# -# Since: 6.2 -# -# .. qmp-example:: -# -# -> { "execute": "query-sgx" } -# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true, -# "flc": true, -# "sections": [{"node": 0, "size": 67108864}, -# {"node": 1, "size": 29360128}]} } -## -{ 'command': 'query-sgx', 'returns': 'SGXInfo', 'if': 'TARGET_I386' } - -## -# @query-sgx-capabilities: -# -# Returns information from host SGX capabilities -# -# Returns: @SGXInfo -# -# Since: 6.2 -# -# .. qmp-example:: -# -# -> { "execute": "query-sgx-capabilities" } -# <- { "return": { "sgx": true, "sgx1" : true, "sgx2" : true, -# "flc": true, -# "section" : [{"node": 0, "size": 67108864}, -# {"node": 1, "size": 29360128}]} } -## -{ 'command': 'query-sgx-capabilities', 'returns': 'SGXInfo', 'if': 'TARGET_I386' } - ## # @EvtchnPortType: diff --git a/hw/i386/sgx-stub.c b/hw/i386/sgx-stub.c index 38ff75e9f37..10ffcdd154d 100644 --- a/hw/i386/sgx-stub.c +++ b/hw/i386/sgx-stub.c @@ -4,24 +4,11 @@ #include "hw/i386/pc.h" #include "hw/i386/sgx-epc.h" #include "qapi/error.h" -#include "qapi/qapi-commands-misc-target.h" void sgx_epc_build_srat(GArray *table_data) { } -SGXInfo *qmp_query_sgx(Error **errp) -{ - error_setg(errp, "SGX support is not compiled in"); - return NULL; -} - -SGXInfo *qmp_query_sgx_capabilities(Error **errp) -{ - error_setg(errp, "SGX support is not compiled in"); - return NULL; -} - void hmp_info_sgx(Monitor *mon, const QDict *qdict) { monitor_printf(mon, "SGX is not available in this QEMU\n"); diff --git a/hw/i386/sgx.c b/hw/i386/sgx.c index 5685c4fb802..2b10a8d144e 100644 --- a/hw/i386/sgx.c +++ b/hw/i386/sgx.c @@ -19,7 +19,7 @@ #include "monitor/hmp-target.h" #include "qapi/error.h" #include "qemu/error-report.h" -#include "qapi/qapi-commands-misc-target.h" +#include "qapi/qapi-commands-misc-i386.h" #include "system/address-spaces.h" #include "system/hw_accel.h" #include "system/reset.h" diff --git a/stubs/monitor-i386-sgx.c b/stubs/monitor-i386-sgx.c new file mode 100644 index 00000000000..55a4f194f3f --- /dev/null +++ b/stubs/monitor-i386-sgx.c @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-misc-i386.h" + +SGXInfo *qmp_query_sgx(Error **errp) +{ + error_setg(errp, "SGX support is not compiled in"); + return NULL; +} + +SGXInfo *qmp_query_sgx_capabilities(Error **errp) +{ + error_setg(errp, "SGX support is not compiled in"); + return NULL; +} diff --git a/stubs/meson.build b/stubs/meson.build index 07e9d3799a5..f2eb4880181 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -80,6 +80,7 @@ if have_system stub_ss.add(files('monitor-arm-gic.c')) stub_ss.add(files('monitor-i386-rtc.c')) stub_ss.add(files('monitor-i386-sev.c')) + stub_ss.add(files('monitor-i386-sgx.c')) endif if have_system or have_user From patchwork Wed May 14 23:41:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 889892 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2875843wrr; Wed, 14 May 2025 16:42:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwyOIHl1epNMuiW6cm/y6YUFmqwpzO61U3VAGgBHxrmP9XoH+pacDwHCMwnXCXZptmaVYZDg==@linaro.org X-Google-Smtp-Source: AGHT+IE24v8WL2uNRhVCXCvqbSAGq/OmbvjlVJYDA0muUxJ1yacPpGcyMvL9YksuwIy82FdTIgF/ X-Received: by 2002:a05:622a:1e8f:b0:476:8cad:72d9 with SMTP id d75a77b69052e-49495cdb700mr87212491cf.33.1747266174115; Wed, 14 May 2025 16:42:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747266174; cv=none; d=google.com; s=arc-20240605; b=aBGx6dLd7p84dHnlbktqj8jrVAHluX3RYWdtHsYbKEVCN22mKKzZwOhZe1Itd0NWca 7l5566Rt9d4WHV00ZynCzovKthKKXtkiSv7VM5i0E6pFQh9sa/qH7IjZ3m32jemW4TA3 jWftH169FI+sZg9MSiH3nteXc+gPm7iQjfH/1Pp5OZLztb1Ja36ETwQZkAw7mHtLsUuT eBmJBf8zILnI7vxHNrqLOOxMNPcy1qRJo2GVSzhjzzCShzTSM+a2UssttniXt8kBmOET AFSPDP396BEZWUTgU70UbxU59jztZZypCGRGsuDMtHEGU858JgMZVBaxv47x7u3uXtvS kh5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2Ut9gXI10r1rMT9f7vlPNOoFK8sxd1vNcUdclqcG1OI=; fh=Z+tyol3/HVmksa2quCSdCmffRhN2SbL1MXS3nnc6PV8=; b=BAB/4tu/anr2L7/SQ0o+vnWEeWNsy652Nk33+7FzR3t4IfRPllMPmBz1vgYTcgw01g ZLpCWHbaiZFtUF71HvBsEUGyqd+xG0J6Rps/TSNOs6hKprzNbeFSodSWihU2NWZCHI5t iSoUh6QDteSvhsqLeIf4ZGLO0j0jWCWDsLc1YD7deGaTM+D4znrHRlP8xqwypkAlj97f Mp0SH1GUuTC8NuLhcC7u5oCGTShbRnILN7xDn0vL/AqUyyUnbzHrj4e44HUawg5ecI9k l8Cpw55GyGZPSPHkSa2AjdrtCp+QWOHk7ol2W2hXLJF0migaF62n3CVF2D3OvRk0n4NH 69fg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KThoelox; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-494525b1e58si145022091cf.627.2025.05.14.16.42.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 16:42:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KThoelox; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFLj7-0001fQ-QA; Wed, 14 May 2025 19:41:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFLj4-0001V7-EH for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:26 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFLj1-00033B-7S for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:26 -0400 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-b20d46fcc86so241252a12.3 for ; Wed, 14 May 2025 16:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747266081; x=1747870881; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2Ut9gXI10r1rMT9f7vlPNOoFK8sxd1vNcUdclqcG1OI=; b=KThoeloxoZ6RngZtThHsxISnWvqAdostDNwrP55jzucRz4NpEAV7PG3sqZJOSajPyx SUb8Rvsibljp2Vpv30FA2cUi/DpFk7ZFuAp8zkpnQGqMqHOjxuFE2O/CA2auoxuZutqf bc371X+WLOjO1IG1UFAkYP8vBnrmtacS0qcaBTA9nyHH/67mKS0U0PRk6SUxx6QsmuQE ReTJ0yTMByZAZxDBCA2u4W9IRYrHcwjNlWZ40XNhsCvo26B4JFG+rBsoxG4bgb8uGfht W4e1hIEgqldH+u9C6ofc3D9Nw5SeAYBBX1NwhhDM55cbb/NNszCfT+cgB3NPfy6BrI+K N/rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747266081; x=1747870881; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2Ut9gXI10r1rMT9f7vlPNOoFK8sxd1vNcUdclqcG1OI=; b=G+zqwzb7uwLupf/h7Zr3ei9p4nNshNdvDYk9R6q9JrAhXrov7c/vTA9w/rFRxw5eJ0 e7rhEy31uOzDI74Bse4xnFiiT5987qnqSTfddZojUFldfb9RNrZxdEkyQr5LPSpJGz0m 46F2wCJaryUdRpKUC/5+qP61cZY6CHSzZWCHc8g/LUusexx7q/0m9R8tInCJ4t+b+Xa8 Rcy57Evj3HMEOMTmEG9OreCiteaNT68FuK+GYxnYiYWJqSGHByPYxxbdqKdRIP+akX4B bq+s1q9JqYLd0l7ElHHaktlw3XKkDixjAv2yqGAsRN6OUF5dru8QKUrdQn9wIGwfEv2j 3muw== X-Gm-Message-State: AOJu0YxRMDx1zG7w2qRI3DZsskka8PuxTAqGXG4FJE6ZTdinI3CP8ypW 7XtwP1ADi7b0uGfioSKNrpNpZCMWnfuUeigbFflDIiIhCvhvyeUw0OW2hERAV4tpFSqxPCGX+kj ZB+o= X-Gm-Gg: ASbGnctiWpnyt21GJ1e05XuSwVdgNFYJ4VIcRYXyD/fjYtIb63twhlTNQUNh70B8TTi vkmqxec0CbUME2dmKB50lRYvJr9Q+o/8GGoc9G4m8OVYdNbHKH7p/DiOW7oIhHCkpAa6RGz8GVS 7FTltIXhY6cwTRq8Iqli+os+VrjGiTOGyBKmNDIhfwCMWcBWeLDPiwxAQz0im90Y7NyTs19xPdj ZIvVvXkkrS10duVFrXYFGj7wO6Wz83ul05T8gV+cYl3TRaPk0vQUL2pQXTiauMLfbdh2q5EhAc+ d4sslGAookTVZOIx2CTnAqMo3dJ8LtbSDk2aurJkEXlWxs2G13g= X-Received: by 2002:a17:903:1b26:b0:224:1074:63a2 with SMTP id d9443c01a7336-231981befb6mr87984055ad.43.1747266081444; Wed, 14 May 2025 16:41:21 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc828b4e4sm104583615ad.182.2025.05.14.16.41.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 16:41:21 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Michael Roth , alex.bennee@linaro.org, Paolo Bonzini , Thomas Huth , berrange@redhat.com, Richard Henderson , peter.maydell@linaro.org, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Woodhouse Subject: [PATCH 06/12] qapi: make Xen event commands unconditionally available Date: Wed, 14 May 2025 16:41:02 -0700 Message-ID: <20250514234108.3746675-7-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> References: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x533.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé This removes the TARGET_I386 condition from the Xen event channel commands, moving them to the recently introduced misc-i386.json QAPI file, given they are inherantly i386 specific commands. Signed-off-by: Daniel P. Berrangé Acked-by: David Woodhouse Signed-off-by: Pierrick Bouvier --- qapi/misc-i386.json | 107 +++++++++++++++++++++++++++++++++++++ qapi/misc-target.json | 112 --------------------------------------- hw/i386/kvm/xen-stubs.c | 13 ----- hw/i386/kvm/xen_evtchn.c | 2 +- stubs/monitor-i386-xen.c | 16 ++++++ stubs/meson.build | 1 + 6 files changed, 125 insertions(+), 126 deletions(-) create mode 100644 stubs/monitor-i386-xen.c diff --git a/qapi/misc-i386.json b/qapi/misc-i386.json index 0ddc297ccbf..3d3f373a6be 100644 --- a/qapi/misc-i386.json +++ b/qapi/misc-i386.json @@ -370,3 +370,110 @@ # {"node": 1, "size": 29360128}]} } ## { 'command': 'query-sgx-capabilities', 'returns': 'SGXInfo' } + +## +# @EvtchnPortType: +# +# An enumeration of Xen event channel port types. +# +# @closed: The port is unused. +# +# @unbound: The port is allocated and ready to be bound. +# +# @interdomain: The port is connected as an interdomain interrupt. +# +# @pirq: The port is bound to a physical IRQ (PIRQ). +# +# @virq: The port is bound to a virtual IRQ (VIRQ). +# +# @ipi: The post is an inter-processor interrupt (IPI). +# +# Since: 8.0 +## +{ 'enum': 'EvtchnPortType', + 'data': ['closed', 'unbound', 'interdomain', 'pirq', 'virq', 'ipi'] } + +## +# @EvtchnInfo: +# +# Information about a Xen event channel port +# +# @port: the port number +# +# @vcpu: target vCPU for this port +# +# @type: the port type +# +# @remote-domain: remote domain for interdomain ports +# +# @target: remote port ID, or virq/pirq number +# +# @pending: port is currently active pending delivery +# +# @masked: port is masked +# +# Since: 8.0 +## +{ 'struct': 'EvtchnInfo', + 'data': {'port': 'uint16', + 'vcpu': 'uint32', + 'type': 'EvtchnPortType', + 'remote-domain': 'str', + 'target': 'uint16', + 'pending': 'bool', + 'masked': 'bool'} } + + +## +# @xen-event-list: +# +# Query the Xen event channels opened by the guest. +# +# Returns: list of open event channel ports. +# +# Since: 8.0 +# +# .. qmp-example:: +# +# -> { "execute": "xen-event-list" } +# <- { "return": [ +# { +# "pending": false, +# "port": 1, +# "vcpu": 1, +# "remote-domain": "qemu", +# "masked": false, +# "type": "interdomain", +# "target": 1 +# }, +# { +# "pending": false, +# "port": 2, +# "vcpu": 0, +# "remote-domain": "", +# "masked": false, +# "type": "virq", +# "target": 0 +# } +# ] +# } +## +{ 'command': 'xen-event-list', + 'returns': ['EvtchnInfo'] } + +## +# @xen-event-inject: +# +# Inject a Xen event channel port (interrupt) to the guest. +# +# @port: The port number +# +# Since: 8.0 +# +# .. qmp-example:: +# +# -> { "execute": "xen-event-inject", "arguments": { "port": 1 } } +# <- { "return": { } } +## +{ 'command': 'xen-event-inject', + 'data': { 'port': 'uint32' } } diff --git a/qapi/misc-target.json b/qapi/misc-target.json index d9368a1f21f..c9ea1ab23e7 100644 --- a/qapi/misc-target.json +++ b/qapi/misc-target.json @@ -1,115 +1,3 @@ # -*- Mode: Python -*- # vim: filetype=python # - - -## -# @EvtchnPortType: -# -# An enumeration of Xen event channel port types. -# -# @closed: The port is unused. -# -# @unbound: The port is allocated and ready to be bound. -# -# @interdomain: The port is connected as an interdomain interrupt. -# -# @pirq: The port is bound to a physical IRQ (PIRQ). -# -# @virq: The port is bound to a virtual IRQ (VIRQ). -# -# @ipi: The post is an inter-processor interrupt (IPI). -# -# Since: 8.0 -## -{ 'enum': 'EvtchnPortType', - 'data': ['closed', 'unbound', 'interdomain', 'pirq', 'virq', 'ipi'], - 'if': 'TARGET_I386' } - -## -# @EvtchnInfo: -# -# Information about a Xen event channel port -# -# @port: the port number -# -# @vcpu: target vCPU for this port -# -# @type: the port type -# -# @remote-domain: remote domain for interdomain ports -# -# @target: remote port ID, or virq/pirq number -# -# @pending: port is currently active pending delivery -# -# @masked: port is masked -# -# Since: 8.0 -## -{ 'struct': 'EvtchnInfo', - 'data': {'port': 'uint16', - 'vcpu': 'uint32', - 'type': 'EvtchnPortType', - 'remote-domain': 'str', - 'target': 'uint16', - 'pending': 'bool', - 'masked': 'bool'}, - 'if': 'TARGET_I386' } - - -## -# @xen-event-list: -# -# Query the Xen event channels opened by the guest. -# -# Returns: list of open event channel ports. -# -# Since: 8.0 -# -# .. qmp-example:: -# -# -> { "execute": "xen-event-list" } -# <- { "return": [ -# { -# "pending": false, -# "port": 1, -# "vcpu": 1, -# "remote-domain": "qemu", -# "masked": false, -# "type": "interdomain", -# "target": 1 -# }, -# { -# "pending": false, -# "port": 2, -# "vcpu": 0, -# "remote-domain": "", -# "masked": false, -# "type": "virq", -# "target": 0 -# } -# ] -# } -## -{ 'command': 'xen-event-list', - 'returns': ['EvtchnInfo'], - 'if': 'TARGET_I386' } - -## -# @xen-event-inject: -# -# Inject a Xen event channel port (interrupt) to the guest. -# -# @port: The port number -# -# Since: 8.0 -# -# .. qmp-example:: -# -# -> { "execute": "xen-event-inject", "arguments": { "port": 1 } } -# <- { "return": { } } -## -{ 'command': 'xen-event-inject', - 'data': { 'port': 'uint32' }, - 'if': 'TARGET_I386' } diff --git a/hw/i386/kvm/xen-stubs.c b/hw/i386/kvm/xen-stubs.c index d03131e6864..ce73119ee7a 100644 --- a/hw/i386/kvm/xen-stubs.c +++ b/hw/i386/kvm/xen-stubs.c @@ -12,7 +12,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "qapi/qapi-commands-misc-target.h" #include "xen_evtchn.h" #include "xen_primary_console.h" @@ -38,15 +37,3 @@ void xen_primary_console_create(void) void xen_primary_console_set_be_port(uint16_t port) { } -#ifdef TARGET_I386 -EvtchnInfoList *qmp_xen_event_list(Error **errp) -{ - error_setg(errp, "Xen event channel emulation not enabled"); - return NULL; -} - -void qmp_xen_event_inject(uint32_t port, Error **errp) -{ - error_setg(errp, "Xen event channel emulation not enabled"); -} -#endif diff --git a/hw/i386/kvm/xen_evtchn.c b/hw/i386/kvm/xen_evtchn.c index b5190549a81..dd566c49679 100644 --- a/hw/i386/kvm/xen_evtchn.c +++ b/hw/i386/kvm/xen_evtchn.c @@ -19,7 +19,7 @@ #include "monitor/monitor.h" #include "monitor/hmp.h" #include "qapi/error.h" -#include "qapi/qapi-commands-misc-target.h" +#include "qapi/qapi-commands-misc-i386.h" #include "qobject/qdict.h" #include "qom/object.h" #include "exec/target_page.h" diff --git a/stubs/monitor-i386-xen.c b/stubs/monitor-i386-xen.c new file mode 100644 index 00000000000..95b826f9795 --- /dev/null +++ b/stubs/monitor-i386-xen.c @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-misc-i386.h" + +EvtchnInfoList *qmp_xen_event_list(Error **errp) +{ + error_setg(errp, "Xen event channel emulation not enabled"); + return NULL; +} + +void qmp_xen_event_inject(uint32_t port, Error **errp) +{ + error_setg(errp, "Xen event channel emulation not enabled"); +} diff --git a/stubs/meson.build b/stubs/meson.build index f2eb4880181..0ef11976a2f 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -81,6 +81,7 @@ if have_system stub_ss.add(files('monitor-i386-rtc.c')) stub_ss.add(files('monitor-i386-sev.c')) stub_ss.add(files('monitor-i386-sgx.c')) + stub_ss.add(files('monitor-i386-xen.c')) endif if have_system or have_user From patchwork Wed May 14 23:41:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 889890 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2875801wrr; Wed, 14 May 2025 16:42:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV/jch4w/Y46G7lCnx43o7GaowKYRZMscHHE199alKe6ny5TbGNAxvU7Nnj2vIgV3FB+nmTwQ==@linaro.org X-Google-Smtp-Source: AGHT+IG3et5uCdTcdhzOUOBFy0bPucWs2zVOm6vCaLw9Bp31R9+EqK44tiRg2bUqi1DbBAKn2irp X-Received: by 2002:a05:622a:1b09:b0:481:3f7:f5cc with SMTP id d75a77b69052e-49495ccd276mr101963971cf.34.1747266162407; Wed, 14 May 2025 16:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747266162; cv=none; d=google.com; s=arc-20240605; b=axE2RUKRKOVh33eqxjnkiBxj1m4R5XiVsTG2Lsutngo+YbgTB7EBwgLoE96zrj28aQ F9K5C+ZcX9g50dpf4vyDgnVkzb74IhIupGP8ZS5xarbKpcZBBHjCmkoSHLpygu5WWtWS nU9eO2aDBax+lSwcKBszgiIY/3R1d7C4F5SZqO+5m193gBhO5gWeCh8u1CleK8ZgwI9u j7zc+lFJguNAaFgZC80vBHhYB8AKCOlYXV1YVUVLICyS7Te54D4cJ4ry5EUJNeH/YIbH n6we3SCgWUmS2GIWQOQ+ijgBbA2RSM0lB5U6iyUTEnqSzU6Dp1WW7KiMttax43fEuTWy PtAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fhznFiZ4DXOyyQJkQhZKKsgkcFXUowb7pCXLQasEuQM=; fh=VLmoI/6EX8QpenFjusv8qhWaEfIPciazAbyYTbMJFJo=; b=Qswp9ojLwsYLJX+SsET15od7pyRrkOnf801wFpsgNLh/HGhb0i7cU5OlDWgn5Ts1gn I1zvdw4kVAxc2PD1amVWpLohH09LXcdzmWboifYBnowefeV/OcEpPcFweItD/JQQ1OdA Q7NHNaDiUmItVh/4VKOQpJisqs+blrc9IUcLP1JqSnnFnvBjLZSL7YJIAzKUZmt7P/gA kgmZVI0dv+VjhmeWwWyfHVOjvVUGQ+fq5MVXf7BfEnrPEjoIs55ox4cfkc7bDI5mMy15 DBHGaFs2wTH/iyfIl7010TMicOYt+GcaG9LSwd59PKuk3nAJPFiXrzG5MhoPUV/wZjjt k49w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cq4D0JnV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-49452479ff9si138728581cf.161.2025.05.14.16.42.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 16:42:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cq4D0JnV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFLj6-0001b3-UH; Wed, 14 May 2025 19:41:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFLj3-0001UP-Hp for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:25 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFLj1-00034B-PU for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:25 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-b061a06f127so155779a12.2 for ; Wed, 14 May 2025 16:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747266082; x=1747870882; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fhznFiZ4DXOyyQJkQhZKKsgkcFXUowb7pCXLQasEuQM=; b=cq4D0JnVKyRtZ4vaaOe4X9xOQyCVjy4bXGBxSV5rmSC2juf6LRf8Z9hxveXtDHUQO0 cjgsd3nZJHoombGJXLPZBdQIR01yakw1Z2G3NEEh4+K+mopoCUCoJwlW4lFHR1KF+QT7 u1p8ioKt63ijjnAi32k2sZuCwZ8lfxihQERtpRzSUouAgajLD+7AnltJ+6V12Xlzz5QG 597zb0WrGN6bOTd/hK4AJ6PkvagrIB6akwRct4MpqIui8uvg/sjl2NPA20smdCOk/dpp pPycFai4F8WR290UJMPQn0obPxML2FGkMPgEOu3xqt/hV8gT5aUtNYKaEyya+QXR6poJ xv0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747266082; x=1747870882; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fhznFiZ4DXOyyQJkQhZKKsgkcFXUowb7pCXLQasEuQM=; b=eUiFiVjlbRFVegg79svQcQKuoQUnJOjeoSgtOsoa87LnCbtkuByx8Hw6RtIzjSJWVo r+ts0nWbx/v/oY+7Ytgl22BOW+/JeyJhuF7c0vYYW9TuXgLqhG//Rg8rAAYYBciuswPu 1RxkgZkr4d9ADZHrsFFD3nKd6HeEPWQYgLTwIwcRQHagAdDRbC3mTKf41O0NZ7J2V8Xx kdU6e9JZoFCRrK0UT5zRSUq6Ft+GXBX9GQ6K5Xq/DqjWOzPwBqTdHKSxDNZjp9ILFsZa u2LJlUDjq6H+t6izNvu4Hv/YehHdJPecb5630FsFWkvKwqtnBRaZgZpBkfxgrc0NVtU8 XQeA== X-Gm-Message-State: AOJu0Yy/hhx9Fe3WJhICxxlLPAu8TKepyxv/nHajaUZt8OGUuLKkltpm WrUiRaKP0qnnx/bLxgZGGabSIq6P7X7SzrxiQGd6KY7iPqyAL6gz093FAyjLBZs7u4yCbbJlt0J YM54= X-Gm-Gg: ASbGncseJMLDhfL5UH5M0jyYgXNfnxF7fYQqdldZN4vXn56CMe2XQ2Z6b9rB5e86uS3 6mPbzQBPQuADAs8i3n4xm8db4XqXo+cerqiSwHmbH+I51hJzA3b6rlKFBAsLotnsZS6F42m5Y6A BWp/ISkEeOh+Tp+j6JGtn/LesAF0D5RMdOIAjQ/9MLN1iw7MzL9F+7QIDUABYQs6wZ2mZVggljH SpTNuDZAovILjCc1B6ep6NCi7u+iinUvShdfsn1qXgvV3C7oj2U6xlrQVx0uZhuE34oNppbMM6e K9EeTwvjJroxWyTHZW6XIeetwHnm1J1jn6spmE2rrSCj8m59awk= X-Received: by 2002:a17:903:f86:b0:224:11fc:40c0 with SMTP id d9443c01a7336-231980cbea5mr76350485ad.11.1747266082331; Wed, 14 May 2025 16:41:22 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc828b4e4sm104583615ad.182.2025.05.14.16.41.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 16:41:21 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Michael Roth , alex.bennee@linaro.org, Paolo Bonzini , Thomas Huth , berrange@redhat.com, Richard Henderson , peter.maydell@linaro.org, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 07/12] qapi: remove the misc-target.json file Date: Wed, 14 May 2025 16:41:03 -0700 Message-ID: <20250514234108.3746675-8-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> References: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x530.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé This file is now empty and can thus be removed. Observe the pre-existing bug with s390-skeys.c and target/i386/monitor.c both including qapi-commands-misc-target.h despite not requiring it. Signed-off-by: Daniel P. Berrangé Signed-off-by: Pierrick Bouvier --- qapi/misc-target.json | 3 --- qapi/qapi-schema.json | 1 - hw/s390x/s390-skeys.c | 1 - target/i386/monitor.c | 1 - qapi/meson.build | 1 - 5 files changed, 7 deletions(-) delete mode 100644 qapi/misc-target.json diff --git a/qapi/misc-target.json b/qapi/misc-target.json deleted file mode 100644 index c9ea1ab23e7..00000000000 --- a/qapi/misc-target.json +++ /dev/null @@ -1,3 +0,0 @@ -# -*- Mode: Python -*- -# vim: filetype=python -# diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json index e96bff8d38c..d8eb79cfda6 100644 --- a/qapi/qapi-schema.json +++ b/qapi/qapi-schema.json @@ -63,7 +63,6 @@ { 'include': 'misc.json' } { 'include': 'misc-arm.json' } { 'include': 'misc-i386.json' } -{ 'include': 'misc-target.json' } { 'include': 'audio.json' } { 'include': 'acpi.json' } { 'include': 'pci.json' } diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index aedb62b2d31..8eeecfd58fc 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -17,7 +17,6 @@ #include "hw/s390x/storage-keys.h" #include "qapi/error.h" #include "qapi/qapi-commands-machine.h" -#include "qapi/qapi-commands-misc-target.h" #include "qobject/qdict.h" #include "qemu/error-report.h" #include "system/memory_mapping.h" diff --git a/target/i386/monitor.c b/target/i386/monitor.c index 3ea92b066e1..3c9b6ca62f2 100644 --- a/target/i386/monitor.c +++ b/target/i386/monitor.c @@ -29,7 +29,6 @@ #include "monitor/hmp.h" #include "qobject/qdict.h" #include "qapi/error.h" -#include "qapi/qapi-commands-misc-target.h" #include "qapi/qapi-commands-misc.h" /* Perform linear address sign extension */ diff --git a/qapi/meson.build b/qapi/meson.build index 5e93e6b8cfd..ffe44f9e0b8 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -42,7 +42,6 @@ qapi_all_modules = [ 'machine-target', 'migration', 'misc', - 'misc-target', 'net', 'pragma', 'qom', From patchwork Wed May 14 23:41:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 889893 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2875846wrr; Wed, 14 May 2025 16:42:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVeNWc45pPaC0AaKjX5B1EuNPkl7E2vpOPiGVhH6Z9/t4sYcGdxv5g1XmmR9q3/fUwBhi4h0A==@linaro.org X-Google-Smtp-Source: AGHT+IHdy0bGULp8nHxvOodwMvBnW0iUFDMQwpDzlvRdOhQrPtFBGog9Wbfv7fdKwf/Ns3cmkweu X-Received: by 2002:a05:6214:4111:b0:6f5:748e:c6f4 with SMTP id 6a1803df08f44-6f896ec0fd5mr90466176d6.37.1747266174487; Wed, 14 May 2025 16:42:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747266174; cv=none; d=google.com; s=arc-20240605; b=LVtswLv2xItHt+/AcW31fPoiAlOj1QJgL84f0gnuKFBtSAU6TyRqAoqx/J6CMjgs0h yegTIuG/fELBU1dYJEnaxuYuvgUGDMpHT9TA0LdwAeHKPPaE1RCgxZvH3SwjxyXOoUh7 oGLcUlFu3sGMVWwKchejPBkUMoxSaaegBUU8tBN7svcIhdRhzKXgxn4btjQAZQbRXb8T VODESY4Zi+q1bB3yZgkiWse3TIXldQAACdkNTuG5nktUMv3PexplHP2tE8gYMDOtgnO9 znbozirry0CkyYq/7Cgnwzz88A51C+BclYaSourVkKNNo4nGNg8p+FMYO4po57iyBOLT 6w0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Q3uOJ9bGmUfZ/+MJDYCtssXzNui1of7VtUuGRTJFrsY=; fh=VLmoI/6EX8QpenFjusv8qhWaEfIPciazAbyYTbMJFJo=; b=N15i6cpnCHl0NxxZQ3SSE/zARPElk5TaMV4KnHvFhTuRPFUfF7pUIqSI5dVL8WVrq1 hf/svqPTA77pEvV8unCp/vTg4gl5y3fLnspx3/gwGKtXnaJjyjsZTYJiARiqY/ld5cxi KTQGrLF4O7kXZF06hWN5NRR1nJZ5cGGtmr+f72ZRyHC8S5Ugv7Par1cytgs017bHqWhY t3hM+RV4UqSuRrdn8b0GbHE3ehiZMPHUj9SeL2Ic/Un2RqLsqnM3av0bpbD+cTQ66DVo 3OOxCnGXcU7Fa+UPHalaHiDfDUPyXISGUPdtav50gPdHozcB6f3uL7skdnbsc1GdWmV2 0Wzw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="FZTIIry/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-49452580f46si135892911cf.417.2025.05.14.16.42.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 16:42:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="FZTIIry/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFLj6-0001ZW-Te; Wed, 14 May 2025 19:41:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFLj4-0001VB-If for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:26 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFLj2-00034j-VG for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:26 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-22d95f0dda4so4136795ad.2 for ; Wed, 14 May 2025 16:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747266083; x=1747870883; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q3uOJ9bGmUfZ/+MJDYCtssXzNui1of7VtUuGRTJFrsY=; b=FZTIIry/cNKp1mDve0fuU7+1M1UJlAwnbGSSaDNdNSUgwSyFUXU3bXGW+8NIveuZ2X +/foBqeoUhf4SLq2M3dJxB52hA7X4supCgTkOW8N/u6fswjTFyH1eesWJyX7UwFb/6Q+ YHelknCNNoLT9SfLPxCKlORb8TcpVkr8s3YVvhR0XPKFPY5gpMcUgcF6r+h7rpQZtJip LnEJxW1+RML1GQVUdFS/qx/bHLtNkF/4S9B1194FwHlxqn6c0eEyzC4gR+jYrpgGn+8H fcA/5VFgyvKyzwsgoVKtmKBm3SJ5qAAMb6N8h6nb27ONlWEdg4ossevhlsTDADAr6pbq Jj/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747266083; x=1747870883; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q3uOJ9bGmUfZ/+MJDYCtssXzNui1of7VtUuGRTJFrsY=; b=uCfuLTdpQmYDfT1V1E8FQS7ejVxahDrfBrzuCc25JWMfEED1VXE9+6HNQfVMEsEafj YNIVQglvMJTIpRlnb12AlsnkXmJQCHqeVqouuI4vb7VMEEO5tXl07dWVmkUNpynSDoXZ lhw1UBN6MzOEUMP2LEVAgVdh0/4Sa84s59g01O3w+yFhKvQYgQBh7vkbcWe8StsdpDDD zfAsXaU/cQQREv8IHiP1gyypV8efhpFDLrlPQJsPEJq8a6IMYKCxEIZ0NoKnuoKgKJT6 MdU9sPD2vJQoj2605MrB7cWx2kS5GxQQTEoIG1Iw5T0gi+P0QuDN7ypAHNFR3Lhfk0SB 7bOQ== X-Gm-Message-State: AOJu0Yxn8+o/sQyt/qXV3gmErclS01pHJ2BrsAVR4WV5r5TAmQk7zP7z 35TVAaRbHkEW4gJwzCoHdExrE+TYFSt3i27reifv9c/y58puzrbYOH8j8vBBaFJEF/X3Cp2rSHD jyAA= X-Gm-Gg: ASbGncvfBPM/+sfHU/B/qpPMt7dwKaHpuduFneCMzJ39QSVYp9aih8l3kt/4IxeLML3 qDhRYXaVJxOMf6NHfYjbZ5K1ffSj7infhRHkc9B5TRbNgOV4cscngc4O4B62Isqf9r0BYUvB0fI fIqwt+w3IyYGzXRG+mqtBULsCqhvkNkg8GzoPfThMFv+HmcNCb/ff6FKLLCnzhZE4ZMc7Yf4RIQ yYZuab2oQUE0W6S4cECuJuo035y0Jy6FSY9cZ/IAHDLc/iS8n5n6U+kLOBZw3iAstDywGQOOJCa 1GuTmGJrya7hLYKjWA7324yGtY73Xv4OIz2KU2Aro6Y7cjTtyBE= X-Received: by 2002:a17:903:1aef:b0:220:c164:6ee1 with SMTP id d9443c01a7336-23198129cd1mr89640135ad.32.1747266083245; Wed, 14 May 2025 16:41:23 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc828b4e4sm104583615ad.182.2025.05.14.16.41.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 16:41:22 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Michael Roth , alex.bennee@linaro.org, Paolo Bonzini , Thomas Huth , berrange@redhat.com, Richard Henderson , peter.maydell@linaro.org, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 08/12] qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic Date: Wed, 14 May 2025 16:41:04 -0700 Message-ID: <20250514234108.3746675-9-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> References: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé We'd like to have some unified QAPI schema. Having a structure field conditional to a target being built in is not very practical. While @deprecated-props is only used by s390x target, it is generic enough and could be used by other targets (assuming we expand CpuModelExpansionType enum values). Let's always include this field, regardless of the target, but make it optional. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier --- qapi/machine-target.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qapi/machine-target.json b/qapi/machine-target.json index 426ce4ee82d..e153291a7fc 100644 --- a/qapi/machine-target.json +++ b/qapi/machine-target.json @@ -244,19 +244,18 @@ # # @model: the expanded CpuModelInfo. # -# @deprecated-props: a list of properties that are flagged as +# @deprecated-props: an optional list of properties that are flagged as # deprecated by the CPU vendor. The list depends on the # CpuModelExpansionType: "static" properties are a subset of the # enabled-properties for the expanded model; "full" properties are # a set of properties that are deprecated across all models for -# the architecture. (since: 9.1). +# the architecture. (since: 10.1 -- since 9.1 on s390x --). # # Since: 2.8 ## { 'struct': 'CpuModelExpansionInfo', 'data': { 'model': 'CpuModelInfo', - 'deprecated-props' : { 'type': ['str'], - 'if': 'TARGET_S390X' } }, + '*deprecated-props' : { 'type': ['str'] } }, 'if': { 'any': [ 'TARGET_S390X', 'TARGET_I386', 'TARGET_ARM', From patchwork Wed May 14 23:41:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 889897 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2875985wrr; Wed, 14 May 2025 16:43:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXsShVfkMgYhk7t6TcXQNxHw/2ztBTeBciWmhe3XM/IUSU6s/h0b2Ls753htyqS7/5muORUnw==@linaro.org X-Google-Smtp-Source: AGHT+IFEo4zLQY/7lLcjz7kKrLZ5PyErRgXW2lUHlOfy7vktIG3MhToA3AnKHdzcFg90+dwbhX6g X-Received: by 2002:a05:620a:1985:b0:7c8:c9c:2a8a with SMTP id af79cd13be357-7cd288636ebmr1005778485a.49.1747266207722; Wed, 14 May 2025 16:43:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747266207; cv=none; d=google.com; s=arc-20240605; b=CoA9A/bdLV5RobwB1ZqJnuXG420bB1zbjixVhKCS772T2+MQutoUFanr/4Urj83LZX SmhZB0hcgEsqXiSyMo8VXnKMHjHu0TaCHk2nH0HTLETma8+01OC6TkWjfQOeCFsiG/9m tYc2TLqIkN0WSFZ0CP+KkFIHhbC/l2iwxbkJy/rAaR/ulHNCLelbbMvkBZIvUp6z9WY8 1ta+2Yem5r5349DfEyBVoq7SctiqizWyleYQascbggulxx45uieprGHQm00ADfZPzQXN +KbU7K5yk/oWHSEejmts7W4RqHN+g2TKbRBtgk9KiLdgTJ+RjzpC3v4jXwBdcfhWSuGN m60w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yq0KfBTQ/+7HA6vo+a+xT9TC7NDbqrVj3Umzqpxzass=; fh=VLmoI/6EX8QpenFjusv8qhWaEfIPciazAbyYTbMJFJo=; b=Ez+Zx1+tg7q2GBvEiuiwUy3gAoUacC+3UlQHXkRQvL4fVUQXJg1MTxanJTw30/fJL5 8q7xJvSFblyKfqO79mSgqZ8NZuPmlD5e7c1OTPP7I0AlsIF5kOdbzUE6lJMuc66MLSfq QDJJLTaFnMv1YDutCxMFvkidbshuM3v9CqcsbtNuolFm8R/yYBwRAbfYSyB8EPpm2/Jt 32JvW3fUj1agzY3j18ZC6Akf08/netCJjJfgFxAfuoMr5fFhnhUyvtaubsyGu1JRmm3b c9mtys8JGKjDvA2CmEq73jgyjtsgNYW5vsfBVGMh9k2xOVcu/0aXvbCji1ySbLLSPmD/ PmYg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QofaSmMe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cd00fd4b69si1436908085a.262.2025.05.14.16.43.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 16:43:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QofaSmMe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFLjC-0001pp-Gz; Wed, 14 May 2025 19:41:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFLj8-0001iD-Oz for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:30 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFLj4-000354-Cn for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:30 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-2317d94c9cdso3378735ad.2 for ; Wed, 14 May 2025 16:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747266085; x=1747870885; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yq0KfBTQ/+7HA6vo+a+xT9TC7NDbqrVj3Umzqpxzass=; b=QofaSmMeZFlrkyHDzHpPV4aygLdoK3xp5yh8Z4IBXVyA2LNsOfaoSp7KsOoRwfLYSZ TJ5Z6d/Vaa4qqoCURTlnvZpF5DmVRcXqK2uz/6bMBFUZLp2fPyt2+UX/jvIG0nFGzyqW ac8PbB5kLURqAZNvcG+mpJW/YdNshVQzI5qOpNVYhIrKajIVeKzsDvff3LOYdQ+loVLL w1Q4vbwNjUyTC/hZokhXIEbn5P7Jo88BljImQs8moB2GoEjY6pAFua7DTZ/ZRmq/7xqy xCBxr2h9bwMuR1Hi36BmL27BCV6l5dLXIopF0o/WzzfvzDnll4xvu0SXrr+jBxdK0R0b s+1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747266085; x=1747870885; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yq0KfBTQ/+7HA6vo+a+xT9TC7NDbqrVj3Umzqpxzass=; b=FdqEeeavAZOFF2ZH3R6U1sGtdDvwTdhX3ob/dYfvov+pA82xZVuoogiBoPg5cwx0A/ L2ycvpeGwtMzrqkiv5Ko69UGl1bS/PNdjGVRI4MLAJajMO/xeuJozJ5tUS1U0cxQdbBh e0+gn9seMFiT69bxm1wUAUFsnIAkhdIi2irMYRoIzzd6Kv5jBZ2v+k0/tM9EMAfMGVpu cTK4OTJs8refF4wCgMSkM4GHYOGZmg5TqTACjf8jJFO1zUQUeVmwKGIQmSxqUhoL+Zln BNrDLN16vLd3KLVfaw4o5AgZriw+3kvm8ep5I2hxFT/pjMKaTE6NbkFSjyln5AC+gdfF lo7A== X-Gm-Message-State: AOJu0YzmlkiIViE5WT/gFOZHp8cV5W78Fhek6lx5DhpqOX3DCRAh8FPQ h9tf3lIa0Gf3JOqR3InqdahO936S9QGtBuqiEaOcPAKAmOZWmrPbcq/eUV2qG8EXBtI+7oPALcn 8VB8= X-Gm-Gg: ASbGncvlUUfgFvh/fvv7GPiK8+ppVvvvpioNkTPNJXDHytf3zquXcrECIdbZDzlMq30 ofZFdm5JEBEgfYptUYCiETZ+vdLK3QfyJe7zSVkTgpM7zQ+bCiimkysXm2fc4vxQzXPdChlNIXU NRfM4ES6pWQX5iy3SNSD0orJ47k93dALbDtpNdHjASxIx9ym6FffXbSpz0nm1O49qBR8tJNYpbi hAt8mTilQ3XlakBYRg119mii94+8BFgGaQrIdSCuY+RBFcsIfgELQIahluRPEj3ywy/OjYy0jj7 UDDwMb8puY6HBoiGsQ+RsbAnqmptJ4LEEZAZ2Ifk0Ak0sPGpI58= X-Received: by 2002:a17:903:3a90:b0:223:f408:c3cf with SMTP id d9443c01a7336-231980fdaeamr81406445ad.21.1747266084266; Wed, 14 May 2025 16:41:24 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc828b4e4sm104583615ad.182.2025.05.14.16.41.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 16:41:23 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Michael Roth , alex.bennee@linaro.org, Paolo Bonzini , Thomas Huth , berrange@redhat.com, Richard Henderson , peter.maydell@linaro.org, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 09/12] qapi: make most CPU commands unconditionally available Date: Wed, 14 May 2025 16:41:05 -0700 Message-ID: <20250514234108.3746675-10-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> References: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé This removes the TARGET_* conditions from all the CPU commands that are conceptually target independent. Top level stubs are provided to cope with targets which do not currently implement all of the commands. Signed-off-by: Daniel P. Berrangé Signed-off-by: Pierrick Bouvier --- MAINTAINERS | 1 - qapi/machine-target.json | 522 -------------------------- qapi/machine.json | 363 ++++++++++++++++++ stubs/monitor-cpu-s390x.c | 23 ++ stubs/monitor-cpu.c | 21 ++ target/arm/arm-qmp-cmds.c | 2 +- target/i386/cpu-system.c | 2 +- target/i386/cpu.c | 2 +- target/loongarch/loongarch-qmp-cmds.c | 2 +- target/mips/system/mips-qmp-cmds.c | 12 +- target/ppc/ppc-qmp-cmds.c | 12 +- target/riscv/riscv-qmp-cmds.c | 2 +- target/s390x/cpu_models_system.c | 2 +- stubs/meson.build | 2 + 14 files changed, 437 insertions(+), 531 deletions(-) delete mode 100644 qapi/machine-target.json create mode 100644 stubs/monitor-cpu-s390x.c create mode 100644 stubs/monitor-cpu.c diff --git a/MAINTAINERS b/MAINTAINERS index 476dcb46683..c2a6e6d1c1c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1927,7 +1927,6 @@ F: hw/core/numa.c F: hw/cpu/cluster.c F: qapi/machine.json F: qapi/machine-common.json -F: qapi/machine-target.json F: include/hw/boards.h F: include/hw/core/cpu.h F: include/hw/cpu/cluster.h diff --git a/qapi/machine-target.json b/qapi/machine-target.json deleted file mode 100644 index e153291a7fc..00000000000 --- a/qapi/machine-target.json +++ /dev/null @@ -1,522 +0,0 @@ -# -*- Mode: Python -*- -# vim: filetype=python -# -# This work is licensed under the terms of the GNU GPL, version 2 or later. -# See the COPYING file in the top-level directory. - -{ 'include': 'machine-common.json' } - -## -# @CpuModelInfo: -# -# Virtual CPU model. -# -# A CPU model consists of the name of a CPU definition, to which delta -# changes are applied (e.g. features added/removed). Most magic -# values that an architecture might require should be hidden behind -# the name. However, if required, architectures can expose relevant -# properties. -# -# @name: the name of the CPU definition the model is based on -# -# @props: a dictionary of QOM properties to be applied -# -# Since: 2.8 -## -{ 'struct': 'CpuModelInfo', - 'data': { 'name': 'str', - '*props': 'any' } } - -## -# @CpuModelExpansionType: -# -# An enumeration of CPU model expansion types. -# -# @static: Expand to a static CPU model, a combination of a static -# base model name and property delta changes. As the static base -# model will never change, the expanded CPU model will be the -# same, independent of QEMU version, machine type, machine -# options, and accelerator options. Therefore, the resulting -# model can be used by tooling without having to specify a -# compatibility machine - e.g. when displaying the "host" model. -# The @static CPU models are migration-safe. -# -# @full: Expand all properties. The produced model is not guaranteed -# to be migration-safe, but allows tooling to get an insight and -# work with model details. -# -# .. note:: When a non-migration-safe CPU model is expanded in static -# mode, some features enabled by the CPU model may be omitted, -# because they can't be implemented by a static CPU model -# definition (e.g. cache info passthrough and PMU passthrough in -# x86). If you need an accurate representation of the features -# enabled by a non-migration-safe CPU model, use @full. If you -# need a static representation that will keep ABI compatibility -# even when changing QEMU version or machine-type, use @static (but -# keep in mind that some features may be omitted). -# -# Since: 2.8 -## -{ 'enum': 'CpuModelExpansionType', - 'data': [ 'static', 'full' ] } - -## -# @CpuModelCompareResult: -# -# An enumeration of CPU model comparison results. The result is -# usually calculated using e.g. CPU features or CPU generations. -# -# @incompatible: If model A is incompatible to model B, model A is not -# guaranteed to run where model B runs and the other way around. -# -# @identical: If model A is identical to model B, model A is -# guaranteed to run where model B runs and the other way around. -# -# @superset: If model A is a superset of model B, model B is -# guaranteed to run where model A runs. There are no guarantees -# about the other way. -# -# @subset: If model A is a subset of model B, model A is guaranteed to -# run where model B runs. There are no guarantees about the other -# way. -# -# Since: 2.8 -## -{ 'enum': 'CpuModelCompareResult', - 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] } - -## -# @CpuModelBaselineInfo: -# -# The result of a CPU model baseline. -# -# @model: the baselined CpuModelInfo. -# -# Since: 2.8 -## -{ 'struct': 'CpuModelBaselineInfo', - 'data': { 'model': 'CpuModelInfo' }, - 'if': 'TARGET_S390X' } - -## -# @CpuModelCompareInfo: -# -# The result of a CPU model comparison. -# -# @result: The result of the compare operation. -# -# @responsible-properties: List of properties that led to the -# comparison result not being identical. -# -# @responsible-properties is a list of QOM property names that led to -# both CPUs not being detected as identical. For identical models, -# this list is empty. If a QOM property is read-only, that means -# there's no known way to make the CPU models identical. If the -# special property name "type" is included, the models are by -# definition not identical and cannot be made identical. -# -# Since: 2.8 -## -{ 'struct': 'CpuModelCompareInfo', - 'data': { 'result': 'CpuModelCompareResult', - 'responsible-properties': ['str'] }, - 'if': 'TARGET_S390X' } - -## -# @query-cpu-model-comparison: -# -# Compares two CPU models, @modela and @modelb, returning how they -# compare in a specific configuration. The results indicates how -# both models compare regarding runnability. This result can be -# used by tooling to make decisions if a certain CPU model will -# run in a certain configuration or if a compatible CPU model has -# to be created by baselining. -# -# Usually, a CPU model is compared against the maximum possible CPU -# model of a certain configuration (e.g. the "host" model for KVM). -# If that CPU model is identical or a subset, it will run in that -# configuration. -# -# The result returned by this command may be affected by: -# -# * QEMU version: CPU models may look different depending on the QEMU -# version. (Except for CPU models reported as "static" in -# query-cpu-definitions.) -# * machine-type: CPU model may look different depending on the -# machine-type. (Except for CPU models reported as "static" in -# query-cpu-definitions.) -# * machine options (including accelerator): in some architectures, -# CPU models may look different depending on machine and accelerator -# options. (Except for CPU models reported as "static" in -# query-cpu-definitions.) -# * "-cpu" arguments and global properties: arguments to the -cpu -# option and global properties may affect expansion of CPU models. -# Using query-cpu-model-expansion while using these is not advised. -# -# Some architectures may not support comparing CPU models. s390x -# supports comparing CPU models. -# -# @modela: description of the first CPU model to compare, referred to -# as "model A" in CpuModelCompareResult -# -# @modelb: description of the second CPU model to compare, referred to -# as "model B" in CpuModelCompareResult -# -# Returns: a CpuModelCompareInfo describing how both CPU models -# compare -# -# Errors: -# - if comparing CPU models is not supported -# - if a model cannot be used -# - if a model contains an unknown cpu definition name, unknown -# properties or properties with wrong types. -# -# .. note:: This command isn't specific to s390x, but is only -# implemented on this architecture currently. -# -# Since: 2.8 -## -{ 'command': 'query-cpu-model-comparison', - 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' }, - 'returns': 'CpuModelCompareInfo', - 'if': 'TARGET_S390X' } - -## -# @query-cpu-model-baseline: -# -# Baseline two CPU models, @modela and @modelb, creating a compatible -# third model. The created model will always be a static, -# migration-safe CPU model (see "static" CPU model expansion for -# details). -# -# This interface can be used by tooling to create a compatible CPU -# model out two CPU models. The created CPU model will be identical -# to or a subset of both CPU models when comparing them. Therefore, -# the created CPU model is guaranteed to run where the given CPU -# models run. -# -# The result returned by this command may be affected by: -# -# * QEMU version: CPU models may look different depending on the QEMU -# version. (Except for CPU models reported as "static" in -# query-cpu-definitions.) -# * machine-type: CPU model may look different depending on the -# machine-type. (Except for CPU models reported as "static" in -# query-cpu-definitions.) -# * machine options (including accelerator): in some architectures, -# CPU models may look different depending on machine and accelerator -# options. (Except for CPU models reported as "static" in -# query-cpu-definitions.) -# * "-cpu" arguments and global properties: arguments to the -cpu -# option and global properties may affect expansion of CPU models. -# Using query-cpu-model-expansion while using these is not advised. -# -# Some architectures may not support baselining CPU models. s390x -# supports baselining CPU models. -# -# @modela: description of the first CPU model to baseline -# -# @modelb: description of the second CPU model to baseline -# -# Returns: a CpuModelBaselineInfo describing the baselined CPU model -# -# Errors: -# - if baselining CPU models is not supported -# - if a model cannot be used -# - if a model contains an unknown cpu definition name, unknown -# properties or properties with wrong types. -# -# .. note:: This command isn't specific to s390x, but is only -# implemented on this architecture currently. -# -# Since: 2.8 -## -{ 'command': 'query-cpu-model-baseline', - 'data': { 'modela': 'CpuModelInfo', - 'modelb': 'CpuModelInfo' }, - 'returns': 'CpuModelBaselineInfo', - 'if': 'TARGET_S390X' } - -## -# @CpuModelExpansionInfo: -# -# The result of a cpu model expansion. -# -# @model: the expanded CpuModelInfo. -# -# @deprecated-props: an optional list of properties that are flagged as -# deprecated by the CPU vendor. The list depends on the -# CpuModelExpansionType: "static" properties are a subset of the -# enabled-properties for the expanded model; "full" properties are -# a set of properties that are deprecated across all models for -# the architecture. (since: 10.1 -- since 9.1 on s390x --). -# -# Since: 2.8 -## -{ 'struct': 'CpuModelExpansionInfo', - 'data': { 'model': 'CpuModelInfo', - '*deprecated-props' : { 'type': ['str'] } }, - 'if': { 'any': [ 'TARGET_S390X', - 'TARGET_I386', - 'TARGET_ARM', - 'TARGET_LOONGARCH64', - 'TARGET_RISCV' ] } } - -## -# @query-cpu-model-expansion: -# -# Expands a given CPU model, @model, (or a combination of CPU model + -# additional options) to different granularities, specified by @type, -# allowing tooling to get an understanding what a specific CPU model -# looks like in QEMU under a certain configuration. -# -# This interface can be used to query the "host" CPU model. -# -# The data returned by this command may be affected by: -# -# * QEMU version: CPU models may look different depending on the QEMU -# version. (Except for CPU models reported as "static" in -# query-cpu-definitions.) -# * machine-type: CPU model may look different depending on the -# machine-type. (Except for CPU models reported as "static" in -# query-cpu-definitions.) -# * machine options (including accelerator): in some architectures, -# CPU models may look different depending on machine and accelerator -# options. (Except for CPU models reported as "static" in -# query-cpu-definitions.) -# * "-cpu" arguments and global properties: arguments to the -cpu -# option and global properties may affect expansion of CPU models. -# Using query-cpu-model-expansion while using these is not advised. -# -# Some architectures may not support all expansion types. s390x -# supports "full" and "static". Arm only supports "full". -# -# @model: description of the CPU model to expand -# -# @type: expansion type, specifying how to expand the CPU model -# -# Returns: a CpuModelExpansionInfo describing the expanded CPU model -# -# Errors: -# - if expanding CPU models is not supported -# - if the model cannot be expanded -# - if the model contains an unknown CPU definition name, unknown -# properties or properties with a wrong type -# - if an expansion type is not supported -# -# Since: 2.8 -## -{ 'command': 'query-cpu-model-expansion', - 'data': { 'type': 'CpuModelExpansionType', - 'model': 'CpuModelInfo' }, - 'returns': 'CpuModelExpansionInfo', - 'if': { 'any': [ 'TARGET_S390X', - 'TARGET_I386', - 'TARGET_ARM', - 'TARGET_LOONGARCH64', - 'TARGET_RISCV' ] } } - -## -# @CpuDefinitionInfo: -# -# Virtual CPU definition. -# -# @name: the name of the CPU definition -# -# @migration-safe: whether a CPU definition can be safely used for -# migration in combination with a QEMU compatibility machine when -# migrating between different QEMU versions and between hosts with -# different sets of (hardware or software) capabilities. If not -# provided, information is not available and callers should not -# assume the CPU definition to be migration-safe. (since 2.8) -# -# @static: whether a CPU definition is static and will not change -# depending on QEMU version, machine type, machine options and -# accelerator options. A static model is always migration-safe. -# (since 2.8) -# -# @unavailable-features: List of properties that prevent the CPU model -# from running in the current host. (since 2.8) -# -# @typename: Type name that can be used as argument to -# @device-list-properties, to introspect properties configurable -# using -cpu or -global. (since 2.9) -# -# @alias-of: Name of CPU model this model is an alias for. The target -# of the CPU model alias may change depending on the machine type. -# Management software is supposed to translate CPU model aliases -# in the VM configuration, because aliases may stop being -# migration-safe in the future (since 4.1) -# -# @deprecated: If true, this CPU model is deprecated and may be -# removed in some future version of QEMU according to the QEMU -# deprecation policy. (since 5.2) -# -# @unavailable-features is a list of QOM property names that represent -# CPU model attributes that prevent the CPU from running. If the QOM -# property is read-only, that means there's no known way to make the -# CPU model run in the current host. Implementations that choose not -# to provide specific information return the property name "type". If -# the property is read-write, it means that it MAY be possible to run -# the CPU model in the current host if that property is changed. -# Management software can use it as hints to suggest or choose an -# alternative for the user, or just to generate meaningful error -# messages explaining why the CPU model can't be used. If -# @unavailable-features is an empty list, the CPU model is runnable -# using the current host and machine-type. If @unavailable-features -# is not present, runnability information for the CPU is not -# available. -# -# Since: 1.2 -## -{ 'struct': 'CpuDefinitionInfo', - 'data': { 'name': 'str', - '*migration-safe': 'bool', - 'static': 'bool', - '*unavailable-features': [ 'str' ], - 'typename': 'str', - '*alias-of' : 'str', - 'deprecated' : 'bool' }, - 'if': { 'any': [ 'TARGET_PPC', - 'TARGET_ARM', - 'TARGET_I386', - 'TARGET_S390X', - 'TARGET_MIPS', - 'TARGET_LOONGARCH64', - 'TARGET_RISCV' ] } } - -## -# @query-cpu-definitions: -# -# Return a list of supported virtual CPU definitions -# -# Returns: a list of CpuDefinitionInfo -# -# Since: 1.2 -## -{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'], - 'if': { 'any': [ 'TARGET_PPC', - 'TARGET_ARM', - 'TARGET_I386', - 'TARGET_S390X', - 'TARGET_MIPS', - 'TARGET_LOONGARCH64', - 'TARGET_RISCV' ] } } - -## -# @S390CpuPolarization: -# -# An enumeration of CPU polarization that can be assumed by a virtual -# S390 CPU -# -# Since: 8.2 -## -{ 'enum': 'S390CpuPolarization', - 'data': [ 'horizontal', 'vertical' ], - 'if': 'TARGET_S390X' -} - -## -# @set-cpu-topology: -# -# Modify the topology by moving the CPU inside the topology tree, or -# by changing a modifier attribute of a CPU. Absent values will not -# be modified. -# -# @core-id: the vCPU ID to be moved -# -# @socket-id: destination socket to move the vCPU to -# -# @book-id: destination book to move the vCPU to -# -# @drawer-id: destination drawer to move the vCPU to -# -# @entitlement: entitlement to set -# -# @dedicated: whether the provisioning of real to virtual CPU is -# dedicated -# -# Features: -# -# @unstable: This command is experimental. -# -# Since: 8.2 -## -{ 'command': 'set-cpu-topology', - 'data': { - 'core-id': 'uint16', - '*socket-id': 'uint16', - '*book-id': 'uint16', - '*drawer-id': 'uint16', - '*entitlement': 'S390CpuEntitlement', - '*dedicated': 'bool' - }, - 'features': [ 'unstable' ], - 'if': { 'all': [ 'TARGET_S390X' , 'CONFIG_KVM' ] } -} - -## -# @CPU_POLARIZATION_CHANGE: -# -# Emitted when the guest asks to change the polarization. -# -# The guest can tell the host (via the PTF instruction) whether the -# CPUs should be provisioned using horizontal or vertical -# polarization. -# -# On horizontal polarization the host is expected to provision all -# vCPUs equally. -# -# On vertical polarization the host can provision each vCPU -# differently. The guest will get information on the details of the -# provisioning the next time it uses the STSI(15) instruction. -# -# @polarization: polarization specified by the guest -# -# Features: -# -# @unstable: This event is experimental. -# -# Since: 8.2 -# -# .. qmp-example:: -# -# <- { "event": "CPU_POLARIZATION_CHANGE", -# "data": { "polarization": "horizontal" }, -# "timestamp": { "seconds": 1401385907, "microseconds": 422329 } } -## -{ 'event': 'CPU_POLARIZATION_CHANGE', - 'data': { 'polarization': 'S390CpuPolarization' }, - 'features': [ 'unstable' ], - 'if': { 'all': [ 'TARGET_S390X', 'CONFIG_KVM' ] } -} - -## -# @CpuPolarizationInfo: -# -# The result of a CPU polarization query. -# -# @polarization: the CPU polarization -# -# Since: 8.2 -## -{ 'struct': 'CpuPolarizationInfo', - 'data': { 'polarization': 'S390CpuPolarization' }, - 'if': { 'all': [ 'TARGET_S390X', 'CONFIG_KVM' ] } -} - -## -# @query-s390x-cpu-polarization: -# -# Features: -# -# @unstable: This command is experimental. -# -# Returns: the machine's CPU polarization -# -# Since: 8.2 -## -{ 'command': 'query-s390x-cpu-polarization', 'returns': 'CpuPolarizationInfo', - 'features': [ 'unstable' ], - 'if': { 'all': [ 'TARGET_S390X', 'CONFIG_KVM' ] } -} diff --git a/qapi/machine.json b/qapi/machine.json index c8feb9fe17b..a357604e6d1 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1916,3 +1916,366 @@ ## { 'command': 'dump-skeys', 'data': { 'filename': 'str' } } + +## +# @CpuModelInfo: +# +# Virtual CPU model. +# +# A CPU model consists of the name of a CPU definition, to which delta +# changes are applied (e.g. features added/removed). Most magic +# values that an architecture might require should be hidden behind +# the name. However, if required, architectures can expose relevant +# properties. +# +# @name: the name of the CPU definition the model is based on +# +# @props: a dictionary of QOM properties to be applied +# +# Since: 2.8 +## +{ 'struct': 'CpuModelInfo', + 'data': { 'name': 'str', + '*props': 'any' } } + +## +# @CpuModelExpansionType: +# +# An enumeration of CPU model expansion types. +# +# @static: Expand to a static CPU model, a combination of a static +# base model name and property delta changes. As the static base +# model will never change, the expanded CPU model will be the +# same, independent of QEMU version, machine type, machine +# options, and accelerator options. Therefore, the resulting +# model can be used by tooling without having to specify a +# compatibility machine - e.g. when displaying the "host" model. +# The @static CPU models are migration-safe. +# +# @full: Expand all properties. The produced model is not guaranteed +# to be migration-safe, but allows tooling to get an insight and +# work with model details. +# +# .. note:: When a non-migration-safe CPU model is expanded in static +# mode, some features enabled by the CPU model may be omitted, +# because they can't be implemented by a static CPU model +# definition (e.g. cache info passthrough and PMU passthrough in +# x86). If you need an accurate representation of the features +# enabled by a non-migration-safe CPU model, use @full. If you +# need a static representation that will keep ABI compatibility +# even when changing QEMU version or machine-type, use @static (but +# keep in mind that some features may be omitted). +# +# Since: 2.8 +## +{ 'enum': 'CpuModelExpansionType', + 'data': [ 'static', 'full' ] } + +## +# @CpuModelCompareResult: +# +# An enumeration of CPU model comparison results. The result is +# usually calculated using e.g. CPU features or CPU generations. +# +# @incompatible: If model A is incompatible to model B, model A is not +# guaranteed to run where model B runs and the other way around. +# +# @identical: If model A is identical to model B, model A is +# guaranteed to run where model B runs and the other way around. +# +# @superset: If model A is a superset of model B, model B is +# guaranteed to run where model A runs. There are no guarantees +# about the other way. +# +# @subset: If model A is a subset of model B, model A is guaranteed to +# run where model B runs. There are no guarantees about the other +# way. +# +# Since: 2.8 +## +{ 'enum': 'CpuModelCompareResult', + 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] } + +## +# @CpuModelBaselineInfo: +# +# The result of a CPU model baseline. +# +# @model: the baselined CpuModelInfo. +# +# Since: 2.8 +## +{ 'struct': 'CpuModelBaselineInfo', + 'data': { 'model': 'CpuModelInfo' } } + +## +# @CpuModelCompareInfo: +# +# The result of a CPU model comparison. +# +# @result: The result of the compare operation. +# +# @responsible-properties: List of properties that led to the +# comparison result not being identical. +# +# @responsible-properties is a list of QOM property names that led to +# both CPUs not being detected as identical. For identical models, +# this list is empty. If a QOM property is read-only, that means +# there's no known way to make the CPU models identical. If the +# special property name "type" is included, the models are by +# definition not identical and cannot be made identical. +# +# Since: 2.8 +## +{ 'struct': 'CpuModelCompareInfo', + 'data': { 'result': 'CpuModelCompareResult', + 'responsible-properties': ['str'] } } + +## +# @query-cpu-model-comparison: +# +# Compares two CPU models, @modela and @modelb, returning how they +# compare in a specific configuration. The results indicates how +# both models compare regarding runnability. This result can be +# used by tooling to make decisions if a certain CPU model will +# run in a certain configuration or if a compatible CPU model has +# to be created by baselining. +# +# Usually, a CPU model is compared against the maximum possible CPU +# model of a certain configuration (e.g. the "host" model for KVM). +# If that CPU model is identical or a subset, it will run in that +# configuration. +# +# The result returned by this command may be affected by: +# +# * QEMU version: CPU models may look different depending on the QEMU +# version. (Except for CPU models reported as "static" in +# query-cpu-definitions.) +# * machine-type: CPU model may look different depending on the +# machine-type. (Except for CPU models reported as "static" in +# query-cpu-definitions.) +# * machine options (including accelerator): in some architectures, +# CPU models may look different depending on machine and accelerator +# options. (Except for CPU models reported as "static" in +# query-cpu-definitions.) +# * "-cpu" arguments and global properties: arguments to the -cpu +# option and global properties may affect expansion of CPU models. +# Using query-cpu-model-expansion while using these is not advised. +# +# Some architectures may not support comparing CPU models. s390x +# supports comparing CPU models. +# +# @modela: description of the first CPU model to compare, referred to +# as "model A" in CpuModelCompareResult +# +# @modelb: description of the second CPU model to compare, referred to +# as "model B" in CpuModelCompareResult +# +# Returns: a CpuModelCompareInfo describing how both CPU models +# compare +# +# Errors: +# - if comparing CPU models is not supported by the target +# - if a model cannot be used +# - if a model contains an unknown cpu definition name, unknown +# properties or properties with wrong types. +# +# Since: 2.8 +## +{ 'command': 'query-cpu-model-comparison', + 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' }, + 'returns': 'CpuModelCompareInfo' } + +## +# @query-cpu-model-baseline: +# +# Baseline two CPU models, @modela and @modelb, creating a compatible +# third model. The created model will always be a static, +# migration-safe CPU model (see "static" CPU model expansion for +# details). +# +# This interface can be used by tooling to create a compatible CPU +# model out two CPU models. The created CPU model will be identical +# to or a subset of both CPU models when comparing them. Therefore, +# the created CPU model is guaranteed to run where the given CPU +# models run. +# +# The result returned by this command may be affected by: +# +# * QEMU version: CPU models may look different depending on the QEMU +# version. (Except for CPU models reported as "static" in +# query-cpu-definitions.) +# * machine-type: CPU model may look different depending on the +# machine-type. (Except for CPU models reported as "static" in +# query-cpu-definitions.) +# * machine options (including accelerator): in some architectures, +# CPU models may look different depending on machine and accelerator +# options. (Except for CPU models reported as "static" in +# query-cpu-definitions.) +# * "-cpu" arguments and global properties: arguments to the -cpu +# option and global properties may affect expansion of CPU models. +# Using query-cpu-model-expansion while using these is not advised. +# +# Some architectures may not support baselining CPU models. s390x +# supports baselining CPU models. +# +# @modela: description of the first CPU model to baseline +# +# @modelb: description of the second CPU model to baseline +# +# Returns: a CpuModelBaselineInfo describing the baselined CPU model +# +# Errors: +# - if baselining CPU models is not supported by the target +# - if a model cannot be used +# - if a model contains an unknown cpu definition name, unknown +# properties or properties with wrong types. +# +# Since: 2.8 +## +{ 'command': 'query-cpu-model-baseline', + 'data': { 'modela': 'CpuModelInfo', + 'modelb': 'CpuModelInfo' }, + 'returns': 'CpuModelBaselineInfo' } + +## +# @CpuModelExpansionInfo: +# +# The result of a cpu model expansion. +# +# @model: the expanded CpuModelInfo. +# +# @deprecated-props: an optional list of properties that are flagged as +# deprecated by the CPU vendor. The list depends on the +# CpuModelExpansionType: "static" properties are a subset of the +# enabled-properties for the expanded model; "full" properties are +# a set of properties that are deprecated across all models for +# the architecture. (since: 10.1 -- since 9.1 on s390x --). +# +# Since: 2.8 +## +{ 'struct': 'CpuModelExpansionInfo', + 'data': { 'model': 'CpuModelInfo', + '*deprecated-props' : { 'type': ['str'] } } } + +## +# @query-cpu-model-expansion: +# +# Expands a given CPU model, @model, (or a combination of CPU model + +# additional options) to different granularities, specified by @type, +# allowing tooling to get an understanding what a specific CPU model +# looks like in QEMU under a certain configuration. +# +# This interface can be used to query the "host" CPU model. +# +# The data returned by this command may be affected by: +# +# * QEMU version: CPU models may look different depending on the QEMU +# version. (Except for CPU models reported as "static" in +# query-cpu-definitions.) +# * machine-type: CPU model may look different depending on the +# machine-type. (Except for CPU models reported as "static" in +# query-cpu-definitions.) +# * machine options (including accelerator): in some architectures, +# CPU models may look different depending on machine and accelerator +# options. (Except for CPU models reported as "static" in +# query-cpu-definitions.) +# * "-cpu" arguments and global properties: arguments to the -cpu +# option and global properties may affect expansion of CPU models. +# Using query-cpu-model-expansion while using these is not advised. +# +# Some architectures may not support all expansion types. s390x +# supports "full" and "static". Arm only supports "full". +# +# @model: description of the CPU model to expand +# +# @type: expansion type, specifying how to expand the CPU model +# +# Returns: a CpuModelExpansionInfo describing the expanded CPU model +# +# Errors: +# - if expanding CPU models is not supported +# - if the model cannot be expanded +# - if the model contains an unknown CPU definition name, unknown +# properties or properties with a wrong type +# - if an expansion type is not supported +# +# Since: 2.8 +## +{ 'command': 'query-cpu-model-expansion', + 'data': { 'type': 'CpuModelExpansionType', + 'model': 'CpuModelInfo' }, + 'returns': 'CpuModelExpansionInfo' } + +## +# @CpuDefinitionInfo: +# +# Virtual CPU definition. +# +# @name: the name of the CPU definition +# +# @migration-safe: whether a CPU definition can be safely used for +# migration in combination with a QEMU compatibility machine when +# migrating between different QEMU versions and between hosts with +# different sets of (hardware or software) capabilities. If not +# provided, information is not available and callers should not +# assume the CPU definition to be migration-safe. (since 2.8) +# +# @static: whether a CPU definition is static and will not change +# depending on QEMU version, machine type, machine options and +# accelerator options. A static model is always migration-safe. +# (since 2.8) +# +# @unavailable-features: List of properties that prevent the CPU model +# from running in the current host. (since 2.8) +# +# @typename: Type name that can be used as argument to +# @device-list-properties, to introspect properties configurable +# using -cpu or -global. (since 2.9) +# +# @alias-of: Name of CPU model this model is an alias for. The target +# of the CPU model alias may change depending on the machine type. +# Management software is supposed to translate CPU model aliases +# in the VM configuration, because aliases may stop being +# migration-safe in the future (since 4.1) +# +# @deprecated: If true, this CPU model is deprecated and may be +# removed in some future version of QEMU according to the QEMU +# deprecation policy. (since 5.2) +# +# @unavailable-features is a list of QOM property names that represent +# CPU model attributes that prevent the CPU from running. If the QOM +# property is read-only, that means there's no known way to make the +# CPU model run in the current host. Implementations that choose not +# to provide specific information return the property name "type". If +# the property is read-write, it means that it MAY be possible to run +# the CPU model in the current host if that property is changed. +# Management software can use it as hints to suggest or choose an +# alternative for the user, or just to generate meaningful error +# messages explaining why the CPU model can't be used. If +# @unavailable-features is an empty list, the CPU model is runnable +# using the current host and machine-type. If @unavailable-features +# is not present, runnability information for the CPU is not +# available. +# +# Since: 1.2 +## +{ 'struct': 'CpuDefinitionInfo', + 'data': { 'name': 'str', + '*migration-safe': 'bool', + 'static': 'bool', + '*unavailable-features': [ 'str' ], + 'typename': 'str', + '*alias-of' : 'str', + 'deprecated' : 'bool' } } + +## +# @query-cpu-definitions: +# +# Return a list of supported virtual CPU definitions +# +# Returns: a list of CpuDefinitionInfo +# +# Since: 1.2 +## +{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] } diff --git a/stubs/monitor-cpu-s390x.c b/stubs/monitor-cpu-s390x.c new file mode 100644 index 00000000000..71e794482b5 --- /dev/null +++ b/stubs/monitor-cpu-s390x.c @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-machine.h" + +CpuModelCompareInfo * +qmp_query_cpu_model_comparison(CpuModelInfo *infoa, + CpuModelInfo *infob, + Error **errp) +{ + error_setg(errp, "CPU model comparison is not supported on this target"); + return NULL; +} + +CpuModelBaselineInfo * +qmp_query_cpu_model_baseline(CpuModelInfo *infoa, + CpuModelInfo *infob, + Error **errp) +{ + error_setg(errp, "CPU model baseline is not supported on this target"); + return NULL; +} diff --git a/stubs/monitor-cpu.c b/stubs/monitor-cpu.c new file mode 100644 index 00000000000..a8c7ee89b9d --- /dev/null +++ b/stubs/monitor-cpu.c @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-machine.h" + +CpuModelExpansionInfo * +qmp_query_cpu_model_expansion(CpuModelExpansionType type, + CpuModelInfo *model, + Error **errp) +{ + error_setg(errp, "CPU model expansion is not supported on this target"); + return NULL; +} + +CpuDefinitionInfoList * +qmp_query_cpu_definitions(Error **errp) +{ + error_setg(errp, "CPU model definitions are not supported on this target"); + return NULL; +} diff --git a/target/arm/arm-qmp-cmds.c b/target/arm/arm-qmp-cmds.c index ef18c867ca4..cca6b9722b2 100644 --- a/target/arm/arm-qmp-cmds.c +++ b/target/arm/arm-qmp-cmds.c @@ -26,7 +26,7 @@ #include "qapi/error.h" #include "qapi/visitor.h" #include "qapi/qobject-input-visitor.h" -#include "qapi/qapi-commands-machine-target.h" +#include "qapi/qapi-commands-machine.h" #include "qapi/qapi-commands-misc-arm.h" #include "qobject/qdict.h" #include "qom/qom-qobject.h" diff --git a/target/i386/cpu-system.c b/target/i386/cpu-system.c index 55f192e8193..b1494aa6740 100644 --- a/target/i386/cpu-system.c +++ b/target/i386/cpu-system.c @@ -24,7 +24,7 @@ #include "qobject/qdict.h" #include "qapi/qobject-input-visitor.h" #include "qom/qom-qobject.h" -#include "qapi/qapi-commands-machine-target.h" +#include "qapi/qapi-commands-machine.h" #include "cpu-internal.h" diff --git a/target/i386/cpu.c b/target/i386/cpu.c index ec908d7d360..91f89919487 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -38,7 +38,7 @@ #include "exec/watchpoint.h" #ifndef CONFIG_USER_ONLY #include "system/reset.h" -#include "qapi/qapi-commands-machine-target.h" +#include "qapi/qapi-commands-machine.h" #include "system/address-spaces.h" #include "hw/boards.h" #include "hw/i386/sgx-epc.h" diff --git a/target/loongarch/loongarch-qmp-cmds.c b/target/loongarch/loongarch-qmp-cmds.c index 6f732d80f3f..f5f1cd0009d 100644 --- a/target/loongarch/loongarch-qmp-cmds.c +++ b/target/loongarch/loongarch-qmp-cmds.c @@ -8,7 +8,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "qapi/qapi-commands-machine-target.h" +#include "qapi/qapi-commands-machine.h" #include "cpu.h" #include "qobject/qdict.h" #include "qapi/qobject-input-visitor.h" diff --git a/target/mips/system/mips-qmp-cmds.c b/target/mips/system/mips-qmp-cmds.c index 7340ac70ba0..d98d6623f2f 100644 --- a/target/mips/system/mips-qmp-cmds.c +++ b/target/mips/system/mips-qmp-cmds.c @@ -7,9 +7,19 @@ */ #include "qemu/osdep.h" -#include "qapi/qapi-commands-machine-target.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-machine.h" #include "cpu.h" +CpuModelExpansionInfo * +qmp_query_cpu_model_expansion(CpuModelExpansionType type, + CpuModelInfo *model, + Error **errp) +{ + error_setg(errp, "CPU model expansion is not supported on this target"); + return NULL; +} + static void mips_cpu_add_definition(gpointer data, gpointer user_data) { ObjectClass *oc = data; diff --git a/target/ppc/ppc-qmp-cmds.c b/target/ppc/ppc-qmp-cmds.c index a25d86a8d19..7022564604f 100644 --- a/target/ppc/ppc-qmp-cmds.c +++ b/target/ppc/ppc-qmp-cmds.c @@ -28,7 +28,8 @@ #include "qemu/ctype.h" #include "monitor/hmp-target.h" #include "monitor/hmp.h" -#include "qapi/qapi-commands-machine-target.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-machine.h" #include "cpu-models.h" #include "cpu-qom.h" @@ -175,6 +176,15 @@ int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval) return -EINVAL; } +CpuModelExpansionInfo * +qmp_query_cpu_model_expansion(CpuModelExpansionType type, + CpuModelInfo *model, + Error **errp) +{ + error_setg(errp, "CPU model expansion is not supported on this target"); + return NULL; +} + static void ppc_cpu_defs_entry(gpointer data, gpointer user_data) { ObjectClass *oc = data; diff --git a/target/riscv/riscv-qmp-cmds.c b/target/riscv/riscv-qmp-cmds.c index d0a324364dd..8ba8aa0d5f8 100644 --- a/target/riscv/riscv-qmp-cmds.c +++ b/target/riscv/riscv-qmp-cmds.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "qapi/qapi-commands-machine-target.h" +#include "qapi/qapi-commands-machine.h" #include "qobject/qbool.h" #include "qobject/qdict.h" #include "qapi/qobject-input-visitor.h" diff --git a/target/s390x/cpu_models_system.c b/target/s390x/cpu_models_system.c index 4351182f720..9d84faa3c9e 100644 --- a/target/s390x/cpu_models_system.c +++ b/target/s390x/cpu_models_system.c @@ -19,7 +19,7 @@ #include "qapi/visitor.h" #include "qapi/qobject-input-visitor.h" #include "qobject/qdict.h" -#include "qapi/qapi-commands-machine-target.h" +#include "qapi/qapi-commands-machine.h" static void list_add_feat(const char *name, void *opaque); diff --git a/stubs/meson.build b/stubs/meson.build index 0ef11976a2f..3b2fad0824f 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -82,6 +82,8 @@ if have_system stub_ss.add(files('monitor-i386-sev.c')) stub_ss.add(files('monitor-i386-sgx.c')) stub_ss.add(files('monitor-i386-xen.c')) + stub_ss.add(files('monitor-cpu.c')) + stub_ss.add(files('monitor-cpu-s390x.c')) endif if have_system or have_user From patchwork Wed May 14 23:41:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 889888 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2875725wrr; Wed, 14 May 2025 16:42:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUzOGoSXPpOfaqd1PHWKzVumoWcpbrUpJrNhPs3nGYOv0UtXAO7wOwGP5UT3h0xbbiREqRvbw==@linaro.org X-Google-Smtp-Source: AGHT+IGBxKn2knklukNgUwTtQ68Rk7FsfG97LC2mrarHUdfdl7oCy5NmYCoP+5+fZ42AYEcwhiHF X-Received: by 2002:a05:6214:5083:b0:6e8:fa33:2969 with SMTP id 6a1803df08f44-6f896e43b7cmr79847696d6.10.1747266137257; Wed, 14 May 2025 16:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747266137; cv=none; d=google.com; s=arc-20240605; b=KqRJeJgm4rCTUWiYD5E4r9qHWLDqpSLOVBTTQ2W6gMIMA+AigfGAxFDLnVszU01HdK QkgHuI6uez9Jgflpmb0mseccaD91qQtsIS0eU3p2dlNhINNzxhBYM8gU2JkJabOQ/0Jo RxmN4szEEXGnixWV1dfDhV4jWTGgq9nwO8Q4OIkTgPsR6iS47AFVziU8tT+tssZdVSXk R1ZgA+dD5oVY4R8U11z4OpsdkuQQg0NDvJ+shHPcw/nfj/QquFRP9XZC5bzVjz7Nzbz1 3OV8NBjfIuBUzLv8/llg3j3d1UVK8ewZeNtG+q6BCZMTGb3XY9liY83OHtB4HtAZeIS5 ayrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+fXGk75xb2Eek1gtiwnDqmCNj/bRoXzc0AZydpuFChw=; fh=VLmoI/6EX8QpenFjusv8qhWaEfIPciazAbyYTbMJFJo=; b=cmBasLCFUzaXRjGEPerN0fnE89fVmAMJrN1/ZGMYqeGLidl2Uynl5ZqfwkEwH8pmm/ op6QcO17gRKeuML3rdC58m6dWkBZtZqzr2GINuI/gVwOlvOOPPUY52mrOU2C1V9+iGcG 4X2Zz//yZf8/pMU1CQcVumva3LjTAvE470BT/zTr/uns0ARKjXTeEHSruf+BMZ5S1ii4 pO68GcTAGyY1jqKCTgf+kc6V9WeJmniLq8c3hAbXmuIPlqlEm8NmQK2BiYngJJewsEo2 hlBQTGpdxEkgyeiWVw5nsSKCsKK82O0n5p9tDhSwachmP9ZIfXRVkNhmNhDcJaqsk6Wg nccg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QXbY1gDF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f6e3a58c92si140536686d6.422.2025.05.14.16.42.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 16:42:17 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QXbY1gDF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFLjF-0001qh-2X; Wed, 14 May 2025 19:41:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFLj6-0001cO-Qr for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:28 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFLj4-000359-OS for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:28 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-22e033a3a07so4100455ad.0 for ; Wed, 14 May 2025 16:41:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747266085; x=1747870885; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+fXGk75xb2Eek1gtiwnDqmCNj/bRoXzc0AZydpuFChw=; b=QXbY1gDFq0yeMrfUv0FrJ2VsqxK/YjIY7QaSyII67Ta1Ni8Dz6Eucrpd4Tghzn2sSJ mmeRiW8epO9mwjXJ6stB3RbvCAZUzCP6YLCylBkdFijfhahl3BWjXJFVNL5PEXc6NpHH 1qK0tkULx/AtMetZZyOYgzmFDJWzuGlDLIwCDv4UKA+vmmuqeaJLJ+VqbXFCjNBsU8Ch SNj8mXuDSOLz+yYacIJFxwb7RWw9flNlrwCghypPwzJ2dAoJkrSMo5ly+EKH4z5KuvkD DCKvhWQWbAOxYO/sw3YiP6WyPJJein5dONLT8xUAAsOIEE00Beuhz2u2+wiVpLJ3w9fY 4tpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747266085; x=1747870885; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+fXGk75xb2Eek1gtiwnDqmCNj/bRoXzc0AZydpuFChw=; b=BJV1BSOBhGaJKJ5E97IqNP+GxIWfEzUfNqK+rzCn1YAW8ZMaNLf8ZMIJBrP0M/5Zg2 rzdGyF+PbR8BJscXAzh0nUQ3NNlM4tQT9n6ijEJdS5PrlCzSKKW7jzivqczb/NHejzql 4D2Ubu0YAK/pPMkjpOSu5NMTBm6mhZn3PSfaUPQNQeTWddt2rifuYSd6CzBa+izXTZSc 8DNXq1OcSj2T9wbOmFoZW4zMJpIzASUv1GWzI48COfe5pXZ/4qO9lSIIZ25vOz4nvOQK ajoXZMkBaCwHf1d+jqELx6zdZE6/TeMM93oluJhM5a3ZOwB7V64FbIEh1Z3ln02E/dl6 37qg== X-Gm-Message-State: AOJu0YzDHHPoqyegwRyQcU2tguYynP79eM0ri8vuEnrOaGQnLf3hr6Fj BgsMWpCaVRvFdhw/XnIQvqFjyjf7hunxRu4lpGIwCnsZXZOUOZ7jQfiDk3Yh8Q9MPmGg5JkWkXh ZxdI= X-Gm-Gg: ASbGncuiEi36/d+s3VUCpIBEpogQgKnAjHiWfYoboCiK9K/l0jlMNr1/mQ8BNU7CkPi TesHlTfD7E7Fr0ZCIvdEN/M0PD/Fi14RKScynuqB23WKOsNKuGhE1EQEYRskxzQOi1vaKE2WrVe TBhqkLgE5jvs0Dod+Fw4F/AqGyW9/p3U2yYX9fqFn/U9mLtOZ/xyHsJBEOiPa9Xv4Q8au/xeb/Y JxWUOUaphEztjoo8u9C1tgd3RZQaBoird4Tu2SZg0oHiYIsfhfHu7HmUMLMXJ4P+MERbgbbppJX cch0Z9fGOqqKLMvAGiewsJCBtWfFbYUhu+J0Z9SFcGr2Gjgyb2o= X-Received: by 2002:a17:902:d54e:b0:22f:b716:c39d with SMTP id d9443c01a7336-23198148d76mr68645155ad.33.1747266085319; Wed, 14 May 2025 16:41:25 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc828b4e4sm104583615ad.182.2025.05.14.16.41.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 16:41:24 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Michael Roth , alex.bennee@linaro.org, Paolo Bonzini , Thomas Huth , berrange@redhat.com, Richard Henderson , peter.maydell@linaro.org, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 10/12] qapi: make s390x specific CPU commands unconditionally available Date: Wed, 14 May 2025 16:41:06 -0700 Message-ID: <20250514234108.3746675-11-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> References: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé This removes the TARGET_S390X and CONFIG_KVM conditions from the CPU commands that are conceptually specific to s390x. Top level stubs are provided to cope with non-s390x targets, or builds without KVM. The removal of CONFIG_KVM is justified by the fact there is no conceptual difference between running 'qemu-system-s390x -accel tcg' on a build with and without KVM built-in, so apps only using TCG can't rely on the CONFIG_KVM in the schema. Signed-off-by: Daniel P. Berrangé Signed-off-by: Pierrick Bouvier --- qapi/machine-s390x.json | 121 ++++++++++++++++++++++++++++++++ qapi/qapi-schema.json | 2 +- include/hw/s390x/cpu-topology.h | 2 +- hw/s390x/cpu-topology.c | 4 +- stubs/monitor-cpu-s390x-kvm.c | 22 ++++++ tests/qtest/qmp-cmd-test.c | 1 + qapi/meson.build | 2 +- stubs/meson.build | 1 + 8 files changed, 150 insertions(+), 5 deletions(-) create mode 100644 qapi/machine-s390x.json create mode 100644 stubs/monitor-cpu-s390x-kvm.c diff --git a/qapi/machine-s390x.json b/qapi/machine-s390x.json new file mode 100644 index 00000000000..966dbd61d2e --- /dev/null +++ b/qapi/machine-s390x.json @@ -0,0 +1,121 @@ +# -*- Mode: Python -*- +# vim: filetype=python +# +# SPDX-License-Identifier: GPL-2.0-or-later +# This work is licensed under the terms of the GNU GPL, version 2 or later. +# See the COPYING file in the top-level directory. + +{ 'include': 'machine-common.json' } + +## +# @S390CpuPolarization: +# +# An enumeration of CPU polarization that can be assumed by a virtual +# S390 CPU +# +# Since: 8.2 +## +{ 'enum': 'S390CpuPolarization', + 'data': [ 'horizontal', 'vertical' ] +} + +## +# @set-cpu-topology: +# +# Modify the topology by moving the CPU inside the topology tree, or +# by changing a modifier attribute of a CPU. Absent values will not +# be modified. +# +# @core-id: the vCPU ID to be moved +# +# @socket-id: destination socket to move the vCPU to +# +# @book-id: destination book to move the vCPU to +# +# @drawer-id: destination drawer to move the vCPU to +# +# @entitlement: entitlement to set +# +# @dedicated: whether the provisioning of real to virtual CPU is +# dedicated +# +# Features: +# +# @unstable: This command is experimental. +# +# Since: 8.2 +## +{ 'command': 'set-cpu-topology', + 'data': { + 'core-id': 'uint16', + '*socket-id': 'uint16', + '*book-id': 'uint16', + '*drawer-id': 'uint16', + '*entitlement': 'S390CpuEntitlement', + '*dedicated': 'bool' + }, + 'features': [ 'unstable' ] +} + +## +# @CPU_POLARIZATION_CHANGE: +# +# Emitted when the guest asks to change the polarization. +# +# The guest can tell the host (via the PTF instruction) whether the +# CPUs should be provisioned using horizontal or vertical +# polarization. +# +# On horizontal polarization the host is expected to provision all +# vCPUs equally. +# +# On vertical polarization the host can provision each vCPU +# differently. The guest will get information on the details of the +# provisioning the next time it uses the STSI(15) instruction. +# +# @polarization: polarization specified by the guest +# +# Features: +# +# @unstable: This event is experimental. +# +# Since: 8.2 +# +# .. qmp-example:: +# +# <- { "event": "CPU_POLARIZATION_CHANGE", +# "data": { "polarization": "horizontal" }, +# "timestamp": { "seconds": 1401385907, "microseconds": 422329 } } +## +{ 'event': 'CPU_POLARIZATION_CHANGE', + 'data': { 'polarization': 'S390CpuPolarization' }, + 'features': [ 'unstable' ] +} + +## +# @CpuPolarizationInfo: +# +# The result of a CPU polarization query. +# +# @polarization: the CPU polarization +# +# Since: 8.2 +## +{ 'struct': 'CpuPolarizationInfo', + 'data': { 'polarization': 'S390CpuPolarization' } +} + +## +# @query-s390x-cpu-polarization: +# +# Features: +# +# @unstable: This command is experimental. +# +# Returns: the machine's CPU polarization +# +# Since: 8.2 +## +{ 'command': 'query-s390x-cpu-polarization', 'returns': 'CpuPolarizationInfo', + 'features': [ 'unstable' ] +} diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json index d8eb79cfda6..a8f66163cb7 100644 --- a/qapi/qapi-schema.json +++ b/qapi/qapi-schema.json @@ -57,7 +57,7 @@ { 'include': 'qdev.json' } { 'include': 'machine-common.json' } { 'include': 'machine.json' } -{ 'include': 'machine-target.json' } +{ 'include': 'machine-s390x.json' } { 'include': 'replay.json' } { 'include': 'yank.json' } { 'include': 'misc.json' } diff --git a/include/hw/s390x/cpu-topology.h b/include/hw/s390x/cpu-topology.h index 9283c948e3a..d5e9aa43f8f 100644 --- a/include/hw/s390x/cpu-topology.h +++ b/include/hw/s390x/cpu-topology.h @@ -13,7 +13,7 @@ #include "qemu/queue.h" #include "hw/boards.h" -#include "qapi/qapi-types-machine-target.h" +#include "qapi/qapi-types-machine-s390x.h" #define S390_TOPOLOGY_CPU_IFL 0x03 diff --git a/hw/s390x/cpu-topology.c b/hw/s390x/cpu-topology.c index 7d4e1f54727..b513f8936e4 100644 --- a/hw/s390x/cpu-topology.c +++ b/hw/s390x/cpu-topology.c @@ -23,8 +23,8 @@ #include "target/s390x/cpu.h" #include "hw/s390x/s390-virtio-ccw.h" #include "hw/s390x/cpu-topology.h" -#include "qapi/qapi-commands-machine-target.h" -#include "qapi/qapi-events-machine-target.h" +#include "qapi/qapi-commands-machine-s390x.h" +#include "qapi/qapi-events-machine-s390x.h" /* * s390_topology is used to keep the topology information. diff --git a/stubs/monitor-cpu-s390x-kvm.c b/stubs/monitor-cpu-s390x-kvm.c new file mode 100644 index 00000000000..8683dd2d4c6 --- /dev/null +++ b/stubs/monitor-cpu-s390x-kvm.c @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-machine-s390x.h" + +void qmp_set_cpu_topology(uint16_t core, + bool has_socket, uint16_t socket, + bool has_book, uint16_t book, + bool has_drawer, uint16_t drawer, + bool has_entitlement, S390CpuEntitlement entitlement, + bool has_dedicated, bool dedicated, + Error **errp) +{ + error_setg(errp, "CPU topology change is not supported on this target"); +} + +CpuPolarizationInfo *qmp_query_s390x_cpu_polarization(Error **errp) +{ + error_setg(errp, "CPU polarization is not supported on this target"); + return NULL; +} diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c index 15c88248b79..040d042810b 100644 --- a/tests/qtest/qmp-cmd-test.c +++ b/tests/qtest/qmp-cmd-test.c @@ -100,6 +100,7 @@ static bool query_is_ignored(const char *cmd) /* Success depends on target arch: */ "query-cpu-definitions", /* arm, i386, ppc, s390x */ "query-gic-capabilities", /* arm */ + "query-s390x-cpu-polarization", /* s390x */ /* Success depends on target-specific build configuration: */ "query-pci", /* CONFIG_PCI */ "x-query-virtio", /* CONFIG_VIRTIO */ diff --git a/qapi/meson.build b/qapi/meson.build index ffe44f9e0b8..e038b636c9d 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -39,7 +39,7 @@ qapi_all_modules = [ 'job', 'machine-common', 'machine', - 'machine-target', + 'machine-s390x', 'migration', 'misc', 'net', diff --git a/stubs/meson.build b/stubs/meson.build index 3b2fad0824f..cef046e6854 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -84,6 +84,7 @@ if have_system stub_ss.add(files('monitor-i386-xen.c')) stub_ss.add(files('monitor-cpu.c')) stub_ss.add(files('monitor-cpu-s390x.c')) + stub_ss.add(files('monitor-cpu-s390x-kvm.c')) endif if have_system or have_user From patchwork Wed May 14 23:41:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 889894 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2875916wrr; Wed, 14 May 2025 16:43:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUpJnGITRMicMpmk4FUeG6rw24PlSI05D2ROg/yOJkJhjoWCiexb0rUHTxRRQfo6d1Vs2hbnA==@linaro.org X-Google-Smtp-Source: AGHT+IEPXST1QGKKSqJKCWuREgDRSa4gdM3Nd0rBsOVh7qjrJTtk1Qt/sARysnmtX77uFT/EPKFm X-Received: by 2002:a05:622a:1e97:b0:494:a057:81a7 with SMTP id d75a77b69052e-494a057841fmr29448651cf.16.1747266191023; Wed, 14 May 2025 16:43:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747266191; cv=none; d=google.com; s=arc-20240605; b=eDgKunEB4yVSE9jnln4/3pvVzzdTKsjSVN5C2Zt0o/MEZmRiumPs4XWrHPnXZYLgpj 8YlRLXhkoRhexvNx5mN1ZX+yevrEmc7WONynxgfEW/3MS8RabPgSLzzrCWxNeYD2TW26 qIY9IO9hfFMLhiodhAX4va1ArHOz+yRAkZGZyCJR3lCau3oWS4NwMWR1dCRLOahdULPy rK7NyuK06rFW6Q6Xk6PhnE3WnEHZgzl+RwL4pgcZ7YaPouenhclH/IA+wkNTjuCQNjxD 00WLKYgMqfe3xnsa39QzYtPY5r8tPkhJehz8mX1quWw0C9HzzKb/q7BHu4Ca7xy6dmbW 8VSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KwJjemUjD9ZnxOnBtW/8nh4JOR16dJgUBDJaYDLzvO4=; fh=VLmoI/6EX8QpenFjusv8qhWaEfIPciazAbyYTbMJFJo=; b=kbJDN9/9viJINJEdTWEz2zmnu+rjHUJEZSq4R0wfEJ3XC8dyfFgJKRRXDIUIbB0QZ9 v+zkBII4zqiq+kf4VWlV/J6fdrDeqFo1sd5PAf74imWvuX8zbIaTmDz19xPct7TILKGy saNOw1pa8Um6Daa7oCUpqU/N03m/Jp14muuqx+L+B3SfoNaN2jvlr9WstnLr28Fm8mkA 01IhJkt2wJrqHtBMbjeFY9ntDAx4p0bM1FmHvYdOtuou4ssEOu4kAYwBi0jp/f1/qN4z 3CdxXppbiOpFqx8rZCssksV2MaBAYkUENaF8WMmeJ6GJIdeXsP5S22+7eFyt6KJn9i+L TMnA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="q/mhxlVh"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-494525812d3si142077011cf.380.2025.05.14.16.43.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 16:43:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="q/mhxlVh"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFLjC-0001pH-4G; Wed, 14 May 2025 19:41:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFLj8-0001gv-2y for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:30 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFLj5-00035P-JA for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:29 -0400 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-b0b2d1f2845so184509a12.3 for ; Wed, 14 May 2025 16:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747266086; x=1747870886; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KwJjemUjD9ZnxOnBtW/8nh4JOR16dJgUBDJaYDLzvO4=; b=q/mhxlVhoWI/pXeF1zd2OOKj6hHyuuR4IXG/Nv/CpVkG1h7CXJ5fPl0S62RRZ3Fabx OOVy7DIkt7o+ngW6cCY0MqQ1raFoEL//9PzGsgQVqDnYYUDU7rSdi8U7tXgtJAgih+9O ATCZR+1OOp4SZGxd/xBaTa0+xxbLrhDbu7xIqQlCHYFlc6aXjId7gsHbe6qTckBHIuRj YljzE4pLRgk2AjZ45oIXX3fziRuSBgtnwknGanc6XEs1WKMKP1a8tAKyB/TyH/yBXQSb aqT/WBbvqgGeDtmb8tnwycGKhzC+XSAtjaCiq2jphz15UmWGXuO2GpXPRJGBI95kQl6T oJbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747266086; x=1747870886; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KwJjemUjD9ZnxOnBtW/8nh4JOR16dJgUBDJaYDLzvO4=; b=kBnlsUkEdRMBd01qd0qPaAJPRtVOwT/gkp4NoZ+H9gMFX0+Zvvx7z28YFtH6b3nPuw pcds41A6XhUQAHkBm6/jjjsq9G5weJVysdW+wj/uBK3WTVjAoxry0KQc4x6rqQDm/JGa slBE0OoGkf+u85tJZL24N29djTpFhyeFbRlVTEfkIIuYZyojMEt5pmuWNQJ1PGbW4vCO f3WS5eNQn5pLkcwY/PCIIs9rENtINuYzXsPdl7L4yyKDMFm+HY1YTRBUp4f1FOx40JtS BD3pldYOsCGEf31xO0ibyjuRWi4rXHYXrOrAUMOMj57Rcrq+nnrev/cjnEV7ksnbTbSb GzuA== X-Gm-Message-State: AOJu0Ywi9RZ0wVlKMuCaZ4M3QcOc86z+VlkiHHXbUpQQkiDMnyiKYgam 5FajUMnaLPEFzYtJzgoVdT7FLACP1ll+Xh8ido5idGOTpblvCBBEwfFFZBWK3tRuTO1T3SdR3GO FRck= X-Gm-Gg: ASbGncvcnjA4GykSiZEIq8eVbCSBoVAt/MEbg22+hsNL+FK2khSkGktUYCIKN5AYXIk xG1jNhepTkYcxGzXRWipj/yXBeGisexmRTfQn2x7bNsukF/+V+3zVCWPFj3ou36xmhHGy/sq52V xkgOmtHh/4EfAmiMfvWfqIvnvMevto1VfBRsKQhlqtbkhctAWty5bp95itLCM0p3vrOAAgCCGvV 6duRbqjWo66LsoR/WqfThGCVM7q1bXPVtWI3Kicjk3bpCUPXuzxyB5jVxDuml8HNbUkZiwffeUT zRrZ/JCYh5OAVpYsBcI3n+7jnN0AqmdxZ3zOwSgvFgZlbgE1Guw= X-Received: by 2002:a17:903:1207:b0:224:b60:3cd3 with SMTP id d9443c01a7336-2319813ec9cmr78295375ad.19.1747266086203; Wed, 14 May 2025 16:41:26 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc828b4e4sm104583615ad.182.2025.05.14.16.41.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 16:41:25 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Michael Roth , alex.bennee@linaro.org, Paolo Bonzini , Thomas Huth , berrange@redhat.com, Richard Henderson , peter.maydell@linaro.org, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 11/12] qapi: remove qapi_specific_outputs from meson.build Date: Wed, 14 May 2025 16:41:07 -0700 Message-ID: <20250514234108.3746675-12-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> References: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x52f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org There is no more QAPI files that need to be compiled per target, so we can remove this. Signed-off-by: Pierrick Bouvier Reviewed-by: Daniel P. Berrangé --- qapi/meson.build | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/qapi/meson.build b/qapi/meson.build index e038b636c9d..7582c2b5bcf 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -92,7 +92,6 @@ qapi_util_outputs = [ ] qapi_inputs = [] -qapi_specific_outputs = [] foreach module : qapi_all_modules qapi_inputs += [ files(module + '.json') ] qapi_module_outputs = [ @@ -110,15 +109,11 @@ foreach module : qapi_all_modules 'qapi-commands-@0@.trace-events'.format(module), ] endif - if module.endswith('-target') - qapi_specific_outputs += qapi_module_outputs - else - qapi_util_outputs += qapi_module_outputs - endif + qapi_util_outputs += qapi_module_outputs endforeach qapi_files = custom_target('shared QAPI source files', - output: qapi_util_outputs + qapi_specific_outputs + qapi_nonmodule_outputs, + output: qapi_util_outputs + qapi_nonmodule_outputs, input: [ files('qapi-schema.json') ], command: [ qapi_gen, '-o', 'qapi', '-b', '@INPUT0@' ], depend_files: [ qapi_inputs, qapi_gen_depends ]) @@ -138,7 +133,7 @@ foreach output : qapi_util_outputs i = i + 1 endforeach -foreach output : qapi_specific_outputs + qapi_nonmodule_outputs +foreach output : qapi_nonmodule_outputs if output.endswith('.h') genh += qapi_files[i] endif From patchwork Wed May 14 23:41:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 889887 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp2875679wrr; Wed, 14 May 2025 16:42:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW2mChs+r3JeXHmm0m7Qzczu5JSo173Qrp1w/PMmX1c2JAFUKihE0Ia2hTYbsW8z3z7/AF0OQ==@linaro.org X-Google-Smtp-Source: AGHT+IGJ26gvdno67rkRnIaK4jRUYqK7BbHgm2NVXHmgi/+d2LTUYKljsKUlL+HaxlLpc/H94qaK X-Received: by 2002:a05:620a:471e:b0:7c7:bac6:8b7f with SMTP id af79cd13be357-7cd3c80830dmr35301585a.45.1747266129277; Wed, 14 May 2025 16:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747266129; cv=none; d=google.com; s=arc-20240605; b=SxZT4fh1mPfJEzWro7AC1s17nW+VYBOTDuK8BQ2LynPL/Y58izWivT4eanhVbpZrQj rNAUS/+PoVpeyMbyRK8nhkFeU0pACJCV3ABYcoTWkiQOIXPqmrUM3MrpAuX5LS5Sy3z9 QLofXlzh3+hDqv60qAcKc6fPhz/1P5z4tu/mR5G1BYgzMLqkyGoEjLga51faEIMHeRlo qR92z1B+GYQSQyGSErs0QcFuIhLJnSk1RW8s2/EuDDIqMKeAxGj+S76qhbownhTGzSCp szeAK6ydIjACp+11s4u50cFpO4fJxtBGpm/i0wRUMcu09AhGZEeBm+mfbbuHmv43adn5 71Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sKwFRPpZTmbwynD7A1A8benKG+PxpGt82n2RkSfjlV4=; fh=VLmoI/6EX8QpenFjusv8qhWaEfIPciazAbyYTbMJFJo=; b=F7nWCwdiCjZZca37xjlAFSYed5T68HLOCNZsSnbszaFkeHAY8H5XorumDpe5uX8coI ol+8ZHFTtDvrbTjmB+VNym6M3BIHasP3P2fjEdlxFWR/c6fUTsbD0MmB3R9lnhtksc8N n5JzcWBC/kjbhBaVPKtlZIVhpHG7C02/AsD6CAGjeb5mqMlXuP71SYLY53tzRqy4H7RC lr1bJwAsMAXX8So8L9BTs7AnuIe6jG/ptjl4rC7YbQFh3wGU6wRumpns0Mh0nm/IXG6D DgdhsPZ8sr84mK8J2MkeH3f+zJx2/D2oqnzOX6YJYPMwBN3sid2RROA1H2mQM8N1sbxL umyg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KtGGb/jk"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7cd01022a2esi1413517385a.646.2025.05.14.16.42.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 May 2025 16:42:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KtGGb/jk"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFLjF-0001sn-VR; Wed, 14 May 2025 19:41:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFLj8-0001hR-72 for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:31 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFLj6-00035W-AX for qemu-devel@nongnu.org; Wed, 14 May 2025 19:41:29 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-22fb7659866so4047945ad.1 for ; Wed, 14 May 2025 16:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747266087; x=1747870887; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sKwFRPpZTmbwynD7A1A8benKG+PxpGt82n2RkSfjlV4=; b=KtGGb/jkVZonBnTyBs/mPyv+u/PAXPPhAqwZF5yWQp0EY6y+W55hjW5OujUfwPRzKm Oe6WWHvn4fyfmb9c+pGoNazbCZs6NfIr/VsqVdR65AsW9whBQn2ZuvQj2pUWtp+sLIby o7qCiIY7h4IkZ+EQ5eKvrvSwHqO64ej+/eSoWnGjD7eV4VZrtGWG0gPe+X34XYF7NSR1 a5AjlxjiONpXL1l1L6OZxdf7g6XcpPJzZ+WxPDQ3XV73+WjyYKENzuOglh7elL/dSSG3 4Z6jEwvFuO4LXOJHL+2vbXxMp/NW1bE3lrAmv5miUDKQ6ZROpZ1nWP5bMJKp5v8wLs2K 9Yaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747266087; x=1747870887; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sKwFRPpZTmbwynD7A1A8benKG+PxpGt82n2RkSfjlV4=; b=T5Lgbfn7WRzttC+ko88glFwy3oVCOGe8Qo6WE1nKanBe1a06L5GCsJiy9uO2N1aMid fka+efFgnc+lCNOE8PXqlbEs6vAK0NCS/S8SZFoKRbNDH7AMmQS4lY7jZFSnGeaHuMyE VG32O+fv2fwAhX2OyaFTMITyQw4QVsxIsao30/Plq5KK7hG9Or8/KUah0hKcLGMt8oiN mKqABgeCbKJf3MuitEflAka5ItWEHF8+H+6P21srQVTPIZa7qeRoMj+52tCRXJ4DiWjp 34vWc5fx6FGBAU0+NhSuDUjnCkbw8XmOsugI+e9T7eT6OuPKQRMg5K90MMkFBSYWGPSg uvNg== X-Gm-Message-State: AOJu0Yz+Nrpjfw6L0K/jH3K6ihm289t4gtxMK27pAD3pysRDD/HxtYnu W/rK8duG3n886f2fy7PGr1sYpfBfVnmmvV2qbiCxwy/o0YF8ZSH1eUkmNgCtadz+XCb5miXOMHt gsYw= X-Gm-Gg: ASbGnctGmoSh1/LNxONLrqDIrmb1o16LV0dpj5BvrJA5iLns107D4e663ErjP8D8CXr Ma/znwHrpuSstPyuGkprCGoT4+LkCBdrN0zSsrxGiLfSM0VRMDaXL598DPerOcK2pMXQzZjTJAm +VoNrs6jvsiUj8M1vTLpkLrteUQtJf0VtvEbMdmf6BT+5KJb7sIJNZOPskv+bo7B1fMy3AXCVyv chC+QJv8PcFevW6b7tr6r35jAD9Z+5xcQTLd0BCHNSX/Wmg1V2ZWIPyNJgg7n57/DXuG6igqKlb cgg6H7rrksGs1DoHgJRe9+UotjVYPcFKbqFUxaENEmRuNaWWI7vWOS0DGcaaEA== X-Received: by 2002:a17:903:40d0:b0:22e:5e05:b89d with SMTP id d9443c01a7336-231b605adafmr5822275ad.16.1747266087146; Wed, 14 May 2025 16:41:27 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22fc828b4e4sm104583615ad.182.2025.05.14.16.41.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 May 2025 16:41:26 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Michael Roth , alex.bennee@linaro.org, Paolo Bonzini , Thomas Huth , berrange@redhat.com, Richard Henderson , peter.maydell@linaro.org, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 12/12] qapi: make all generated files common Date: Wed, 14 May 2025 16:41:08 -0700 Message-ID: <20250514234108.3746675-13-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> References: <20250514234108.3746675-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Pierrick Bouvier Reviewed-by: Daniel P. Berrangé --- qapi/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/meson.build b/qapi/meson.build index 7582c2b5bcf..6cc3afce721 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -140,6 +140,6 @@ foreach output : qapi_nonmodule_outputs if output.endswith('.trace-events') qapi_trace_events += qapi_files[i] endif - specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: qapi_files[i]) + system_ss.add(if_true: qapi_files[i]) i = i + 1 endforeach