{"id":2219540,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2219540/?format=json","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.0/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260403104327.1163942-4-mjt@tls.msk.ru>","date":"2026-04-03T10:43:23","name":"[for-11.0,3/6] qom: Declare GlobalProperty structure in 'qom/compat-properties.h'","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"88cf32ec9af99095729bc1347d2dc515ff16d18e","submitter":{"id":183,"url":"http://patchwork.ozlabs.org/api/1.0/people/183/?format=json","name":"Michael Tokarev","email":"mjt@tls.msk.ru"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260403104327.1163942-4-mjt@tls.msk.ru/mbox/","series":[{"id":498613,"url":"http://patchwork.ozlabs.org/api/1.0/series/498613/?format=json","date":"2026-04-03T10:43:24","name":"allow building tools and qemu-guest-agent on 32bit hosts","version":1,"mbox":"http://patchwork.ozlabs.org/series/498613/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2219540/checks/","tags":{},"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=tls.msk.ru header.i=@tls.msk.ru header.a=rsa-sha256\n header.s=202602 header.b=rl78ktyp;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fnFj64Mfpz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 03 Apr 2026 21:44:42 +1100 (AEDT)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1w8c06-0003zW-CA; Fri, 03 Apr 2026 06:43:42 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <mjt@tls.msk.ru>) id 1w8c03-0003yr-LM\n for qemu-devel@nongnu.org; Fri, 03 Apr 2026 06:43:39 -0400","from isrv.corpit.ru ([212.248.84.144])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <mjt@tls.msk.ru>) id 1w8c01-0005YO-SL\n for qemu-devel@nongnu.org; Fri, 03 Apr 2026 06:43:39 -0400","from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2])\n by isrv.corpit.ru (Postfix) with ESMTP id 19EFA19A63D;\n Fri, 03 Apr 2026 13:42:51 +0300 (MSK)","from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146])\n by tsrv.corpit.ru (Postfix) with ESMTP id CC8DF38DB6D;\n Fri, 03 Apr 2026 13:43:28 +0300 (MSK)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602;\n t=1775212971; bh=RrlxCV4E2YhfW6wkGShBvS/UZsM8Fiy1F7kyYksAPqg=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References;\n b=rl78ktypZxSR3JDdugwp6mXIRAk327+aYk5tHyxCepYQGaH3yGIsmgGmcpF7stZwe\n ehki3rLw9Dtp7vcDzo3KpI4d5w9V6ZhYcqlgshZuyXiPBFlWrRpJFUQ1CnUtOuiD4H\n VARGge8yfKRTU2nv/Nnq2+btIaCel290GhjmvWSfRUVO4C7EhezKyZ61MSnHcdXjJb\n plhwepmIKY3u9fj4dKqH0FKRn34QAUUgMa7MooGtoZt0c8iuaxqhg6ytnhME3Bp4pw\n T95VJySSK1yLsHfOihjAvnsxck4feI1LMGiRYEoTzB7425C3g1AEC7IBKGx8/Cfo49\n hF1ojy5RjHQ3A==","From":"Michael Tokarev <mjt@tls.msk.ru>","To":"qemu-devel@nongnu.org","Cc":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n Michael Tokarev <mjt@tls.msk.ru>","Subject":"[PATCH for-11.0 3/6] qom: Declare GlobalProperty structure in\n 'qom/compat-properties.h'","Date":"Fri,  3 Apr 2026 13:43:23 +0300","Message-ID":"<20260403104327.1163942-4-mjt@tls.msk.ru>","X-Mailer":"git-send-email 2.47.3","In-Reply-To":"<20260403104327.1163942-1-mjt@tls.msk.ru>","References":"<20260403104327.1163942-1-mjt@tls.msk.ru>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru;\n helo=isrv.corpit.ru","X-Spam_score_int":"-19","X-Spam_score":"-2.0","X-Spam_bar":"--","X-Spam_report":"(-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001,\n 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":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"From: Philippe Mathieu-Daudé <philmd@linaro.org>\n\nWhile GlobalProperty is expected to only be used by QDev board\nlayer, it is used by the lower QOM API, so define it in the\nqom/ namespace. This helps to build binary which use QOM but\ndon't need the QDev layer.\n\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\nReviewed-by: Michael Tokarev <mjt@tls.msk.ru>\n---\n include/hw/core/boards.h          |  1 +\n include/hw/core/qdev-properties.h |  1 +\n include/hw/core/qdev.h            | 17 ----------------\n include/qom/compat-properties.h   | 32 +++++++++++++++++++++++++++++++\n qom/object.c                      |  2 +-\n 5 files changed, 35 insertions(+), 18 deletions(-)\n create mode 100644 include/qom/compat-properties.h","diff":"diff --git a/include/hw/core/boards.h b/include/hw/core/boards.h\nindex 0ac7e17ef7..3f9a7127ad 100644\n--- a/include/hw/core/boards.h\n+++ b/include/hw/core/boards.h\n@@ -8,6 +8,7 @@\n #include \"system/blockdev.h\"\n #include \"qapi/qapi-types-machine.h\"\n #include \"qemu/module.h\"\n+#include \"qom/compat-properties.h\"\n #include \"qom/object.h\"\n #include \"hw/core/cpu.h\"\n #include \"hw/core/resettable.h\"\ndiff --git a/include/hw/core/qdev-properties.h b/include/hw/core/qdev-properties.h\nindex d8745d4c65..17543957a6 100644\n--- a/include/hw/core/qdev-properties.h\n+++ b/include/hw/core/qdev-properties.h\n@@ -1,6 +1,7 @@\n #ifndef QEMU_QDEV_PROPERTIES_H\n #define QEMU_QDEV_PROPERTIES_H\n \n+#include \"qom/compat-properties.h\"\n #include \"hw/core/qdev.h\"\n \n /**\ndiff --git a/include/hw/core/qdev.h b/include/hw/core/qdev.h\nindex 778617787c..337d69ea2c 100644\n--- a/include/hw/core/qdev.h\n+++ b/include/hw/core/qdev.h\n@@ -404,23 +404,6 @@ struct BusState {\n     ResettableState reset;\n };\n \n-/**\n- * typedef GlobalProperty - a global property type\n- *\n- * @used: Set to true if property was used when initializing a device.\n- * @optional: If set to true, GlobalProperty will be skipped without errors\n- *            if the property doesn't exist.\n- *\n- * An error is fatal for non-hotplugged devices, when the global is applied.\n- */\n-typedef struct GlobalProperty {\n-    const char *driver;\n-    const char *property;\n-    const char *value;\n-    bool used;\n-    bool optional;\n-} GlobalProperty;\n-\n /*** Board API.  This should go away once we have a machine config file.  ***/\n \n /**\ndiff --git a/include/qom/compat-properties.h b/include/qom/compat-properties.h\nnew file mode 100644\nindex 0000000000..6e44aabc26\n--- /dev/null\n+++ b/include/qom/compat-properties.h\n@@ -0,0 +1,32 @@\n+/*\n+ * QEMU Object Model\n+ *\n+ * Copyright IBM, Corp. 2011\n+ *\n+ * Authors:\n+ *  Anthony Liguori   <aliguori@us.ibm.com>\n+ *\n+ * SPDX-License-Identifier: GPL-2.0-or-later\n+ */\n+\n+#ifndef QEMU_COMPAT_PROPERTIES_H\n+#define QEMU_COMPAT_PROPERTIES_H\n+\n+/**\n+ * typedef GlobalProperty - a global property type\n+ *\n+ * @used: Set to true if property was used when initializing a device.\n+ * @optional: If set to true, GlobalProperty will be skipped without errors\n+ *            if the property doesn't exist.\n+ *\n+ * An error is fatal for non-hotplugged devices, when the global is applied.\n+ */\n+typedef struct GlobalProperty {\n+    const char *driver;\n+    const char *property;\n+    const char *value;\n+    bool used;\n+    bool optional;\n+} GlobalProperty;\n+\n+#endif\ndiff --git a/qom/object.c b/qom/object.c\nindex ff8ede8a32..838b1d2b22 100644\n--- a/qom/object.c\n+++ b/qom/object.c\n@@ -11,8 +11,8 @@\n  */\n \n #include \"qemu/osdep.h\"\n-#include \"hw/core/qdev.h\"\n #include \"qapi/error.h\"\n+#include \"qom/compat-properties.h\"\n #include \"qom/object.h\"\n #include \"qom/object_interfaces.h\"\n #include \"qemu/cutils.h\"\n","prefixes":["for-11.0","3/6"]}