From patchwork Thu May 15 17:27:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890217 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp3269166wrr; Thu, 15 May 2025 10:29:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXfLjjgROU48WpBXXB2Gz14FD+0dCl3+smzkOW0aLu/22BlRN9l8Adp9yr33uPiJ7Ijy1E8KQ==@linaro.org X-Google-Smtp-Source: AGHT+IFZRoTDP8eSv9fYoPhO6Jz8hPkQpyO888BHlq/luth0exjN6uZMsQ7j5btGp/97fuON4G+B X-Received: by 2002:a05:620a:4549:b0:7c5:4c49:769c with SMTP id af79cd13be357-7cd46707c88mr67007685a.6.1747330198319; Thu, 15 May 2025 10:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747330198; cv=none; d=google.com; s=arc-20240605; b=NMf9tGhLMSxvTWlRif2XkoaAtkyohZPFevnZ3VlvCYOx3LQTL5UBWO1g5l6l+xhW9I 7qEQqkAwTtNLMLDyU2WvPo4UhzrVwYaTsDgcCgKwL+oqqzyO3oe6VyoV588Rlj0Kj88n 7zSHn0wgJ6FMZ/KUTjAJE/lR29pUYUiAFH/xvs07cobO8tqJ9GXHUpbCIENjJlX6am4q Hij9Vr8BTywLYY2QRCVm/En+B6krq1Jprky/3IOIAWNv21rS1Yf8Qwc5Uubq3FjEHTpm +sEL5Q5zcsYcMoK02aCZdPROnbrt96y2pDOKpiWntj+A2ETikxhK0NWeXrI12FN6KH2s IBDw== 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=n2kksRWF5uMfLBl5C93UC3KpDnUA54+ae7RH/Q2zvUg=; fh=OJpaBvMmOsDyDUaboK7XVT1jzhwiftmC9hsBKL9dJIk=; b=Sj8zDjddB5X6VIsjrMsesiWtQgcPGHHQsZhEs4Di4XZDyENNtLRVuUuT2T7QzD3tZ/ 0Vv4DHQ29uZEqSDaOkNbevydxGF+24tn4+2xkteJzS/grJajyEdG1AZf+qW01Z8ijfv6 vzwaU7wA0XbAixw5kFNZf3mng9sZuk3kBqh+JJAgBSUC1qO1DiBqGe4hM2/l0yiGf6BK qnH8MkS0ZcaSak+AUTaim9Gikt+icXaWdcx8jyLH2V4NXISHvVAXczkWjVy0xjhNYfVj 9au+pfMGSWSlXBsDCZg+qju9h9WskVVIJfNQrzRvTBOyNkJzV5W6rBLWGc9/kZpd3S8j YCEQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=emgyDLkv; 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-7cd467cfaaasi16114085a.126.2025.05.15.10.29.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 10:29:58 -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=emgyDLkv; 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 1uFcN0-00080C-BJ; Thu, 15 May 2025 13:27:46 -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 1uFcMx-0007rR-VL for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:44 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFcMv-00023W-QJ for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:43 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-7426159273fso1401123b3a.3 for ; Thu, 15 May 2025 10:27:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747330060; x=1747934860; 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=n2kksRWF5uMfLBl5C93UC3KpDnUA54+ae7RH/Q2zvUg=; b=emgyDLkvLDOwPVMrWYu4P8R8/FyzN6eDNrMgg28nGXVkRUC9WlqafERkCmEI1EHC1E QyFH4mbEY5Qqn1gcaV6flf8TwVfYOYQ0u6yrKRbS5f+OsLJwaTJGrsSeit3LtUvz/7BM wn6AqECdw3sbID4bCNdInqCD0NnooY87D1eSUEKyGnHoZyXpeYR1DLObuj7B78fDN+uH T2iY4FcjumbRruyBVcHcjreh6QAmFhvK5P6mjcMpTDuI06XJgfx06nhi5fnV9vrHTIw1 xc5XNbphY0Kp6wz0doWG1JZMuOL6MYOIpX3rgvg7q1crIj3JHay799v9giyXX335hCWA 7Hxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747330060; x=1747934860; 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=n2kksRWF5uMfLBl5C93UC3KpDnUA54+ae7RH/Q2zvUg=; b=xSIkNo+tEIHJYkjIJUN6t3b0sLY/33G96MdY1bq/eQWiAB4P1ujGsYvNQ6mcd/Z7Hf +gP1Xn6bz4bXwlbQEMCXPq/qTf5LwcKqzXl8Gu9ImBMp3eB6dSYJdOifFOJpxuPGBDku pn1ME15ga20tlzO6cXXYJYNpy4x+BbVdNMCinP3l8xz61IWyjEU+GNcTemgdc/3ob3Je ZYvz9eIdASjgzppX9kw3FhpaPT98zLw0t84Cv9VSRqTpMi4B8C1ZeBHyKlRer6jZHmCI BvDjmczBeU6ixEaqJw8k6/klM1Jk+qTfF3nBAH2kKKbTk5Y8yVsQbz2nINds8VX+UkA/ /UrA== X-Gm-Message-State: AOJu0YxCd3DsMe4+K6v7WR+pNWtxR7YK39tMQoGOapeX6fVESbqGPWHi DvuRS18zYlMprOjz8Rw4pZ1/pNq7SwRfJxYlEFoUATa0fBdgZbnMQcRN2IEEm+x0sWxzt9F99Sf QWr+2 X-Gm-Gg: ASbGncv6ms5H+bF70HWv/2hMufYPuAl+Q458PIKUIfMigbuqE7nH856LmhmqrAUsenI 9wa+SNj1l7Yxpd5tgOrSXRV02h6KXb+Wn8ohftct2oSe8T8gpQhfAzFpEOg+hpNmOlWVmO8avp/ dwjZ/phpjpAQlwA+q/UYYCOEIDrhgiYSwCQ/iaiuP9CgIVIinFag1ukw5w6pxMuVDzbAoMB21BY fKc18TvjUFPHfQn7E5+psx1XWrK2ZRdvjjDnU4BizsD3n5b76zOyWDnmg/cYUw03vbZAp3oVZYl f0ib0nRGSYbI+3KM42XOZdX65hQ+Db7HsPDlOVKmprsaS5YEs3+hWq4/GrZt8g== X-Received: by 2002:a05:6a00:1495:b0:736:ff65:3fcc with SMTP id d2e1a72fcca58-742a98ab432mr269829b3a.16.1747330060278; Thu, 15 May 2025 10:27:40 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a96dfa9dsm79730b3a.10.2025.05.15.10.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 10:27:39 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Michael Roth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , berrange@redhat.com, Markus Armbruster , Peter Maydell Subject: [PATCH v2 01/12] qapi: expose rtc-reset-reinjection command unconditionally Date: Thu, 15 May 2025 10:27:21 -0700 Message-ID: <20250515172732.3992504-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> References: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x430.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. The stub impl for non-i386 targets retains this no-op behaviour. However, it is now reporting an Error mentioning this command is not available for current target. Reviewed-by: Richard Henderson 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 | 11 +++++++++++ qapi/meson.build | 1 + stubs/meson.build | 1 + 7 files changed, 39 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..d810f33efec --- /dev/null +++ b/stubs/monitor-i386-rtc.c @@ -0,0 +1,11 @@ +/* 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) +{ + error_setg(errp, + "rtc-reset-injection is only available for x86 machines with RTC"); +} 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 Thu May 15 17:27:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890219 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp3269203wrr; Thu, 15 May 2025 10:30:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXxw2nNDY22MMcy+DqR/NjlS1JHuh3BK7Ys0vQWSlAXdvm8j07rIIramGGoCP2KNHBH+UZNZQ==@linaro.org X-Google-Smtp-Source: AGHT+IETlwhBonH1SKtZO7o0dRPlvM5c2AVMwbLSpAyLgVZedpP/75xQHgNH1Frm521e2W7nzCs/ X-Received: by 2002:a05:6102:3e8b:b0:4c1:9738:820d with SMTP id ada2fe7eead31-4dfa6b4aae4mr769582137.6.1747330202178; Thu, 15 May 2025 10:30:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747330202; cv=none; d=google.com; s=arc-20240605; b=jRQuj4qXnbZgGahXipXCiFAnmgqj4n/s2Pvw39dYVSYzGSshb+ztpMz1VKgvBbPSrb lEExmyZqLjVrG4YCIxYPDY+gl05J/b0KarcEg+D9HR//6YC8ddMOqyTW95K68QQUZciL 9ZetuDHiKQRLb1RW0yswEbWPl4z9ukYdIEuxmD4Zry72WCeNhC6azDTD8Mt5XAP3UIPH IPkTwTO/97s1qLRvHgJP5GLkcvU0wzIAqv2zsmIyxLFv+lX8HnOgqE1zhw9Zx6sdRqgG n5NfxX1YDWb+xhlZ/3Eax5hRvfAwmYoZO/VJZHmiGArxyLg5wHi2pft7TxR84tR0qO1u lBLg== 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=JBmZUu2xz9zNrRIusKpD96krKv5u2Eoq/yUy1aZuXB0=; fh=OJpaBvMmOsDyDUaboK7XVT1jzhwiftmC9hsBKL9dJIk=; b=ad0UMnLsZELHb3uuCaqwFGmDed/M3xhvOInlgZ+EnCS15g28miowQ7FnPUbbx9argC sE3bCuD79EJDCEEV9o1WQACk1OJ8cY4Nz0XV7a8WT93Rg97oZ93cIlqXQXnT+cEs6frA jcJUnn0Sa0frCxIO3xgZT7MOXM/Ae4UqwO2TLlO9YrGtX53zTsvCKoDEZpQDXTLfSY8j 0n7/6jHcIM4+OmsQxAy9DMFAvU44xqeHZIo5N/qOG5Rwf7DMsy9Gm/ArCN+RYxoshZ8d ooLqbVyKSCnAbio4nAooNlhdf4JTDmw9bdbrA9e0UrRaImXMsAt0tuYCyCq6ViSndflc rYjA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mCox1a6W; 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 ada2fe7eead31-4dfa68bda97si226330137.586.2025.05.15.10.30.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 10:30:02 -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=mCox1a6W; 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 1uFcN2-00089g-Hd; Thu, 15 May 2025 13:27:48 -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 1uFcMz-0007wr-1s for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:45 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFcMw-00024F-O2 for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:44 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-7418e182864so1404633b3a.1 for ; Thu, 15 May 2025 10:27:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747330061; x=1747934861; 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=JBmZUu2xz9zNrRIusKpD96krKv5u2Eoq/yUy1aZuXB0=; b=mCox1a6WmeFsI3MyYOBtgyjSf8tgNAPytWjS0DlLQZeSpUHhOaZtf/ET2ksl8iB9ie +jUGkGE+IqB/xYy6ZxR42BHbmEafULzLa7CTFEBuKE+pMXqkaYKEXdhmmV+UtqmdWqYx C2xejM3ojOE9aV6xehvwY5sISUy+phjOADUP2jIqY3ZbYey7uH9Beg/EDNgodTUswx9M T1sS9k4L2Q6Dz/mDSMUyfUv1jfDLRwp9QOUV8NHybaVh5kHZrrfY8OjOeNrIIYlXv8Rk 8lBdPolDqYww1R9n4T6+e6ykESPGgE/eX1hCnzYsi89zR+9ErNqlLgyk+l8o3hVFMn/5 qtDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747330061; x=1747934861; 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=JBmZUu2xz9zNrRIusKpD96krKv5u2Eoq/yUy1aZuXB0=; b=TEod77NubFkeI4wPEPdE2r9W5xQpo0fYkcXIMYev/W3fK1EhBdt16D5QKGU9/p6i69 OC0uNrMjvuAx2E45dfggCNyOfy9uHnAW8uD7AtrM3YTzUW5oBDVOZuH3zIcrFrVag86C /gvK/qOMpxn5aWEcKMLA1wk4BabXfnNYh5pSbZh8FeWOH0c1W9OIatUTo5af3uIK/MqX tZTme3CZm9iNsx9H0CWVYrxp+SBezfBGW1ntAb0Qm9uSAewhUq+R1XGhP/3gjIwYZVDP rxJSey/4lCT2xjJi3ZkkfVrU1IuKscYoqXyr98e/mrDngk1IwjR3U/pENCeCNlAH5nWK CvZQ== X-Gm-Message-State: AOJu0YyuTwUlEn/8OlUe6NQO40te1hMAc+VToeZZxTikFo2o894RsrHs N9xyTsciqT7vxNRGMy27hADiOxO1Zx5fRY3tlIZ8PMAGJxjaM5AzqFKbf2Wl5vlyYxXtuXLpmhd mGBtS X-Gm-Gg: ASbGncvQWzvYKIRgyQDO3wPwIBpxQEdUH6PN3huVnR1kZQLVNGx+mYm9aiYmMCf7zqr M5+Q8M4mg44D1bOCm1i5tYIuM80i086kl9kRdI7RR7Q7fgbeY+G+9rkOvM/ktV815ep2xlP98Z7 nTIijPBmiyVpxhohfdDb0CHqSiIFRkuYDHdb6eU+kXTUXduTDK5CslPu5zrSMZlUI5Zw/jVlvTk xpg0eF1m/Jh7DFI3kHaQBYhSLUGb+nj9PQfZ87gsLx1zk4ivX/trh0vaijDUJmaSBifxS+L7VJn rnos8GawANUumFXeaM1PHvnn400Cf96aHsDmp7c9NrHT3K117U8= X-Received: by 2002:a05:6a20:d493:b0:1f5:a3e8:64c1 with SMTP id adf61e73a8af0-2162166e6bemr566109637.0.1747330061221; Thu, 15 May 2025 10:27:41 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a96dfa9dsm79730b3a.10.2025.05.15.10.27.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 10:27:40 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Michael Roth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , berrange@redhat.com, Markus Armbruster , Peter Maydell Subject: [PATCH v2 02/12] qapi: expand docs for SEV commands Date: Thu, 15 May 2025 10:27:22 -0700 Message-ID: <20250515172732.3992504-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> References: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x436.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. Reviewed-by: Richard Henderson 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 Thu May 15 17:27:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890212 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp3268341wrr; Thu, 15 May 2025 10:28:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWKz9pAPalILgr9RGOerXq1n1yPpCdyqNYnEoOyFUcdATkwHp1WCY3gIZ5cbJZ5BkERPUBZsg==@linaro.org X-Google-Smtp-Source: AGHT+IHGqvzd2BaIYe0qloFYk0+i2O/6OxVeCXKktBpS/Ne+5bRT/FZFFPZvDENzFZGgrA09qjr3 X-Received: by 2002:a05:6102:ccb:b0:4dc:819a:9bf6 with SMTP id ada2fe7eead31-4dfa69471a1mr1117708137.0.1747330084163; Thu, 15 May 2025 10:28:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747330084; cv=none; d=google.com; s=arc-20240605; b=eGyi1r4ItV4y4Srn//T3KIovkTtIWuwzvv4brFa1XVWM/2aizTEEPhFbusUs7QpqiW OvDFkgdW8C6AYO5voq/JxAupAG6SdrOQ4jpWQw+phFGt+GulBN0ZTfhQCz/TRt7jMQ2V zQKtRvtctSOW+OpPozj+M2Kpfnv/Pdm9orYnqP/4HQLZ2e3Ar7NnkA7DQDYyaHR0rTdO AU2GBz7xNSpYam+p4ViIPCnfsRpiaDCHVvxBWvEdZ8V1PccS+a8MsqMsG4tHXpaZmmkI Bm3HjZtfofwIwCl7pHXBepkpmgWLami41DtcqGhdrLIfrlwCacKh/zg7ew5LZ0N8DVP9 j0NQ== 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=yvd8n19NfSUOYmCBRX4rmXxOjlvdNI6yAIKrMUvuEIk=; fh=OJpaBvMmOsDyDUaboK7XVT1jzhwiftmC9hsBKL9dJIk=; b=kzIK5IqcBIy14WdCLyMrm5FRsAGOMzDBUSkKA4GGx8O2JiYW2U+SuxZWkGjOYqfHiG 88eFAUaUCAzOpGb16q/SMBtqQ2jE3e1d1e80XS8uUTML6OpS4SNum4w1681wI4hdDS1q 025puTzU+3sB7uyCgGf8l+ZQkNr+Rd2WbnZR1AlaHpKFtqH9ntmMAxBydUVKFxaIQNht 1JlOI1thfFueFIt+lpvB+P2Lsg4v3Ls58IXZBZnsfBWWlBu28hA66efJU9ZH8REkXpiT MLwqTH88tVYIThpgglpsJnFNGUSP17yVH/GJcTVF9QyEXFrGYdD4PUXJw1tBnyYEymmh QfYw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QK+cBDzQ; 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 ada2fe7eead31-4dfa68b87a2si244735137.500.2025.05.15.10.28.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 10:28:04 -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=QK+cBDzQ; 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 1uFcN6-0008QY-5l; Thu, 15 May 2025 13:27:52 -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 1uFcN1-00085U-0Y for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:47 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFcMx-00024j-T3 for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:46 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-74294fa4bb5so1832457b3a.1 for ; Thu, 15 May 2025 10:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747330062; x=1747934862; 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=yvd8n19NfSUOYmCBRX4rmXxOjlvdNI6yAIKrMUvuEIk=; b=QK+cBDzQT2Wke5EPsUJWCP5VdqtdDCarflGezdnKcZWd2Y3IunfS/U0U39aypboa91 UwQwgcC+ZMamzSHDlwfeFlH3ZRvZsa9os27HkXeNxts+ogqFoP6Ghu6IgMFfDOrKl3ZB BGVY3hWzhUep4BVxJuE+G25jjpmZvl5t44nn0DNx4OXEYBV6+QEKuAD2kfHvNOX1nlMu 3WJ8uuy6ybag7LHdPEOHB7EJRnNu8gTNZ181LHrOnQlfse9ay4y5OPR/gn6/64gkgqIz mUleWnh/gz4/Wzm3AG/nDpQITOe775fSaJs6v5eMj4BNsa1mBovv9OC9ZAjGt4H2kp9B LwUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747330062; x=1747934862; 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=yvd8n19NfSUOYmCBRX4rmXxOjlvdNI6yAIKrMUvuEIk=; b=EyCLJ/1EkIDShb8t4XsRqjJgcSKm85TH7ja+pyGSdhkcNEUYGfVEl/Ti1iR5Ce0n5h 3E2gHHCSTtZ/jd727czIFGTEzIp6vWbC9rOsU2lvo/88FBRsbdbnq+Rl/8LssRWBbkTA H1KRjjh18+jGI7+wXjWblWnxRDwlqqOUHIJCX9bvdCPkwsVQ5Xpql/51tX5B3x02gcK7 GGbaZbW1w5TKUBOhChQeu5WWUHci+r0jgEhxx/dofveHbcXjUK7Hzu2zbr0WC8OdYe01 YPe8DZdTszfw0eVrfPiJq+SG20C3zahfept1/9T1ynI9030tLgiimHbVlHFGGd+mZDH5 Tz0g== X-Gm-Message-State: AOJu0Yy0ZPScNl6QrJEj/NMsNTZZJAuRB1d2EM949BhPjibLjxvK4/1Q 37g6/fsb0Ef0MtcGGusJs9NSYMwwlfspwV9o9AVKLW4lXk6JtyGlSsal7yRl5j+wcyUn8MO9Wn7 D416t X-Gm-Gg: ASbGncsFcrCVcKUDKcx/Vbj+MIc2yUMgKmWU0fUsrXf+wfqe5qqITOwUE+seW0k2lXU 5dpjzYzH1HKt9Y4HNsCOWk+orTe/hZM+NnHCePOj8Z5++/6QpXzpiycdpGOCa+d8m5VfRHCjZNr Syxl0ScttD86Xlb3RBvFKqe2JECnZmUu8oyXj+q8hpYrhWPpCqX9+yQLotltOGLr9N4PT59sCFC pcicxXU+oGlSCuswaxBxx6SLFKGhDgnRRzlaWInnow2Z0QQRC2DomBZNQkjl9ZkQd+FXvwqX7oH 7x9Qtj3ceXKy3CgtLioDLXygQz84eDiyGwSgwtL4yn7Yc4/cJAY= X-Received: by 2002:a05:6a00:1994:b0:740:67aa:94ab with SMTP id d2e1a72fcca58-742a96369f4mr294078b3a.0.1747330062126; Thu, 15 May 2025 10:27:42 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a96dfa9dsm79730b3a.10.2025.05.15.10.27.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 10:27:41 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Michael Roth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , berrange@redhat.com, Markus Armbruster , Peter Maydell Subject: [PATCH v2 03/12] qapi: make SEV commands unconditionally available Date: Thu, 15 May 2025 10:27:23 -0700 Message-ID: <20250515172732.3992504-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> References: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x429.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. Reviewed-by: Richard Henderson 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 Thu May 15 17:27:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890216 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp3269119wrr; Thu, 15 May 2025 10:29:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUXzqayrV/q/to6K8Ua06KByDAFUjoA5J/dUIj6E8BhbivHobbRRRt/S5Fwn841umx03Jm3SA==@linaro.org X-Google-Smtp-Source: AGHT+IHz+HFkSort4SUMQ76Br9NpdIaXPqUN8Ae0J1uv9jOsHKCLal+5C+kh/yDiqdN4O/X3CK5j X-Received: by 2002:a05:620a:6019:b0:7be:73f6:9e86 with SMTP id af79cd13be357-7cd39e1b140mr717436985a.20.1747330188951; Thu, 15 May 2025 10:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747330188; cv=none; d=google.com; s=arc-20240605; b=QI+VnSINp/UIQBicNgEJ2RRy78J0+eW1RZP27liukFZCqTveoRQxyuh+PsZF/G3JZd v/HD2WZg7GtbrxX8uBrmgXYrvE/ewdrsXbnHu3XE2sRlMW+WMRKjTudAFPDprs6CwplJ ZySlT6v9dbrKXckR9rIzn/L4d4cqvg2kVrzmC8EDDOubTxQb4WGkzmYU64C1+UeDkN4/ EYj6pBW7GW8kwocg01ZDwgDEFjpZ/7uauBG0vtksGyVAKuDwXUIwRfpMyMncWvSx/H6I sr5EhMhqTi97Qmz75BpUhJK3z1N4GRsFOJ2vjes3nrPB6Xx7F+MFpi9flyv92tBm7h7Q SKFg== 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=otN1ZYxqLIukz5ceFORIX+3/pUpnYfvslClWMIlE2/E=; fh=OJpaBvMmOsDyDUaboK7XVT1jzhwiftmC9hsBKL9dJIk=; b=WDHZO/hF7+WKJYjl/RjEbIVNHq30xg7Ayv/i6L2ja9lBwYrBZfialQzUrAhLAPEbn3 hpYV5RD97FiFRnlD874THByYUynas0x3rl9Ad8rD/VTY+iNIE89PBUjgAWHS5gxMUMVw 7EpVCaFi06kPo144cX9P5mOWQIDWUDyWeYOaLETor+j2B8rTcDaf8NP1AJ1x3cuT0ysE LMz2WbX0RIDccKvEHE75jiXv9OoG7pj6Xp/o+ge4V/11ePFPKrfLK5VJxaKQVGqNtcMb w+fW5pEVjwyBbAa/JDJsqJxH+iA4m+eQ/UP3hAUlmPP8M34u/+SnG3s7e5kPy87kSJmL 2p3A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mIFk2dlY; 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-7cd4688c506si13868985a.303.2025.05.15.10.29.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 10:29:48 -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=mIFk2dlY; 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 1uFcN7-0008WV-LG; Thu, 15 May 2025 13:27:53 -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 1uFcN1-000864-Dv for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:47 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFcMy-00024v-L0 for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:46 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-7399838db7fso1299728b3a.0 for ; Thu, 15 May 2025 10:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747330063; x=1747934863; 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=otN1ZYxqLIukz5ceFORIX+3/pUpnYfvslClWMIlE2/E=; b=mIFk2dlY3M5Fga8pDPqGHQNos8XVmfQIwpv5zFyemVf1WryUWasBySwygi5vww1X9x exfRberrgAudnTcAg0wxRrFGWB2m0xvx0FYaEk/ZuFrk2PiUSxqDEKZVmFNBYwQ35PG4 I34ty7UQRdP4xh4uH2oOpBkT6eRhdSX/hRFLFzbQ0brMUjVK/eiehGBF4Ep/srhRzlNk hUSperD/DtYLyuokszStlUC9NvwmhjtN1YaDcHhopbBJPlthmR/r9oZUaaXmVE9yxNC9 wJJcah6mPVs9v5pZfQp/6PQr3/wlXyxzphmSOs+CpXQxL1eMllb42THlJVD1ld6vy5x0 lU1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747330063; x=1747934863; 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=otN1ZYxqLIukz5ceFORIX+3/pUpnYfvslClWMIlE2/E=; b=kCXng6hQW+v8jxJ3JA+MddRsKxHmlNUzH5AXO5K/6LNq3JPdGnPDFFBp7ysQDSKnOs bRQhFhU1RQB5Ao2VaE8Siu7JTlpoc930OC4k0cG12KGmRCpx79FnbatfcsmPIbIBOT4L SFdGiLetrskvmDF6Cn70KFg3iCnyU3C9hQU47zUeIvklxqvWZigbW00XCTLUDyZvkZrP OUBvw0OwGXGfEkQiTjH9te6uZrfmH3u9Wt5Tkf2ialOCiLL1tlueIQDshdCqpUVW8nGx 0LktayGRBei3vTUj3RXcrVmIZGL07eUaz1xYxbSeEUmBOulA0DY8cBUUi6XiPBLQKLi4 Js4Q== X-Gm-Message-State: AOJu0Ywen188F7f0kQV0VgsZBn74yE6VH9qWUUWXcnYZ4YgCcya5+87v FBGgtRtLBmuYuT7a5N17DyTtK53GIE4hS8K3Q0LydDpURhQHDokKef8kmH2WJfB/4LcjCo8fjfM 7ixwP X-Gm-Gg: ASbGnct1Z+dt4zW3K339obIH//SilvJer0pZaSupC7hDiDghleTfZvD7UaTRWmlvdaY sQqRVdUbbg03BVWqIedTSd1QrtHdAb8TkROWkFk0UM22dHgb/1gSLvanXtjqVV5ZWrnKEnQVmfz YJUzv+WbTQYuPaz/qR4Gga6LJlgvHrCwFPRHRxpQ1XQhUbpKpa6sx0sVwzoh4jItuDWSN5c1ZCf jpUJSpraEooMuOs+coCoj9S73LfP7/7ybr9/e/RYB7i0rIFzu2rqKm2S8pDwqPMmVkXsh9VKTeh UhHS28BODla4vZRjLgKzDijmj+Hv69GzZ4jwqyQxTY2mfAM8hQg= X-Received: by 2002:aa7:9a8c:0:b0:73b:ac3d:9d6b with SMTP id d2e1a72fcca58-742a9a282demr219937b3a.4.1747330063010; Thu, 15 May 2025 10:27:43 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a96dfa9dsm79730b3a.10.2025.05.15.10.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 10:27:42 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Michael Roth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , berrange@redhat.com, Markus Armbruster , Peter Maydell Subject: [PATCH v2 04/12] qapi: expose query-gic-capability command unconditionally Date: Thu, 15 May 2025 10:27:24 -0700 Message-ID: <20250515172732.3992504-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> References: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42f.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. Reviewed-by: Richard Henderson 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 Thu May 15 17:27:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890213 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp3268355wrr; Thu, 15 May 2025 10:28:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW7CZy7Z+M3Egpa0z1g+6ewyu9JmAKwfDTTbPr1j20Ne0xJ5HDRQrbJAe1c9+XT7S4m3o1Tuw==@linaro.org X-Google-Smtp-Source: AGHT+IFDovvaPSBs18ui1AZaTDD1Hwt8wa3TNw8F0DX42MXWZJ1Pubqe/h5kUf/FHEfCpPkT+Cve X-Received: by 2002:a05:6214:240a:b0:6e8:c713:321f with SMTP id 6a1803df08f44-6f8b08dc65amr9661106d6.35.1747330086800; Thu, 15 May 2025 10:28:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747330086; cv=none; d=google.com; s=arc-20240605; b=fWJE/qRCo+0nxHZXoFXBh+6/gvh2U/loRGeXM7qro+JjdOC6+sinvZv2aqwXHlhtG7 nwnScBvzg0M5WlTvhQZdmW3D3w6vWoCPZYiuA/yHBp+0+WbPe18YbQwKoaabaTeeuiaP t5qNeGhAkHRv1KDsD8+WRAEcmxsSSZzwWz6mLNTBSA8mWaE9Tu9o3kkbr6fa97/bxcRp e1Htz5wGZ99EB11doeCqCBq4bVrlLO8eK8vrM16jAo/zqK5Yk9qG350fVQbbzZC9YGTB VHsh8U62fmwU31XOa16q2KG5knmDHGtIVDOo17dh9F2D3ryEBEsMCAhpO9Su3+FyAlK2 dr0Q== 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=IpZQezDLNs1bWZgYz4PCs4KujcbY96LROEFvSXsm75M=; fh=OJpaBvMmOsDyDUaboK7XVT1jzhwiftmC9hsBKL9dJIk=; b=Fa1w8OPAG7tdNjx+qzuw/M8oipaDosqwYX1G1yod13cPGn8zbczgBN61Q5njJMJLLc tbfXskkO+B9vfhSZddj1EFRQnRwLS6nS/S6Jl7d9A9TY1BVUu5KGCWSISAlbRI0g6Gbd xmG4bgN0Bch0LBqo47w1ZXonJwD4oXbE9Ipy3FqWDwYfeCQMx0azXSFbgBBG7PzHTmt8 /OLUfBP46kPGcX6HLAOlKP21A6f/n9EzeR0voCSjHurN4AIp4wuv/Qna9fn5gtJeJOYF SIgh6WT13NSrvZd+JrlNPaqDRq88TwGQKoGtMcs+WXumI+5W9wyesrTTGKZd11aFp+Te cy4w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f4Ock17r; 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-6f8b08b78e5si2738406d6.122.2025.05.15.10.28.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 10:28:06 -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=f4Ock17r; 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 1uFcN4-0008ER-1p; Thu, 15 May 2025 13:27:50 -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 1uFcN1-000882-P8 for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:47 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFcMz-00025M-BL for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:47 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-72d3b48d2ffso1352520b3a.2 for ; Thu, 15 May 2025 10:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747330064; x=1747934864; 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=IpZQezDLNs1bWZgYz4PCs4KujcbY96LROEFvSXsm75M=; b=f4Ock17rceju6YugXqKCnuwNujFg/y2l/3TIdYiqo79DwIjJpPeRkOhwtHtVKWE4jJ oQjrV2xM2GxTDQ94rGjZeP1x9IhjVRldGnxBWFzClckF9dV9vzvbe3ti1THEntD551Ts 7ovzwNxpKKPkNQ6fs11fcnQIu6nT+Z9fpPruAy3cXhKenDfJOd3aaMMwi02fiukqhiU4 WaMSrHbCLmh3UmrakMFXYkE5SLbG7w9dTW4MAAgMGxrYq7X10moato9cGsjY+2sm43fN Siz82uaoSiT0DkcTEzEvlI39M+ZFU3Qem6/1gy7vn0xRSep/xixDcfq5kuZ+guOtum5/ tZVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747330064; x=1747934864; 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=IpZQezDLNs1bWZgYz4PCs4KujcbY96LROEFvSXsm75M=; b=F/X9Akzfft0rDsWTNENxOKaJ9CQ3TulWrlJ9SGR2j3oPXmoJ/h4TzU9zoR2qjDD+22 8WpQ3HYctVAjjYpgYuF6TeayQY9K1DOdasNw9pjVPtJdMT9DUvommC0aH0x7hF4/wWOn 9ag9dVMpKvTahwKk4O+RY/nZ4cqt4VkVLdZjEj2mPMzs51k3x864UtRtdJ+WVMbm85JQ ncRP4gwQnQj0t21TvvmUgEH/faxYCs7xWcVOLqz+oezkN6lKpo/iWLSzDQRjQPj/S8YZ 3uc6RE1uxwvZvwzaCLPNNBWSjuzNjqGE0pPV13tu6LSLyyRLIZ3a5CFXmKmHvWCw5A5O vb8w== X-Gm-Message-State: AOJu0Yyvca+ve/el9C6H7JwSaUv+aASe6SdLuClkh4ZRbEk0kSsoLAPo 4QAh5MM3EUUv2gdWAyR9pe31HxWcEUH6wkOcWETTEGDGW8OAPsHRqthT4NIoWqZisTqkeDQTrj2 2CIuN X-Gm-Gg: ASbGncvX7PxANkKkLLGYsDqyPOx+eWdupdCbPOEsn7lpZqVYXKw1pKcBUDPGn+FLZ1d 5hx3E0Ri/8OqESDZ5WlPqRNb6FgYeRyMIzzRYXIpPvOFPeorWUEbpjkuxCHRQMpp883Z8KZRqUU GnpzV7CfeHHf7j8ug/LupxhUUDZ/SrM6knkq9L2oymXU2Vc/EdV5p9rdvrx1MzH1fIhHN4szrF/ BkYq0oVtrqnyxD2gsM7gt0liMjAbg5/zdyKD2dMgYyAsv85i77kaqTnf/h4MY+MWKq7Hi6l7fQq 9Q3CCP/aCO6TKPfFYBqIiZmFS0z/zG+RtcWcdpxtGLtMAVYCEOo= X-Received: by 2002:a05:6a21:502:b0:1f5:7280:1cf2 with SMTP id adf61e73a8af0-2162189f48emr529454637.12.1747330063870; Thu, 15 May 2025 10:27:43 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a96dfa9dsm79730b3a.10.2025.05.15.10.27.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 10:27:43 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Michael Roth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , berrange@redhat.com, Markus Armbruster , Peter Maydell Subject: [PATCH v2 05/12] qapi: make SGX commands unconditionally available Date: Thu, 15 May 2025 10:27:25 -0700 Message-ID: <20250515172732.3992504-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> References: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42d.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. Reviewed-by: Richard Henderson 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 Thu May 15 17:27:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890214 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp3268801wrr; Thu, 15 May 2025 10:29:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXPHnqwhPhmEVtKQUw3awOHA8Chhkj9v8S0GmQXiO+rKd5IPb2n16KkNX23ASu3bRoYHmmEFQ==@linaro.org X-Google-Smtp-Source: AGHT+IFQdXTcJH0Ok04W5KLZ1ZLIjskVRTAydD1/Kp24Ri72Pm8vQxsSEVmyjbnG9nln46H9Xaxz X-Received: by 2002:a05:622a:4c07:b0:48c:a62c:756b with SMTP id d75a77b69052e-494ae3da186mr3059761cf.25.1747330149834; Thu, 15 May 2025 10:29:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747330149; cv=none; d=google.com; s=arc-20240605; b=fUjIRXZj1vUyYc+rXcCsyWV5kmoD4MOzwWcxz0Dpwlw3BNp6Vy6dbAdoapfIjJ5U4e rjQo1oE65NjCUG+20t4X+LTPEll4wfoxI7lRyOfHS/8fyylPQAiUqUB45x8DFoQFWAOU kgnm4HlUuer0LOefUSS9m5STTFHhGMJwbI2GUnA0O69EHhRk+epTMLlI44uird9ERbw+ oJfsVGwNhNqJ319AK25VMmQBayjDlK71aOdK9BG0Dh2o1QhnSoT+4yXXsPYi0s5le2e5 QL7t+CzfC5e8OHF3OktguTIs9OzIjFJwOb1owsbmOY0SzoEDtl9eTc+YTGmOhACF/mPA fzZA== 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=Yy1N9oiYSYBkQ29Su06uvC5+FmtCDv4iNmAiWF6Koag=; fh=v5bZ+jv+JP2K5r+cY71WKiSe0+uaJ3JNJUOZlHRwX7w=; b=ViFTPijbamvZNGrnwpAwFu3ZcDm+08SUnRAaWW+LLVIbFK98rFLBpFxxZohSlLWWuN q29upBMlWjXVT5CubuMa5ycrtCeNnyyyY/hIGasepngiSNt7FCwgV61shMmZsLdQ7sOY 4oT5cUKY1dFqfs38FoAvVfXM/rVDnjrL9oCRT+6Xp3CjKj3S1fUiLmmUYU5BlnFyE0Ut WbaES1RgFoahvecCXMa21v2nZTF32JwE1THka4qFvRugZFSvE2LyLiSeyiTbmZOQNyl1 iVlvyZhTftOF90LJgPFCcDN7hxz7gU8nVnJ9RwdMqS5sMjMHqUvZu1DQLgezrk2Pyjju +PwA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ASZk1t2m; 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-494ae59599fsi671681cf.595.2025.05.15.10.29.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 10:29: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=ASZk1t2m; 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 1uFcNS-0000Sh-KV; Thu, 15 May 2025 13:28:14 -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 1uFcN3-0008Ek-FJ for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:49 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFcN0-00025v-LC for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:48 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-7423df563d6so1398924b3a.0 for ; Thu, 15 May 2025 10:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747330065; x=1747934865; 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=Yy1N9oiYSYBkQ29Su06uvC5+FmtCDv4iNmAiWF6Koag=; b=ASZk1t2m6ejzXgfFXk3Gx/y5QNj/aa4DlQBHBhePdhlrRjzcqHccK9JExxdcJwMf59 tYi2CjIJBe0G168G52+BBaCGMXKzKKeT0HvthAlg43VMIsT98wYen/ABEBE7Hten8ZmW RswX3QhBvMtJp+YCkAKNrs5WuoEaV2HVeCrNyrIruJCLzRuMjfn4RvF5WXE/8oBk/rLq gKqHEDz8NJn2HKTKHdI7YmGqL16o0uvDS+TRB1UvzxxERvpLRT0iE4q4Mt5phra4UG93 cBpvLtrFCCGJQOK7xvx5Cn01efpge8rDy8wFZbawQFW8Zz8GYFrreZF0Kppus22VBRAP mvZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747330065; x=1747934865; 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=Yy1N9oiYSYBkQ29Su06uvC5+FmtCDv4iNmAiWF6Koag=; b=n5vRewv481DDBLu3vkLGq20wh8y5Pex22hAYjJetdwNUqlqNap8NquqAKxVXIMCUM6 7yD+O/PeFZUiXAh3DKPv6f2QzdrWcGxr7a5ZZBbMqKFOcjv4MKcnXjljW61imAcbSEIb tQi9nSsBg2ZmeBaisE7U60gi+mdSACC0gNDFlTE0DmswFvc35a08No3Bnpsck3uOfUXF n4lt0pWY0PQnlur0Pve+RW+DdjkPYwrZD+/mKeGGukw4VYrc+onRp9I5V3L/hanB3qeO cAHFzxiwlGuXmsUyDrGjEL3+V46sTpS+DObA4hgLv76DlL3YW07+kLt9PgSA0REbeC+L K57w== X-Gm-Message-State: AOJu0YxE7u/ufUH+ZySpkqDc09nPNdVpnPh24vmvRz7O+26/GyYOJiWC k3XJsCzcJHsOUFyl/FcjznvO9syblXe/IBs4i5kIpT3VqqGspD+8AW0mu/qN68sFttKlLOIRKoO MsAI3 X-Gm-Gg: ASbGnctztZBXXGGpX3KyQ3Dt+JjuQlHGZJDXI3TT5//LU0+Ap+L0aJ62KDzv1l1i9yk GcqJAmaRgwoXjKHKPY6KldX/BRNRsfXuLtL/4KSI05cgTgD6sezXHOZbes6VaP2ic5YvkUOP5Cr Pam5jbNAzyUZ35fkDpJBCBTEjXpAegUlsYHxDV1BtbAMSFCCOrna8bUwaaWOnanLO133kaM+oqM 5H+bIB94EvS1y5ltPy3ugfwDGjprI7s0pA61fQEEo+lH/dqL5HlBntifp4Z2uveo7C0pBte89xa 9Q6z6WcXLn4iKzJCUUX3UGQQpxohBsf8xHIFCULgLzeqb9nz3tA= X-Received: by 2002:a05:6a21:69b:b0:216:1ea0:a512 with SMTP id adf61e73a8af0-21621a03148mr429988637.38.1747330064831; Thu, 15 May 2025 10:27:44 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a96dfa9dsm79730b3a.10.2025.05.15.10.27.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 10:27:44 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Michael Roth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , berrange@redhat.com, Markus Armbruster , Peter Maydell , David Woodhouse Subject: [PATCH v2 06/12] qapi: make Xen event commands unconditionally available Date: Thu, 15 May 2025 10:27:26 -0700 Message-ID: <20250515172732.3992504-7-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> References: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x431.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. Reviewed-by: Richard Henderson 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 Thu May 15 17:27:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890218 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp3269197wrr; Thu, 15 May 2025 10:30:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVF3yTcp4ZAb4kjh1xHrHO3TTH1g4wt2bFxQzefG3DIJaChXOZYVfCd25VPW6HI+FG2DHK1cQ==@linaro.org X-Google-Smtp-Source: AGHT+IE/PSdjH0MnahtvppvTmA/Pf6axKLhWaEWPUFtqt5V+XTeg5lzRhndZMiZGkWINc9Q2+QT0 X-Received: by 2002:a05:6122:2213:b0:529:b2:ea5e with SMTP id 71dfb90a1353d-52dba8029c8mr948898e0c.2.1747330201265; Thu, 15 May 2025 10:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747330201; cv=none; d=google.com; s=arc-20240605; b=CBLiPWCKiUgNb7wF4qjt7Y1gPnnoPnN3iBGtRIN2MgU6pmyPgm+kVTHU7kahCszFrB qit8Zvi5fstUsWISsRCqZApv6I/TjhoxKOfkF7XLLJQ76rNMLIBnGOPZhi2O185Z1sbf 9OnjsBwxaVXoakJtLZ5mT7T7g1/axktZZe/qG8PVmyTT30i8L5XvL52PCBFWZm4VWXR0 2oyRXP5TnO25sWExX0CGAKVY+1IkjwcKh9IX17mnBvbSH7VWf5f3gUWNIzi9Tsf9DKNq V9SQClMQ/a8dRuvS7dS1914K2sDKokmhmx0PODH4iq1X2APOK7pirXqXZLmyPFlgTb1J SKPQ== 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=CNI2BFFgTeljdJ/HtYFFxLLCliw0wPHFB2HapKUt6b4=; fh=OJpaBvMmOsDyDUaboK7XVT1jzhwiftmC9hsBKL9dJIk=; b=lta/F2+iSYlbcXPV/ZllKbDnjqqgJGMNrmQOaDMTsxt9+kc5/+/mQUsk1cG+9f34zO nrxrQ+JgZlF/Y/ecBJgVr8RvTnZ37EMzRVnzEsbXwFmgo/FqNkKauUeHmayOw7deObph b66ffZ1Sh5mv5JblaAXCNWedpX7aG1G1auTT60E5H1KFhZYgo+xUTEVhxlLyHnfXFo6W +UEJch4TcVzjnkXYTmJrjAf1Byi0AQ35npasWHzvFUOldP6CLnv0MbQb0igAfcLkSn4x LqRluBQdL/BcT0aZp9vyO+VSx87n9eFqKguQPzaVYrhIH5c0aBZQZKEA0OjvhxwTNq3Z NB8g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c2Ib+CYy; 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 71dfb90a1353d-52dbab8875dsi185964e0c.249.2025.05.15.10.30.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 10:30: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=c2Ib+CYy; 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 1uFcNZ-0000iH-8o; Thu, 15 May 2025 13:28:21 -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 1uFcN4-0008Hx-BI for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:50 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFcN1-00026e-99 for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:49 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-74264d1832eso1674330b3a.0 for ; Thu, 15 May 2025 10:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747330066; x=1747934866; 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=CNI2BFFgTeljdJ/HtYFFxLLCliw0wPHFB2HapKUt6b4=; b=c2Ib+CYyfD3gs345IJ1hW4Chv1HTMXFmSCzoY+JX9iqbvHaKuw4W80wMtOvO3F3sds EQmelCyrGYgoaeCzu7So2kEry9r5I1BDsHMcKO8wGwq1ef0BgOC1bDZv4AIf7AwK6udN DijLEJ71zosGcaKeAWIah9iRI0rPsNZ2pnRxQ8y7629niIZ9YpU6gvpBsl0uPHzwtp+8 +lQ/8UbZUwgU9H3BnbvNgo0cc99mpz+vqcfJaLoelnV+3szSYKayMgZzeQT79Gu3TbnJ KyWJtkKw62ou4Odv8dBi5ovcOBq12IOFjTfUfqsgjPuBa2C7j+WquBRm/qmIsG6OvG5I 72JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747330066; x=1747934866; 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=CNI2BFFgTeljdJ/HtYFFxLLCliw0wPHFB2HapKUt6b4=; b=m8Z2qQDJ+EQxBaD2X9mP4cKqDkFRvg0wXbWPi7Bpt6Kwj3+lr6s7bvyUQIjKEqgVmF 5VOHmoWb91vpjqhCCGXLNOm8joUgE5V+vu1J9fret8skrs3Ud7kUjSE7yrRgEbjUe6Xe UpuowZ972xxUvzd4OPE7+HJ0vHcxFHnzc5b2zfMrNbTuygaIP6HLHuMDKptOUgm0HPTE m7EwhotCfXgN2DKCk0ES9rHnMZNm+rPD5+T1NyI8xbuyv+nnyK0A7QKRmi9JgJasQUNr tqnYKRtLRN8pyol+abJ/1GTDIblmtvDvW4sWRvfuLnKx98/YSSDfLiBUlrplYuVR3gPh Eksg== X-Gm-Message-State: AOJu0YyVTcfswMjn/Ec37Byove4Y3J6hy5Ns3Zq+nJfxsxaaPBMkzSbS 2MeqRmZaBbhJQOMK7VGHkBg/MnhPcb5NRSuJ3jcaxBdxBLWpsfD3hs/PeG7aKMB/PDqZUSVBGlw nqYhF X-Gm-Gg: ASbGncsst6Mo4amH+Y/mncq6IiI/FCYcI8UzJSzfYqeildpB9yEnR3r7nGrT4Ryabpc wx2xb0YwmDmgBlqesKaupt/g/LDM6u21tQojuvzKVn6IhqbCoLUY9QbzyZeh8M5GE4HwqWNGL2s 7uMMJ7vphsJd4MFQyQ68HhgDE1wntEMei1v8bSQo+bZuAVM9ZWZZZGVEQO+w5XCtlLQyUty5iWR KWjZzwI2ODUyMl4IcjdnXklwoQzCdJddEAcrOi5lqvoSE/cF0Y4hLNe1HFWawW+q/kqaIy25Q4N FrEP/C5oIBB66hOy7P7FXK4Lo7AFbgjsFTvwTEDjoFet+QSUija5afCU2e8chQ== X-Received: by 2002:a05:6a20:7287:b0:1f5:a3e8:64d3 with SMTP id adf61e73a8af0-2162192a995mr497853637.21.1747330065758; Thu, 15 May 2025 10:27:45 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a96dfa9dsm79730b3a.10.2025.05.15.10.27.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 10:27:45 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Michael Roth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , berrange@redhat.com, Markus Armbruster , Peter Maydell Subject: [PATCH v2 07/12] qapi: remove the misc-target.json file Date: Thu, 15 May 2025 10:27:27 -0700 Message-ID: <20250515172732.3992504-8-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> References: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42a.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. Reviewed-by: Richard Henderson 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 Thu May 15 17:27:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890215 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp3268858wrr; Thu, 15 May 2025 10:29:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXvAZJ1Qe2p0ZDFgGvfobbhM0Fskai4dE/yMTgGlNfpHI3HKKQPRlhdhx0HxM00KJW+S3Eskw==@linaro.org X-Google-Smtp-Source: AGHT+IHuix6/Ohh4phEDn4OqDgr9y2rUlWAhtqMuHp0sIGgbB4tOYMHg+TMZ6jqWtshTpS3P4WL5 X-Received: by 2002:a05:622a:22a3:b0:477:41fa:1120 with SMTP id d75a77b69052e-494ae3866d0mr3877241cf.12.1747330157108; Thu, 15 May 2025 10:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747330157; cv=none; d=google.com; s=arc-20240605; b=hHxA2hck3azNgO8UA6+xFRv6lUlLWyKUtmqk7GvUAAReELllyzyCHYICGFSk7MC6Ja VnO3LHD/EYaRUWVkKUaBz1Co8fS3GX557Zysq9bCQ/VfTNjtDd8Fgg+IW4gWD6sycHXD uKhcWBDZTs2nKXpmcjka4bEiYP7OqcMHTxWf4G8nxS988YVWzwBHba2L7gF32FNtcHW5 TfuKPyNGhaLGiP7ZCATXGbEMgy1XP24ifQSLBxKobOV8QiAhTVKFndFOISkHpYydSHmZ KJPcxR3ojEIeUJjT21ymfjcBbf/uARt0AO9cQ85N1ySLWjyH/xqVzBHIfxSCl3S90sjv VEkQ== 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=E+mqRJjW/uNU+WmqEgMnh4Q0J4iLqGLa+X8vg8xz6/U=; fh=OJpaBvMmOsDyDUaboK7XVT1jzhwiftmC9hsBKL9dJIk=; b=M+tJckYcYI6h+7kQCNYddTUU4m+MYZOYvkxOH/4xHtBOfNsCQs5ajMt5foN0vRd7ah wPNffbtmvmg4n3l8M1NzCQJJTSjPxmJojbDpeP6zA0uEY/qRFRobb508fe8Q5uIb17Hr pMTU+daPuMHbJqJ7hGUZK78raBJiDv/J+3EJ6iAyjmAmZpxRlx+ECHtQBDW+p6mhG1Xb +6mKi9RPBGnQ4omBwDuFl9gHCVs405MA91eBOsQ4M0StWDeWwACApdVXwqidXggZTiVx TY0qesDKlH+Snde9+sOR6VKuCRnNa908S7uPpj0n5gu8yBs0Ij3wzFy2ffX4Y3xpj7gF nIdQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KKZDqRVu; 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-494ae560393si691671cf.292.2025.05.15.10.29.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 10:29: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=KKZDqRVu; 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 1uFcNV-0000aC-12; Thu, 15 May 2025 13:28:17 -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 1uFcN4-0008Hy-C8 for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:50 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFcN1-00026r-UY for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:49 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-74068f95d9fso1188152b3a.0 for ; Thu, 15 May 2025 10:27:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747330066; x=1747934866; 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=E+mqRJjW/uNU+WmqEgMnh4Q0J4iLqGLa+X8vg8xz6/U=; b=KKZDqRVu6WJmMaeHaTX83lcSOtJUuZKjThnNMj/deUZWxrAnBQW80FT07tCIZlEGPJ VVdpZRy46sFzW85KzVmy9H2ir+z8kko3ld+7zATi01uw5G2oQv5UArAkfzbOLCD0KeXG r2jzonIyjF+sfqUC+aYAvzH3a6lEjZM8NYvnEnINlWwTy7Mjosx+F1IZlO2x6LQWoE9B lIjdZ/AwK74cmQUlbRDtx6I+vUmAWsf4JBeQvZZv8aFSF3dUG8wwqin81z2QteLVIL9W n2n13+H8O5cUHeHZrcTWBAL/29745fmF7f+jMYkzdIScGkVli681ZG+8FvRNkr7WUWvp yvCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747330066; x=1747934866; 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=E+mqRJjW/uNU+WmqEgMnh4Q0J4iLqGLa+X8vg8xz6/U=; b=Pop9JEGvS/bXxempm7bzgV6g+8WMmHx3hOT9v9WzL97ZYTdzHH6zZHithP41P+Vh+i VXumNeTLn7CIfsYr/tqXjgi0YkbnRm+zquIbCqt/9rZbgw3a70TPREm017ObQMQAwqO5 A0fpyUhlQHn9gr4iANc0amnIV/XoFAP/9LMIgJUONw8ilM9Hg9DfDL+mto7AlVi/ce0s a9BoHlC0yh+ryqxvaxMqxeSE5UyD76p1M9z40C/V9H9RA7re0l+ejX6ompYckhjSxjjJ sIH7CUkCUZuUXeps/n0ax/d8eIW42PRN3/XiFoWrU71bz/P/RnpK+u1tyY1KXP/AvFi+ KoMw== X-Gm-Message-State: AOJu0Yyqy6qnaeI0CQcTE3KpUtyeeVo71drjpLS/6qZ7FevgkZOqXjPV Ta1u0Bdnuz3VlIccALbrtvi9vcVK+Et2SS8lkD/APO75NvYAHT/v64yawvUdJU8kVHKqPla1Bh1 fsmE3 X-Gm-Gg: ASbGnctOvFsNyxekU/1Rexov32hgbERkW2yz9+r+VPv6JJ/DLYp+iLCHbkIayv5tVAC 4RNVuKOlkztdTNT/Cok2910CLc/bPVwD15VbxUJr7ufhAiKJxzhbPIYo1sHdkCKe3jkFkW6rRzd lXze4iOR+3GhYonaVBhfu1TjjMf+rMHFSgmiOZUEQyJLe1jAbyR5ybR7kwnFTpB6aXMKCZrzI9P DyiR+ENybIrcyZAgYGpvnD+2HVesQsey5mpKwJ8mysd0dKJ33dWxjygaIHB4KJkD9x7UPwf/mob i7pRyH14U6yAz4YHuy2WqAUS7mAYWUIi0wLfF047M6AOsGEkPTI= X-Received: by 2002:a05:6a00:a8a:b0:736:b402:533a with SMTP id d2e1a72fcca58-742a976ae04mr257987b3a.1.1747330066575; Thu, 15 May 2025 10:27:46 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a96dfa9dsm79730b3a.10.2025.05.15.10.27.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 10:27:46 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Michael Roth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , berrange@redhat.com, Markus Armbruster , Peter Maydell Subject: [PATCH v2 08/12] qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic Date: Thu, 15 May 2025 10:27:28 -0700 Message-ID: <20250515172732.3992504-9-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> References: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x434.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. Reviewed-by: Richard Henderson 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 Thu May 15 17:27:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890221 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp3269574wrr; Thu, 15 May 2025 10:30:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXZsNB5Oev8vqMj+MFUgU+Lz7RL2+Nq6N+g6ru8qNKuTixae7sGxwpfT5YGHHLVP1BslzHMvQ==@linaro.org X-Google-Smtp-Source: AGHT+IHolDnaPeQO18GyFyVyrxOEs/9dzfY3ciOC3GmJ6fLEElSxb6hi23cMEMG0gKCxO0eTjuEk X-Received: by 2002:a05:6a20:3d12:b0:1f5:59e5:8ada with SMTP id adf61e73a8af0-2162187a945mr570787637.4.1747330243982; Thu, 15 May 2025 10:30:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747330243; cv=none; d=google.com; s=arc-20240605; b=BRyVDa6EXDlsbJ27ELr+VlJK0H7Dp1MT74C9XTFx6GdLR5jMtAflY7aEv1/JcjO+DU KbYwR8MbRofBGs/08mpwvtxHnylDEoDmmhOA+s4KjZkHE5Uk1sru8ictM9Tp0s8wFeeD lckT4njYc2ZNwNDm0LC6ZW6NeWJhj1BxzU1SupuOIcdsBnaPPLoDFHC6dcg8gnr/IqNi OzZtveylJaDeRD8gLl2qThqzvmB5/Q696f7iMZ+lhv+/DwGi4Nk43GqOBL3BynNTH3lb 6bU4/Nrr+HmKS/kOV4W5Bhh5DXgOwv73Q0rbgo7XcLajdLZrAN+3eXFFrhqNtokJW77m 4S8w== 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=/S75VeLd87oNOjUDzY2CVsW9grPZWTzktC5dbrQ243M=; fh=OJpaBvMmOsDyDUaboK7XVT1jzhwiftmC9hsBKL9dJIk=; b=Bs3UxHONVcb/Fna8s1LkEWKoX8am0/A38z4+Nb+6B53q6CI6T3VQxHV7O+rtMNhojW 89D90UZiNFlRaPQ89KUnQdzLkEU3hHi7UG/3wDg2skBuLQkN4aMNi+UPitNrOBQV43N8 l7ze74lsMPCLu32exhq8ApGzY8Y2I87xRkGsSzstmQkQJZUEf8soVzWuGk3hzbJATB7W YoBCL2gmqTa4tzlBhK3ymCL5jf7lqRobs4KM4Fqfbh/KfpG9VkHYY2FqR+VF+Te00i1K mktrqG5VFOsxdFyPUUIVxmaDDI7hhEpDz6i8NOMODX9ozFJE7zNjGbpR8d/HHLeRZ2yu ZkIg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=chu6WrkO; 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 41be03b00d2f7-b26eaf73b7fsi283095a12.171.2025.05.15.10.30.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 10:30:43 -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=chu6WrkO; 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 1uFcNW-0000cR-GW; Thu, 15 May 2025 13:28:18 -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 1uFcNA-0000Bs-PQ for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:57 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFcN3-00027C-UK for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:54 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-74251cb4a05so1780724b3a.3 for ; Thu, 15 May 2025 10:27:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747330068; x=1747934868; 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=/S75VeLd87oNOjUDzY2CVsW9grPZWTzktC5dbrQ243M=; b=chu6WrkOzc8S+a9rwu9WSpk1v6sMvEEugoSgOnguw19kEugVlNM8fOQBHuf2uY7jDh C+qX6X+H0ogqUK/FrbFn4U9ZjWF5WG4SAuPLm67KdrHxYgUyZocUsQutI/xh7g8BU1Hp J4+0gbPN6qPbtZH6GfwlQfIubWBQ+77FIYxgRNhV1QCMEgDWjhqJGs37T9c4N7NALngM d+FLF5GdopeU4E1aGnMOgPQcAxxkTTrmWGaWXHwXA6u4dhZCAsbOqsD+56HL0gXakyMD whZHoQAq1FkdkXLYlG1SNNkR6P1wDfuaopYIg059+HQuhS2SRJ4ByCIAHYeKt2fceq6v 2D0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747330068; x=1747934868; 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=/S75VeLd87oNOjUDzY2CVsW9grPZWTzktC5dbrQ243M=; b=AR3StmvyaHKOnWbNmQtVDnTMacH8V3fkN90rEsXiISCZtupu/r66gq4l0CTN0n1E6g 7nbDrnaGKC+smYVtvRD1sigj/alWho1CBkKBXkrO3fc5XVlft3zUNvXkcG8wr8gKFLdC cKjBu4e9LtJ0aejvPia8wESnJNUZkEPvFgo02Y/zszyym6eMuWzsnACr4UXY0BN0rWdC Va0CgNCn89No7iaro87UUY5dvOnhSY7CAAk4CRR9mkVvhjkWI+ppzEnarLyXdUBjzzPf ryq1PdrS7Z7hkFT7jjICRJUWIw0voK/HPCm/D5sd/EXgambffLkFt3M3qhDgR5dv+2Vu X+Vg== X-Gm-Message-State: AOJu0YxyQ04OpV6uYSOYrTqsJhy2b9EI+IGB3KAuoSesogtbTJdO/+5s XVgZJ1FnaR6cXkZwkmGl+yCHut50BEuIrJRBQ7RlVe8KJhASq8jRrmH9ta4jov27rs6MtAEpC8o wLDOt X-Gm-Gg: ASbGncutmb7EZu258te5hYouMvLRp0fRSY53hB8wNe3j8MNY/EyVS4QmWj5h+pkhTWm mqGT48vqOlFseLoXHdC8MMxnJ3SjmYCe2M/s9CRxCAw6eivEb36o2TK+GPlXKp97h9kIhJG9cTc Sj/i86GLy4k2WWFTt7t+bAiwMv26ta5cuFEJhgbSkanjm2NJPut65z/MiMk3La+L5IqZTttyWcx EW3dG4MsxHeKbFZPXPraPXOThfoH3pNL1y4z9StjGn6Jab5CrAZdpSSnUlI4OGLtmIvTVkLhQLq 2042QfCMokJ88gBPqk/BdgquMHqzh/JR43sjQE6zTR4g9ZHzck0= X-Received: by 2002:a05:6a00:1797:b0:736:6043:69f9 with SMTP id d2e1a72fcca58-742a98abc88mr240521b3a.19.1747330067544; Thu, 15 May 2025 10:27:47 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a96dfa9dsm79730b3a.10.2025.05.15.10.27.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 10:27:47 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Michael Roth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , berrange@redhat.com, Markus Armbruster , Peter Maydell Subject: [PATCH v2 09/12] qapi: make most CPU commands unconditionally available Date: Thu, 15 May 2025 10:27:29 -0700 Message-ID: <20250515172732.3992504-10-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> References: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42a.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. Reviewed-by: Richard Henderson 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 Thu May 15 17:27:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890222 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp3269603wrr; Thu, 15 May 2025 10:30:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUS10moYoePuSL1JosUFqbw37boWS70E1uu607YKTazrGUUde3Cblr55k8tcblIfj25ykYcjA==@linaro.org X-Google-Smtp-Source: AGHT+IFZk7vznBNx1bYlYIbYziovxOovyKyoPR8Pw/8YUOJkMux6r9x7pFEfHg7dgBZS358xbyzL X-Received: by 2002:a05:622a:986:b0:476:60a1:3115 with SMTP id d75a77b69052e-494ae484833mr3519531cf.33.1747330246455; Thu, 15 May 2025 10:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747330246; cv=none; d=google.com; s=arc-20240605; b=Bl60Fbax47zzbSuF4K+RMMtEhL7ygc3XZdoVor6D2VuTbZEujsVqhQ8Na3gSiX+PF4 UwJBf6LUR/vqRbz0bUWQBgOHSHzxZGKXXTtthUNtKnM13lZjOTQF4xrL0ZvB4TFkoemq zNYcWQFxtDHFU0VVkLZc/ZWT8JyDBE++TG5tjAuZO7u2/8ffzZjXzEKv9ht6DT5mxBZS GMhvKbuaJhYZATPEw2+Cn2qcpNEk7Q7Bl76PMUEuyYCaH6BBEHNAEsrmx6+zkaowGdg7 LBgguJGDTd/Lppzo7t7zJ9zD7ZWJxwzdXwjD5LTqCnVbyFi9cnb5iwkhfxkZW+iJVCu3 osGg== 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=JT9HKOvyGIR85i+WKw3Qri2Pqq+aI0uCMPYSVQOi6x4=; fh=OJpaBvMmOsDyDUaboK7XVT1jzhwiftmC9hsBKL9dJIk=; b=JUXBbznY0HS9PWW8+ZJhl0I2nnyrbFBvfaCBLhL0XetTi5A+FO2etN1VbXwpS959aD 3h3v537EukghKEvEk3UgNB1ogiF7r8G0z+eVgExcm4wwbef1dQ1ZSCk0RTxsC4s2KjwN a2oJSRA1OBopvbox2Gu2lzmVXwKRjG5Blltta7HqmQZefFX8C8+ZQLJkBoop6PjGQYPZ w1z6rBSBiP1pKd+UeCLqw5qpW7s533SqRJb5MAaC1npKYowoLod/1qzWLajJJ1/+sMkB ykVC13mgBFYlujgBtzz5IJ61WhpqySoRobcCuSHQdqA7eAomatp6plbBvgM3wxPh4P0f sZqA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=abh2I6to; 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-6f8b09978c8si2701726d6.181.2025.05.15.10.30.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 10:30:46 -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=abh2I6to; 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 1uFcNa-0000n7-Le; Thu, 15 May 2025 13:28: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 1uFcN6-0008U5-V2 for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:52 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFcN4-00027M-HV for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:52 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-7426159273fso1401222b3a.3 for ; Thu, 15 May 2025 10:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747330068; x=1747934868; 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=JT9HKOvyGIR85i+WKw3Qri2Pqq+aI0uCMPYSVQOi6x4=; b=abh2I6toYJZGD8U+GCDDV9uZFadUyx38M+xthAmowvk6ml/W87Y59zG3Sb+Gd1Br0h LkEBxjWUKuGKwDtNlIIcSAQyGYcGRHNEyE14JtnM7JBEn351BH7CMIXUQ/SnBmxt+8uh wAUn/TyDh6KteeVZb8S+ewlaYUZsi8uHD/R4KxHfP/RXTWEiERy9ySvOjgc22L/6XaC/ AccJlaYqDENeRAVWJ9aEYp8abkQI8X/AAZhxGtGDEIh0jz7tKxydngZWgdywtS2uujIh ov7itlbFl3O5HwaxPijEfQlNMmvC/pQzNpyPLHP/tXqZjQ8EXbcD2SdcTU1LjCK6Sojy mHQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747330068; x=1747934868; 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=JT9HKOvyGIR85i+WKw3Qri2Pqq+aI0uCMPYSVQOi6x4=; b=F4zanx+H4TlhsLlntVWkMczIVGkmUqkptIkUtpU8+A1xoLIQhdt6cyfDuxiZPAS2H/ x6gaS1nxVs5MtyQlvxfzAxGjSOpnRwXf0aIGACFB1994MJqMlxL1hL+IIGSWT+I77bGD THiAOk3fzshorZjJw/4UaUKbp9xQLmPVwc4APHRfV5S3epNMTLSWALnSmJn9619ptFQB xdY/L/t2TPYRPQjS2GjwHDs56aAfMg6XAhagOXoCdbXKuCB7t8J5PaUBzPY/HYzPLwa7 Bgzo+Sa48TdbSXUPHW5hrzvRGjRGwvlq1J3VsfTnrdLqReh5SpMkccE8t/9nhUHIoK6z 0BAw== X-Gm-Message-State: AOJu0YxvtyLx3bu/BdNp1ariApY8n+d6yptWET8rcXpGcvvf1sSo7c6e Cc11l5dXhP5dF1tF7QeXUKWeecjieSII6Vj8RzNfoSEshAfexiUwK2LYUjlebpvznAsL1Ysl8dQ cWRQb X-Gm-Gg: ASbGncvYdeYaQP72CZR992FEfEXIUxrzOjMQdVRaf5a54U+4Gy2Wg+NaCrJMVZyaBCx 6nGVtR9CXRV0GavJ/EoT2p7PsaCgOq9k08oL1ifpUgagf2Qc3fa/Jdbg9oMP/8hw669Mw6tbLnr rzHtWqmiEmiqjogYAOXGrspB2GCyE6OvDa+6IiMIIyn+Q6Cx8Qwg+vHmETWmuvCYGMasF90kOCI gXx/rFc3F7q2CFXSN2CS1L5FL9TNhtFJqprajNj1NfCCeu+in/gr3P/LYjMZya6tuoimCyn4W/j wHCYKRUhtsKeRqDflquNp8OP//4edvj4s0nPdHSBBPK3UyLs9yE= X-Received: by 2002:a05:6a00:854:b0:740:9d6b:db1a with SMTP id d2e1a72fcca58-742a98aa96bmr222440b3a.15.1747330068431; Thu, 15 May 2025 10:27:48 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a96dfa9dsm79730b3a.10.2025.05.15.10.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 10:27:48 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Michael Roth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , berrange@redhat.com, Markus Armbruster , Peter Maydell Subject: [PATCH v2 10/12] qapi: make s390x specific CPU commands unconditionally available Date: Thu, 15 May 2025 10:27:30 -0700 Message-ID: <20250515172732.3992504-11-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> References: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42e.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. Reviewed-by: Richard Henderson 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 Thu May 15 17:27:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890223 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp3269592wrr; Thu, 15 May 2025 10:30:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU48CzR1o4esSMkJ/3fiNkKsoskSvlYYuppXTJm40He7sN5FNqBvXP2DAGgUrBOOIRsvTiW1A==@linaro.org X-Google-Smtp-Source: AGHT+IHpfQiKFLDIyjFQiCRgpyqb+QPBi+dhCgutLttq4p65allbQoFh7fWFyeGCB7S646cZjINm X-Received: by 2002:a05:620a:1a8e:b0:7c5:9a1b:4f22 with SMTP id af79cd13be357-7cd467b9836mr49078785a.56.1747330245530; Thu, 15 May 2025 10:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747330245; cv=none; d=google.com; s=arc-20240605; b=GFY5WRrzUeyMqbXf0oNXbemxdqcQCbaxlGt1vjOr+ocYZ1VpPRJ7tTY5p4GsP5eIxn wP3TrL5xAMmeP7+NKDzI4NIVWvWg+PsISjK/OEVSAYgKPBUeNsVl3nsrS8+Ama2QI3BG p0tj1kUxk/yEbB2J0QRnNum+p50nsRBJCVKWxL38TCRGzwv65wQryCMVSA1oblqEJyEh Ja4ttYV/xMOoEfgoWLQYr4Kq/NYE8EVMvhb3NnPEyUHvPsg6LnuyannpSsWr8lUl8mPd Yy0u7n89/i80OFkCiWR+PtKnolo4r3eTks5DvACDmkznDj/3srM/Wk2kI/bMEFHMb6+g +irA== 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=gbuvyyDE6gTlrgir5RDD6et/JTOv9aQoK4kjj65E+Do=; fh=OJpaBvMmOsDyDUaboK7XVT1jzhwiftmC9hsBKL9dJIk=; b=M6gsP4DMK69UYLtkuYHSsbbapCcsbIFh21wNVf4PrlugZEB4Tc/uzQrY2nh8fNihvn l9RhcnXk/ZZ2FJrNNpkUPJl2tigiSOj/Wa+gQVmZ4/BjBE0L0GXCqjEwJlNorHBQaapU XzICtU1aVUM5Jb9AsDciI4GCksxfR5ilusJELtivpa1TmqZiX4dIaAyGzJwMdjPjFl0k XL83c8KS+v1Z+NQpzEwstOrIw/5xmWERcTpgHT3SFnUBgSR88FZZuiw1kQso8b8p7SqQ kPDfescVj6wi25BSZDi+RY3wMJPQZDllbhUwx5ytfOthE62I9WrR0559LJQaYiQl7X9c DITQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CAtwAt15; 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-7cd4688cbf8si17310185a.211.2025.05.15.10.30.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 10:30:45 -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=CAtwAt15; 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 1uFcNc-0000oh-6T; Thu, 15 May 2025 13:28:24 -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 1uFcNA-0000Bm-Ok for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:57 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFcN4-00027X-Ub for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:53 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-7423fadbe77so1378559b3a.3 for ; Thu, 15 May 2025 10:27:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747330069; x=1747934869; 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=gbuvyyDE6gTlrgir5RDD6et/JTOv9aQoK4kjj65E+Do=; b=CAtwAt15Aotz8NnG3WGH5J52lpOPD3y+WNPQCwzljEa92Va/BYLXYiPGkQE333TKD6 79J+GHwxCsFCyBpolZLeon9cQcS0wF1eXlLKRS5JfCE71To1e8KpynKHjapRZ29M9V2X +3kMacxftCKFxKo0CcjJHMIoQyFRvj1LvgQcGZtEms+//CNcgswSsWDuoMGh/ua8ujr+ q0jkVBzQZuES0nW6PJNGRqTAqicdbrbW080HnzYmQeRseOOAWuKfeo6bCOVBLbjW0hff owXGql7FnYyk+Qg2416ZShmoJAHksvkG7XbPhOnfMtfHTHrSX1LPs3YoNBSdCtgqOmfg OfNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747330069; x=1747934869; 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=gbuvyyDE6gTlrgir5RDD6et/JTOv9aQoK4kjj65E+Do=; b=mwHobebtFH+4fbL/BGbuGschha2NlD5kXuytn2apuRjGm1CL6jgLczllbiK6t/JVWa Id1lVLJATPOnDvJTSFNDMabcQyr1LBBDqIU4vnz5lUaFor3e5li81FP9NDJwzbagyrTG jxBHaKq1SwZ1m/71cG+MHkjeR6algD4yv1LGdGkeD8FMuhMzNJcf7M3JpwFgT3rPTzOj HJIbhe58l8/atddhBfVoPKLrfxIwU/5z5TJSlx+FFldP5Aia85DMR22zJAe0hsUcie44 EAPVekm/4G83gEKHLhJO84FYjmKNI0TWW9A2i5xiBti1yTD9x0w9ZwJuthO9tZY/0YrJ TBrQ== X-Gm-Message-State: AOJu0YzXLfCYnOjFBDXPoXYw2Xwyk/5J8tgXNduBcU9VuXX4oLvssbFi 7rUhwenBgWWufekVUtNficL0TDEUZEG9dAFCJGkgr2INXMzt4rTevXBsq4HoOKwn82UuyfdUL2o kaJAg X-Gm-Gg: ASbGncsb+cm81zX5afvG/u7Lca8F2lAu5xUdLCCMIn097K8vD+5mTgevL8JB/CKU40e +scrFZKRh8p0055Zr2xJq6/DYoACC5l1uYqdb/5Z7x+92mWmb0DLTDjqhP+YqvBAZCCjgw7MB4g CLnI/Jw9MkmmRDbH1roG+bxZp1/cWZ/Uja4b/v2/psTxiW7LR+bdadg68PUZemYWExsyARbUT1y n7kfzQ/E7Bpo/aIBw3o9v036tfZrcbu4DdZmXiSyfzF0R/+7i1usE8Tu04chzpxyrJIcCEEg4Lr VW6FJiA+bWFbrjEybLQEKIXerUiUWBIgUgIIOrq5fPy7oYTcRsQ= X-Received: by 2002:a05:6a00:10c6:b0:736:4fe0:2661 with SMTP id d2e1a72fcca58-742a97aa21cmr269875b3a.11.1747330069387; Thu, 15 May 2025 10:27:49 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a96dfa9dsm79730b3a.10.2025.05.15.10.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 10:27:48 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Michael Roth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , berrange@redhat.com, Markus Armbruster , Peter Maydell Subject: [PATCH v2 11/12] qapi: remove qapi_specific_outputs from meson.build Date: Thu, 15 May 2025 10:27:31 -0700 Message-ID: <20250515172732.3992504-12-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> References: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42e.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. Reviewed-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- 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 Thu May 15 17:27:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890220 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8a:0:b0:3a1:f579:ae88 with SMTP id d10csp3269454wrr; Thu, 15 May 2025 10:30:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVpb2un9JlxIjsgaK8rX/uH7l6RHI6d4rVvhnnXbkCBLEk9tcLrjOhGrkFx37aIAsRegvDmXA==@linaro.org X-Google-Smtp-Source: AGHT+IEq2UGSMwNRVSmgqg7HSujjeoUKbR0mDTRjO/L8FH/ND9Q07lGfgoFAwlzYYsQnga5kH+7M X-Received: by 2002:a05:6102:3e89:b0:4db:e32:8f3c with SMTP id ada2fe7eead31-4dfa6ae87fbmr864654137.1.1747330230632; Thu, 15 May 2025 10:30:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747330230; cv=none; d=google.com; s=arc-20240605; b=WtxalhV+AG3W3o4DOdYOGVVgNwMCq3HKpay3kpvMaaaAZFfgPqO1eIjW34j29piOs6 B6/2PuaN89M5xRmqZCv4JyZ3nkseSC/hP9t/mHjSQfVaVK0vCUP+8GYl37QRpKtH3RJ0 fNsYGQ8CobdumdvW2E/Jb0SNd1oUPk2KfjJVIpUuxEzbkbObr0FUtyT9z7/HFlxyGiiR cXVoLPUlv1/tZr45+FRhmLaIQuID1wnrgB6tq4NSubQo4+hSvGRRpUfDm4TtX7YWsOdI EFopqQCjW1eBFaem4XVkvV9EiQwz4IZ85GAyE42L8RqtvrBJftRSa8O0a8coV1UqXcsH rTlg== 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=+Ojs5C/HJLX1uGWQpBATdc+qvG3d9Q0HejjDzFBL3jg=; fh=OJpaBvMmOsDyDUaboK7XVT1jzhwiftmC9hsBKL9dJIk=; b=D/fXKkGLa+9/sXvX8jD3XsuMOMZs2ONh7ysFH90zceIhco8/WD7fmd1w3pfOx8sEbB H3khgh2TAoa9I9yKx8Gy38Jeuhl7iqJLtOBPj+KaAkoVKQClHT51FaL0cQYv2KaUVSmm XKmZ1HVxL32dCCFxG6hLHmY8lZnJQk6Y9It9YJZm+6mNpss4nXnlH+R2aBrF0ONmppDw l88HcsnSdjzu0bKdBa8wco7cCFl9ecqG5onjX3/CkFd6qFyMc58yaDERs1/GE+V1lG5x MoHZH4fvFQ8QjuPqclRQft/jw8VKyANzcOIYTzBfQHR5dNN82/5GX/xakbhB4wVQwfqQ dIkg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uLG6Gfnj; 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 ada2fe7eead31-4dfa668c4afsi320294137.58.2025.05.15.10.30.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 10:30:30 -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=uLG6Gfnj; 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 1uFcNT-0000W5-KB; Thu, 15 May 2025 13:28:15 -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 1uFcNA-0000Bg-OF for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:57 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFcN5-00027n-QY for qemu-devel@nongnu.org; Thu, 15 May 2025 13:27:54 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-741b3e37a1eso1432910b3a.1 for ; Thu, 15 May 2025 10:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747330070; x=1747934870; 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=+Ojs5C/HJLX1uGWQpBATdc+qvG3d9Q0HejjDzFBL3jg=; b=uLG6GfnjlkAocwlyXKcZ+QFIldqd29TWCUx2m/L2o40UTEmGgqxlUQsfupo2Ss6vTA Tr5HXKW12r4dDx1nqhIwQiBXgl8CSw3tepYKj41CXQukUWVkA0A6wwt99m+D1NOjyNeY QJyCi8mWDJbe41tbYfZTChhf3NKPYoMCoZu6E93XKnWS4zx2xAuKu80gHQZeUpbajmp9 N40GM/kl9R7WoLx5tQqQ1JaPt8YyJZ/A4l0Njdj4NxCqp6KCLgJ7Qi/tYMDBH+aUw09d aJndFGyRvCdb8HSqCVhdbY5V1A3VAT4ZAujjjb0OJXL1Q5pXYpk+F1YfQ/4z4sErDweE ldRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747330070; x=1747934870; 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=+Ojs5C/HJLX1uGWQpBATdc+qvG3d9Q0HejjDzFBL3jg=; b=m2sbNk9eEDo+oVCOHXJrvXj9MyVO1sfhSEbMPij2A8HWmK279WCJLbfFKRUoaLcXX4 OIHNPgEskfYKieP5znwyqsLUnB+Rp3La6Qnrx3BFBIZ8ezcWrfJI/lmbvmfvG83HdKTS hQxfuGC0RiU8b5bCkIDHkRLvwquBMhKah03TxQH1wc/oT1+PsJW7OdFQyVEd6PPnH0SW cjilZp5OQg3xZ0Z5qc1McIvAw8Z0x1WWdHhK3gbkzugrMDxtrFmWZkgS4bDlJoAZVQQT iszIzPjnaWM6BobfIGW7h9UcoNy1ciUoudIgiR73H7WnkWppVoBZFe1Kf4BMC5RhpLVn c84g== X-Gm-Message-State: AOJu0Yx/3d312k/qb7P8zB8e4ipKA3tovtcRhNlhDoO29tJs+4Vcc1D/ MeIQ6IF2O2iO1ejoki3SLnV26AJyNT6RmgeY+qgzuRurk2ukAUVZ6YAERhnVhTFnIyrc9CZTwBa o6/Yf X-Gm-Gg: ASbGnctiryh1nq3Qe8RGYX9XSIDC7SwjgdEfZeW2rNJ7DnGOFWlCmWqY2zX/1okdyOB GVampgH8EgJbU0gE22LGez+3neVR6+/ZW4w6u3AZPRPM0etX0THjy4r8S/TsMe01p1fGI2JFcVA /lkplxj00daQIaETU0Zu+t6SwoxMFROY+5my+iSnJwSDn5SO9U90BgnceJHA3PB9/39YjXbhK/U /E76CSfbGGlRIdKcLEndWJJrFMGjkCzS5zV71InbYISm8SWHrafa0JFlSXCUzcTn17V1pj2lGFy MWCbbjtsVk5PajpVuX/7qma2zcWkZb292DmTjQBSGNXXI6CrbjNkps1JDNDPCg== X-Received: by 2002:a05:6a00:9186:b0:742:4770:bfbb with SMTP id d2e1a72fcca58-742a98a3213mr266688b3a.18.1747330070291; Thu, 15 May 2025 10:27:50 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-742a96dfa9dsm79730b3a.10.2025.05.15.10.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 10:27:49 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , Richard Henderson , Michael Roth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , berrange@redhat.com, Markus Armbruster , Peter Maydell Subject: [PATCH v2 12/12] qapi: make all generated files common Date: Thu, 15 May 2025 10:27:32 -0700 Message-ID: <20250515172732.3992504-13-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> References: <20250515172732.3992504-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42f.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 Reviewed-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- 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