From nobody Sat Sep 6 17:02:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1745519705; cv=none; d=zohomail.com; s=zohoarc; b=nvmmWlOLstE0GrZFWjhXra7LyYmlVI09beqpHL9gm7HFGx2l6wdPXuHedKBVLuiNLL0J1rUQL6r9BUTSmzHOZmvZ/aYFdWnXaObYuYCjrUpHbYeMPwyimiuyytXK/RRqeXmBN941MW614d0sKFqxtSNH2tKuLiqgPQ2DCfmqskI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745519705; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dV6kNi0FTww4zMCdoDaGt2FwS66xHIgmhnvrrJm5V+4=; b=ZddaZ1ogY9t+TNwvZv0GHrO45mV7XqnTXGQ/I2quTf53Wfk9P19xmScZoOVG2RCdIqZA22hx2DHumQgjwQAtatGRASeUN5mEr1a/Ecsz4SW4TeCBnKl2VBzKkcSdhs4JCJYNvkI167O7UpfaHl+MChzO88EUraBx8lJZVx+GlrQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745519705299749.3615810640081; Thu, 24 Apr 2025 11:35:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u81Og-0003dL-D6; Thu, 24 Apr 2025 14:34:06 -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 1u81Ob-0003b9-L6 for qemu-devel@nongnu.org; Thu, 24 Apr 2025 14:34:01 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u81OY-0007lw-DJ for qemu-devel@nongnu.org; Thu, 24 Apr 2025 14:34:01 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-224019ad9edso19739765ad.1 for ; Thu, 24 Apr 2025 11:33:57 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa80fbaasm1544157a12.49.2025.04.24.11.33.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Apr 2025 11:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745519637; x=1746124437; 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=dV6kNi0FTww4zMCdoDaGt2FwS66xHIgmhnvrrJm5V+4=; b=Cwt5BvMakLvRUHwbN3GlTDRL8CF/1R7+N/WSD2FMEoihs/GnT6TZ7dmr5uIUn2FgAO ccIIS+qS7IBRm/sygLIvfNFt9QbZrTiiZw/HGiBBvrEl6NZ9QHy0wVtsAQZYYm2FXr9J oU1hxKBelCr/ub7rJFZ1KdMztuwEeo+I8oyKLuQk4+b3D1nkVwJUQ4G20eWFM2WdXKpj tDQY6o9S6/Xm815zkRgkZ+uRbDkIy8wXEijFVTkPXvasv2SD9C8v8nLR8YKrhzrTQsZ0 FXyOSPa+j3TiZwV5HCBdBB5vmaPAmfa3vMJ+BclXjGOTZOSJqE+NJ/v+G4Tm62vKOGah jMgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745519637; x=1746124437; 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=dV6kNi0FTww4zMCdoDaGt2FwS66xHIgmhnvrrJm5V+4=; b=mIG/FeO8fqVgFXMqjRc1nP/PxCNFGXkez+BDkuGABwUkJdx70fYx2s+ulJj+CzJU6w lTo++/BQtypzkhMH2qchlSQ/dLeVCFo31EAJ6QUbiOXJb033hX14dx4NSOj7AuLn50jU ruUAK3fJ2DZM4sGta/2ZF5cSPh9QowhW1Vdn6t3oO0x690LnEBSFvmge5W12kDxj4RPP SzgFq1w/4N7oGECwKy9zg0QqsCEpaJpGmn4Gh5qJvHIDYmgItsWSLpy0Vi7YRgzF0DcM jmuTmkkqA5Ihh7jEtz9fa/I7ZpjK+49u1oLgePnjOjO9SEiEhEmSBIWb0dVwK/GHB4dT LM2A== X-Gm-Message-State: AOJu0YzWHmPXw4/KSh0hyTOUHDFvW0SK0ieijVsqCTaOc5gPX3lIWaYW lotRsVRRDq/YhQxP8+B7HD21w8O1rkCYytMUSUyag35joqnk1CG7/TbK/U6Cf/jJ2lxBhtL4gld GwiU= X-Gm-Gg: ASbGncuoO0H1HqYYNDN+3lrns0UrY1DDhp3klX0doIewbCLcu41+LNRLvpQI6snzRwN n5Oepi2WPzLS+uHvWMA9WkDw0vTv00zBuXooRSrql5Mx/SvCnteqz98t8eRoKLp7YBWGbZHmMev 5RjCQA2CKxbH/vSmMv/BAQn2kHYQJVp4u0humrAQ1J9LXsuTEh4S/CSk2yU6ioeHvM6H+e4KqRT NadnxgmGPduTlEfZS5jV3G8+ORmjIDGA+tXDY7a7tu610rkFGG2/IY7jQMXkTd/btJ5zfrOVfzJ epbIMQptph+4n/Pv4BaWWzE3F3gkHuqgirQm32FG X-Google-Smtp-Source: AGHT+IEzUs1louzJohwSFH4e03wH3XbbRR/VRvrfHsB4wYl/+UMnCm3H2bWK2Jzk4E0q7TlVAQStYQ== X-Received: by 2002:a17:902:ea09:b0:224:1609:a747 with SMTP id d9443c01a7336-22db3c33fbbmr48896735ad.31.1745519636852; Thu, 24 Apr 2025 11:33:56 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, stefanha@redhat.com, Michael Roth , pbonzini@redhat.com, berrange@redhat.com, peter.maydell@linaro.org, thuth@redhat.com, jsnow@redhat.com, philmd@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Markus Armbruster , Pierrick Bouvier Subject: [RFC PATCH 1/3] qapi: add weak stubs for target specific commands Date: Thu, 24 Apr 2025 11:33:48 -0700 Message-Id: <20250424183350.1798746-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250424183350.1798746-1-pierrick.bouvier@linaro.org> References: <20250424183350.1798746-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x635.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1745519707697019000 Content-Type: text/plain; charset="utf-8" We are about to expose various target specific commands for all targets, so we need to stub not implemented qmp_* functions. Signed-off-by: Pierrick Bouvier --- qapi/commands-weak-stubs.c | 38 ++++++++++++++++++++++++++++++++++++++ qapi/meson.build | 3 +++ 2 files changed, 41 insertions(+) create mode 100644 qapi/commands-weak-stubs.c diff --git a/qapi/commands-weak-stubs.c b/qapi/commands-weak-stubs.c new file mode 100644 index 00000000000..9734263c32e --- /dev/null +++ b/qapi/commands-weak-stubs.c @@ -0,0 +1,38 @@ +/* + * Weak symbols for target specific commands + * + * Copyright Linaro, 2025 + * + * This work is licensed under the terms of the GNU LGPL, version 2.1 or l= ater. + * See the COPYING.LIB file in the top-level directory. + * + */ + +#include "qemu/osdep.h" +#include + +#define NOT_REACHABLE(symbol) = \ +void __attribute__((weak)) symbol(void); = \ +void __attribute__((weak)) symbol(void) { g_assert_not_reached(); } + +#define WEAK_STUB(command) = \ +NOT_REACHABLE(qmp_marshal_##command) = \ +NOT_REACHABLE(qmp_##command) + +WEAK_STUB(query_cpu_model_comparison); +WEAK_STUB(query_cpu_model_baseline); +WEAK_STUB(set_cpu_topology); +WEAK_STUB(query_s390x_cpu_polarization); +WEAK_STUB(rtc_reset_reinjection); +WEAK_STUB(query_sev); +WEAK_STUB(query_sev_launch_measure); +WEAK_STUB(query_sev_capabilities); +WEAK_STUB(sev_inject_launch_secret); +WEAK_STUB(query_sev_attestation_report); +WEAK_STUB(query_sgx); +WEAK_STUB(query_sgx_capabilities); +WEAK_STUB(xen_event_list); +WEAK_STUB(xen_event_inject); +WEAK_STUB(query_cpu_model_expansion); +WEAK_STUB(query_cpu_definitions); +WEAK_STUB(query_gic_capabilities); diff --git a/qapi/meson.build b/qapi/meson.build index eadde4db307..ba9380d3f03 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -147,3 +147,6 @@ foreach output : qapi_specific_outputs + qapi_nonmodule= _outputs specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: qapi_files[i]) i =3D i + 1 endforeach + +system_ss.add(when: 'CONFIG_SYSTEM_ONLY', + if_true: files('commands-weak-stubs.c')) --=20 2.39.5 From nobody Sat Sep 6 17:02:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1745519718; cv=none; d=zohomail.com; s=zohoarc; b=P3R9ZteXoiCKPjb5XwWGo7aSI1gJdPLE0wJ3gmcL5JNqViCy6MWGgdHjydDwUv15+aDI82Lh7JpXvvwm0bMTgp7vdrYxnz5BsqTZgbWjwh+FTKaxLxXfP/wlISsNiXDG6er6ROebsOv4xgxfexqEcJz5/QsQstpJmoIqWod9lHM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745519718; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dgPV2b7dRwIfWk1tCY6gzPndqnEP/HfMMUWmginm4O4=; b=EVVTVCM7x3PXajXkgct9xANc8iDr9f43SYQldldUVsaOZ+z42tXGC/YkurS7oGJkE56L2htUUTgH2gZMpADGKvrYEHApJcYL8TQNtfGcT+V4Erlhdadc7zq01mcE7covfvK4AfXW43I/eOX+BCSXtLEgKKvUsUJOBQXVw58HkKU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745519718260136.84746151467402; Thu, 24 Apr 2025 11:35:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u81Og-0003dS-GM; Thu, 24 Apr 2025 14:34:06 -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 1u81Oc-0003bS-0M for qemu-devel@nongnu.org; Thu, 24 Apr 2025 14:34:02 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u81OZ-0007m7-AW for qemu-devel@nongnu.org; Thu, 24 Apr 2025 14:34:01 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-22438c356c8so16465185ad.1 for ; Thu, 24 Apr 2025 11:33:58 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa80fbaasm1544157a12.49.2025.04.24.11.33.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Apr 2025 11:33:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745519638; x=1746124438; 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=dgPV2b7dRwIfWk1tCY6gzPndqnEP/HfMMUWmginm4O4=; b=LQuXRgXepRo/00Q9derZJ8fthOmtViVyZwF1rugEb7yuF6Kn2g5GrN310qYuFlkqBK jPp90SnjRy3AN3lYeAn+nKu4l/XO7y1hnLL8Pf8mD0UVY5Yl6LAY0xR/B/n7+N0IFDyo ZDD1hHVVpF33oET+HHNRGQ6y0DNwM9p1Tih7nlSFTs6A9cen2HjcF+R0gBUdbO47wLkj 6eIPauZWYJi9A41p9sUxP09J7N56ppmuJsOoJ/XEb+SUobTBoXBFmKr//QZSUdFYGAsx QlSC3ozY1Y1N2cUJjzrjRx//tN0Ec+MFrAUBcpLgcw4Z9qOkh/PZrQqeVwYs5ExjpPYk mRAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745519638; x=1746124438; 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=dgPV2b7dRwIfWk1tCY6gzPndqnEP/HfMMUWmginm4O4=; b=CGcrIsqqL6R1EUr4eeBpJjd37mMy8sgguMDvikiR+lQpqg9mhdVY1VI4F66Pizr/YF p97NKpn4c/ZR+LlLZirMgLUmHdSr1nvgjVVf9VTo7OEogJHvm2cEGq67MiiMbHn5dMOu eRoUAYtl8ql3NWVLa1TktM8b9z0l1JM6VQ+4+mjbre0fDQ6MYNvVDXaD7myT52AcfPvH P/IfSDuVkSvUj5hYaNzeTUSaZgW/XqCruH3DxhjHy27+pLkQBgbKLveQevY54VpvMvY1 CTHSvkSZbqpdChudYcAOAXmZBQbXte9BjJsj7KBMkdzKS3kHHtnfDD16gtfvv6JyWvWO AUYQ== X-Gm-Message-State: AOJu0Yxjfn3CAcTPrR8FoyyJJSeoIs7g0CxXwtuZrR3ui3fDrJfDL3jY PE6JevGsdf4hupk4DB/NrAv2JNs0iTfBwMOwUHcKGPWd2Q83QlaN4yMsVBgzWTwRgYhipRXfRGZ gLqs= X-Gm-Gg: ASbGnctE093VAZYfY70Qv0XAjt8r9jVB4dk60B/sCdfOTzJEVXyg8AuyzyvQXqGxYp9 dVpaRVSo8mG4JaOibOWlesmyhkLxU206G7lB/yWWX3PtVTeEfKuju5uLNdarf9qPCX0Jzs94c4O kz67K4eTcJNU4+kCSDcva9fOgbvoQydtRRl2MhCOXVWnO9ciZef0O/bR+dfClQoIoLmZW46H2iT P+XZt+/oIEe02Drm4BE4VzAb1PvnkgTtOhZx85HHUAOhDb+CzOcO5/Rvq5RbhxekEypz0RzUVnm bP3l+xhG9PIeW0crAzicp5Q9G7dfQhGiDSYJWQrA X-Google-Smtp-Source: AGHT+IH800NMHceYVSDK6JiIPViscPtj3caEwOz1FxsPNH9FPH3YAw4RvZiksquhZJVj+aejNWH3Dw== X-Received: by 2002:a17:902:cec6:b0:215:acb3:3786 with SMTP id d9443c01a7336-22dbd416a4dmr7474145ad.19.1745519637735; Thu, 24 Apr 2025 11:33:57 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, stefanha@redhat.com, Michael Roth , pbonzini@redhat.com, berrange@redhat.com, peter.maydell@linaro.org, thuth@redhat.com, jsnow@redhat.com, philmd@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Markus Armbruster , Pierrick Bouvier Subject: [RFC PATCH 2/3] qapi: always expose TARGET_* or CONFIG_KVM code Date: Thu, 24 Apr 2025 11:33:49 -0700 Message-Id: <20250424183350.1798746-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250424183350.1798746-1-pierrick.bouvier@linaro.org> References: <20250424183350.1798746-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62c.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1745519719586019000 Content-Type: text/plain; charset="utf-8" As this point, we don't do anything to hide target specific commands, as the TODO mentions in the commit. All other CONFIG_* are based on config-host, so we can safely generate ifdefs. Signed-off-by: Pierrick Bouvier --- scripts/qapi/commands.py | 4 ++++ scripts/qapi/common.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py index 79142273828..1dddf008d26 100644 --- a/scripts/qapi/commands.py +++ b/scripts/qapi/commands.py @@ -405,6 +405,10 @@ def visit_command(self, if self._gen_tracing: self._gen_trace_events.add(gen_trace(name)) with self._temp_module('./init'): + # TODO: This if guard should be implemented as a runtime check + # instead of #ifdef based ifcond. + # "#if TARGET_S390X && CONFIG_KVM" will become: + # "if (target_s390x() || kvm_enabled()) {" with ifcontext(ifcond, self._genh, self._genc): self._genc.add(gen_register_command( name, features, success_response, allow_oob, diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index d7c8aa3365c..98272653303 100644 --- a/scripts/qapi/common.py +++ b/scripts/qapi/common.py @@ -206,6 +206,8 @@ def gen_ifcond(ifcond: Optional[Union[str, Dict[str, An= y]]], def do_gen(ifcond: Union[str, Dict[str, Any]], need_parens: bool) -> str: if isinstance(ifcond, str): + if ifcond.startswith('TARGET_') or ifcond =3D=3D 'CONFIG_KVM': + return '1 /*' + ifcond + '*/' return cond_fmt % ifcond assert isinstance(ifcond, dict) and len(ifcond) =3D=3D 1 if 'not' in ifcond: @@ -247,7 +249,7 @@ def gen_endif(cond: str) -> str: if not cond: return '' return mcgen(''' -#endif /* %(cond)s */ +#endif // %(cond)s ''', cond=3Dcond) =20 =20 --=20 2.39.5 From nobody Sat Sep 6 17:02:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1745519705; cv=none; d=zohomail.com; s=zohoarc; b=YRo+YUxypYFi4NcHr8Q5ISZCtmqEnXNIps7c37UcsPoJmlYONMG5yR+1JwXj3T2WR4lHCAVPzbOgf49hetkfY6v23U0uX+nNyxuNeTJ2Vbxn3VJzMHXmeWss08zLsnkPTyMcZFUjO8xNeFJ9D9azl5dj7Wk+MnGdSX95zYbyS6o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745519705; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=IhBZqYIRQ2byJdn1RM8IMtiTT7hHnb++hz5MqumQew4=; b=JAb876fa7EqCW7QoQpGPiEZoRih/ijYj97SMvHgk3F6qwGB0RUyLTbRpTDmO/ndsM/8bbnX7GXU0jyypb8VQFBSTbAjQsFKr9oCNHG9mCs5B2CoA7SQbd/W+XMWp5YyDUQ71g78OTD46xduon8xU2WHjax/vkaKy2TPHA2I87xc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745519705287852.9123854179945; Thu, 24 Apr 2025 11:35:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u81Od-0003cV-V6; Thu, 24 Apr 2025 14:34:04 -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 1u81Ob-0003bA-MP for qemu-devel@nongnu.org; Thu, 24 Apr 2025 14:34:01 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u81Oa-0007mJ-1V for qemu-devel@nongnu.org; Thu, 24 Apr 2025 14:34:01 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-22c33e4fdb8so15410425ad.2 for ; Thu, 24 Apr 2025 11:33:59 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa80fbaasm1544157a12.49.2025.04.24.11.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Apr 2025 11:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745519638; x=1746124438; 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=IhBZqYIRQ2byJdn1RM8IMtiTT7hHnb++hz5MqumQew4=; b=LZ8jlvAyd2+RIuztZhs55DZTs9uaJewSTKleN7PHUaMF/xZqdo32wEI7mYOIAFgl8D zg/+URQVBxeN6LkG8Gx+Ly/L0bvZKduiDDibH/3KnZZoWYsfhPywUvhc+/Af223qi23S +YJGwIZIQWDPS3sM+I1Wbqriw+0gZUyUHBUTbqkvVkqwzksBVw+0MpnwyprARQMrYqBw fhFeMQWTPEGVyFW+0V6K9J4Qh8+BCvCn12rDeUzCo+VANeh7s6XRnatFSA8Xb1vcDb9c DLIG2hNOs/anWbooz8dlbQBQm25XaPlQMym7x4e6bDlPYNqzNuOr511wSFGsexWz89nu so5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745519638; x=1746124438; 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=IhBZqYIRQ2byJdn1RM8IMtiTT7hHnb++hz5MqumQew4=; b=NHh2pAtdRtSGAqhesy3tlAz6Qw5MOYf6WQO0REDB6RU6IxVitFXb8aF4jpV5gIeBaw LDk4tu7ndfgR8vUm4mhfywrTmDJPYJi3sdNWeTATprrwEEAPdpsqCYZdPeC+yQoCAEAM OVbTSXBjEGWbweZvTWCDBabJDL+aQO/n0UkZDzMlIneAYCeJ/SXo5k3UV1BHoDKcun4E Ns2VuD4r5RnLATyLagtey1ONo5MntNa6JyI0xqBjKO8ENViVZSav46IqdsZ4mu4pgzVO KzHHd3RWTsFoy1mKPcCFJcBKqRImxqVgh6h5fo2g7odZ4omFDLkH6/DOzc0S9yp/Ok7V MmKQ== X-Gm-Message-State: AOJu0YyaKaamxpTvl3MF3gjtke6YYoLvuzyu/ik1hXXdv4071+QcRN08 l3T/WvcdO8Oaz0Ns8kmH8d0hlZukMXX/7Os+5P/5lZIFfA+BBn1RJ66byEjv9Ar/XW4SkTOLz9B 2zQk= X-Gm-Gg: ASbGnctGWVJT51iBmrH3//dwXmRQlC37YHnqiXEgCqjc5tY3Wx/gf4tnYPMd4Lvu06T 6SE+yxG4KJCJGagOyD4nICm0i0XYpOZpB0Ri6aN5HfcPL2vAHbjehR19PmBDVVOF4h+W0G43vJ7 cKKtne2FkdqdJ9kS5IgLWWjxvdcjo1715umrI1qAPWYY2VjREqWm0YzjrEXNbe3xg4Cbd33hI5f L3qzwfrt2JJ67Oad/0D/r6x6QWyRwzF7BlFFHHO2327L+FhrJ9UpRso3coaVr2Lo136ieFvrPd4 tLjmalK5Cox+lksmxJIJLVIUgRxA4NizwNvNHKbe X-Google-Smtp-Source: AGHT+IEQRMkbAPUj+dnOzKh+WLxC/Zzw1YzmWUBJFd3eDaVjqJnOCV/Bsu8vdW6DYcxQwXePKZfyoQ== X-Received: by 2002:a17:903:98f:b0:224:10a2:cae1 with SMTP id d9443c01a7336-22dbd466012mr6900765ad.37.1745519638633; Thu, 24 Apr 2025 11:33:58 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, stefanha@redhat.com, Michael Roth , pbonzini@redhat.com, berrange@redhat.com, peter.maydell@linaro.org, thuth@redhat.com, jsnow@redhat.com, philmd@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Markus Armbruster , Pierrick Bouvier Subject: [RFC PATCH 3/3] qapi: make all generated files common Date: Thu, 24 Apr 2025 11:33:50 -0700 Message-Id: <20250424183350.1798746-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250424183350.1798746-1-pierrick.bouvier@linaro.org> References: <20250424183350.1798746-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x636.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1745519707668019000 Content-Type: text/plain; charset="utf-8" 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 ba9380d3f03..58ca8caee12 100644 --- a/qapi/meson.build +++ b/qapi/meson.build @@ -144,7 +144,7 @@ foreach output : qapi_specific_outputs + qapi_nonmodule= _outputs if output.endswith('.trace-events') qapi_trace_events +=3D qapi_files[i] endif - specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: qapi_files[i]) + system_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: qapi_files[i]) i =3D i + 1 endforeach =20 --=20 2.39.5