From nobody Sat Apr 11 20:10:31 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1775213082; cv=none; d=zohomail.com; s=zohoarc; b=DtmP5saYeqxULAwjcWpfUe0jTuVEbEBmm+1RJPAwIe0KVCmW/4oiqi728oCC/Le2LYhBBQt9DIi26e2fgp560SHwKNc53+TlEbJ235PiPxg7GUf77FQBcJiCSjiVJ+Tw9Xm42Cs3f3xez0fOQOXbk5heH6PEw+5Vgb/nLYEUZdk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775213082; h=Content-Type: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=LJcKCvKnACkNof/EHL0OzatJYaNhJClr/Q8Cx66CLjI=; b=hqiluNct6TDtX9ADSB8AaGyaQJ2ogZZmr2BeN1NuAvKacMTmJkXXHvVN7J7/ok6/Urqk+jShZDGIEJudbyzJfUYaBuPpxt9LbJhhWsGtpDtbCWsGLcB9MYfveWbUJuhQbk8s8ZO3fa6/q9rNukNeGJIhL7omRCGxMVqaRI0Aklo= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775213081453630.3173898070909; Fri, 3 Apr 2026 03:44:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w8c06-0003zW-CA; Fri, 03 Apr 2026 06:43:42 -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 1w8c03-0003yr-LM for qemu-devel@nongnu.org; Fri, 03 Apr 2026 06:43:39 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w8c01-0005YO-SL for qemu-devel@nongnu.org; Fri, 03 Apr 2026 06:43:39 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 19EFA19A63D; Fri, 03 Apr 2026 13:42:51 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id CC8DF38DB6D; 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; t=1775212971; bh=RrlxCV4E2YhfW6wkGShBvS/UZsM8Fiy1F7kyYksAPqg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rl78ktypZxSR3JDdugwp6mXIRAk327+aYk5tHyxCepYQGaH3yGIsmgGmcpF7stZwe ehki3rLw9Dtp7vcDzo3KpI4d5w9V6ZhYcqlgshZuyXiPBFlWrRpJFUQ1CnUtOuiD4H VARGge8yfKRTU2nv/Nnq2+btIaCel290GhjmvWSfRUVO4C7EhezKyZ61MSnHcdXjJb plhwepmIKY3u9fj4dKqH0FKRn34QAUUgMa7MooGtoZt0c8iuaxqhg6ytnhME3Bp4pw T95VJySSK1yLsHfOihjAvnsxck4feI1LMGiRYEoTzB7425C3g1AEC7IBKGx8/Cfo49 hF1ojy5RjHQ3A== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Michael Tokarev Subject: [PATCH for-11.0 3/6] qom: Declare GlobalProperty structure in '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: 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=212.248.84.144; envelope-from=mjt@tls.msk.ru; 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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: qemu development 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 @tls.msk.ru) X-ZM-MESSAGEID: 1775213082822158500 From: Philippe Mathieu-Daud=C3=A9 While GlobalProperty is expected to only be used by QDev board layer, it is used by the lower QOM API, so define it in the qom/ namespace. This helps to build binary which use QOM but don't need the QDev layer. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael Tokarev Reviewed-by: Richard Henderson --- include/hw/core/boards.h | 1 + include/hw/core/qdev-properties.h | 1 + include/hw/core/qdev.h | 17 ---------------- include/qom/compat-properties.h | 32 +++++++++++++++++++++++++++++++ qom/object.c | 2 +- 5 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 include/qom/compat-properties.h diff --git a/include/hw/core/boards.h b/include/hw/core/boards.h index 0ac7e17ef7..3f9a7127ad 100644 --- a/include/hw/core/boards.h +++ b/include/hw/core/boards.h @@ -8,6 +8,7 @@ #include "system/blockdev.h" #include "qapi/qapi-types-machine.h" #include "qemu/module.h" +#include "qom/compat-properties.h" #include "qom/object.h" #include "hw/core/cpu.h" #include "hw/core/resettable.h" diff --git a/include/hw/core/qdev-properties.h b/include/hw/core/qdev-prope= rties.h index d8745d4c65..17543957a6 100644 --- a/include/hw/core/qdev-properties.h +++ b/include/hw/core/qdev-properties.h @@ -1,6 +1,7 @@ #ifndef QEMU_QDEV_PROPERTIES_H #define QEMU_QDEV_PROPERTIES_H =20 +#include "qom/compat-properties.h" #include "hw/core/qdev.h" =20 /** diff --git a/include/hw/core/qdev.h b/include/hw/core/qdev.h index 778617787c..337d69ea2c 100644 --- a/include/hw/core/qdev.h +++ b/include/hw/core/qdev.h @@ -404,23 +404,6 @@ struct BusState { ResettableState reset; }; =20 -/** - * typedef GlobalProperty - a global property type - * - * @used: Set to true if property was used when initializing a device. - * @optional: If set to true, GlobalProperty will be skipped without errors - * if the property doesn't exist. - * - * An error is fatal for non-hotplugged devices, when the global is applie= d. - */ -typedef struct GlobalProperty { - const char *driver; - const char *property; - const char *value; - bool used; - bool optional; -} GlobalProperty; - /*** Board API. This should go away once we have a machine config file. = ***/ =20 /** diff --git a/include/qom/compat-properties.h b/include/qom/compat-propertie= s.h new file mode 100644 index 0000000000..6e44aabc26 --- /dev/null +++ b/include/qom/compat-properties.h @@ -0,0 +1,32 @@ +/* + * QEMU Object Model + * + * Copyright IBM, Corp. 2011 + * + * Authors: + * Anthony Liguori + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef QEMU_COMPAT_PROPERTIES_H +#define QEMU_COMPAT_PROPERTIES_H + +/** + * typedef GlobalProperty - a global property type + * + * @used: Set to true if property was used when initializing a device. + * @optional: If set to true, GlobalProperty will be skipped without errors + * if the property doesn't exist. + * + * An error is fatal for non-hotplugged devices, when the global is applie= d. + */ +typedef struct GlobalProperty { + const char *driver; + const char *property; + const char *value; + bool used; + bool optional; +} GlobalProperty; + +#endif diff --git a/qom/object.c b/qom/object.c index ff8ede8a32..838b1d2b22 100644 --- a/qom/object.c +++ b/qom/object.c @@ -11,8 +11,8 @@ */ =20 #include "qemu/osdep.h" -#include "hw/core/qdev.h" #include "qapi/error.h" +#include "qom/compat-properties.h" #include "qom/object.h" #include "qom/object_interfaces.h" #include "qemu/cutils.h" --=20 2.47.3