From nobody Fri Apr 3 02:05:29 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1774451940; cv=none; d=zohomail.com; s=zohoarc; b=b+E3xW10TGYTxTanvFX+F8ri7V7ktvY29dCNddprhGosKgFpcRVXHi7JaUQRC5HP/pCMKcJq3We8AQ/fP0AH0LZSFva3al+o38RCETM0LUIURu8YB+alYhrt/DYnHxUOvtJVDfZ2h49ZWQE5IRw6EMFN/Xs5HDZVKeL/1GsgUD4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774451940; 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=hy+9vnQWvKgE9rUbjn7FvRJO+e6ousybrt19G3s47M0=; b=REKcBhSMnL35UUnbbBeuJGYwSbC2kNCtIn1mbsqoipNC6536e+pHTfC5QwaqDqNB6ICPDfPBuwJ38lXjneJeMew1t1OFejX516ad8VvxWhA+zv9EMGXZamM/z4WreeYIdEwoAkLZhDzicJjiZhVGnb/DG3xwnKOP3RJF1jZtypM= 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 1774451940658805.0834364733322; Wed, 25 Mar 2026 08:19:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5PzM-0004aE-Nu; Wed, 25 Mar 2026 11:17:44 -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 1w5PzK-0004Xo-IL for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:17:42 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w5PzI-0007ps-Vp for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:17:42 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4852afd42ceso19662095e9.2 for ; Wed, 25 Mar 2026 08:17:40 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4871738c16dsm22045995e9.30.2026.03.25.08.17.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Mar 2026 08:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774451859; x=1775056659; 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=hy+9vnQWvKgE9rUbjn7FvRJO+e6ousybrt19G3s47M0=; b=LDAQme2VOHwjgebU1CL+uUAQie8G7/E14yoKWgYYb8pAXK8FQ/lBEryvWwTiEmEn9+ donmSHqQgbSpr0HxVfSZKz7UHU9tmSR9mnVhlLw5Rds9O8EgFwSb1qhzGOJc8NDSXfFr H6wu+7froYJTnc4q+HJvfZBavc/kfGAj1CY4p3vVKX9iK6Kt4G4vaVREZCxOzLqtQJWW kxDQ/EN1NUmnmudW3/UnCHd6GVbilo9ijAyZaFt27sDTcd5YQLeYv7uXTeoUnsrsk406 Z60szEM0LG2iRDTG561uKXbQQqoBmuYfbapMfEIikSMAprNcFiW9HA3QCFn2qCJREUI7 QQcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774451859; x=1775056659; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hy+9vnQWvKgE9rUbjn7FvRJO+e6ousybrt19G3s47M0=; b=nWl5p+PDBFSMsTrarOq+RwaDt+bS2Ye6rAjl0wdX1RhAYaESh/JgxllqFo7t7uUMcV 7turGsJplaYZmy3EbKvRNXy8xVFgV+l0spbTgMLbJoRucPsrtr+NqLIu8J2PXOm6uBtT ytnYgnY8VYXh6qDBcF7nwpcaAoK8a0EhnB9tTbF9mXLovKI9Jsw23lL7fEkdJ0/FomyJ clwCiVECDraeOtQgbqKsJ8UjkgtyLF3EAe7SxfjIwgVJTV25hik0HYAkRMdcN1HcPMBo bF7LV3ELVTCE4844UzXu3LrHDsJmiwdSFg2AA/JEY7Xs9J4fL7iVYlQF7QLzg8a86xcs LlSw== X-Forwarded-Encrypted: i=1; AJvYcCUjImZPD1ufcYTaa/l9C9SKHNen3kf3ILM9QY83iucUTulvCihhvTkZQ71LCDiNhU1farlBVPCcacSe@nongnu.org X-Gm-Message-State: AOJu0Yy9jA1n0tTZlPRzRW9WNxn34lSge/8XDBUI9rpeX862TOJayQam IXEKEm0UA28+PuUPk0jTHz22VVFj8IDT4rPmtqdgF248Z2eUe00nvMV7UawvXXWxn7k= X-Gm-Gg: ATEYQzyepcFDc1F9N834rDLE/T1F9/N6/tTtXRJyEzHpAV845WhTTSFiX08R8oDM5B8 hhV7/tz8DlIBcLRjkllTi4WxePxCRp4yfeSFNYReIv4Z4NVdRosUZ7dVZg/kiO5D+QuJ0G0LyjW QtDmo2QHIgLPyS80aZkMXqs9C4/PBJdrkC0f/O1I/nGZ9r9dvxZkBbtJx2SavEpIzWiZzNFlz4s RgKhkCIBl3aPpdWU6DuNXUcC27hJ8vtH6k2jhUC5dJCvY8Flp0sDkNxnJLGd3EADfZAmFzcw5H8 Z3+hvS5xqw0BVslgt9OewjUPTYA/aRKUXUehYVrzbGVMtHQ6BCpFsW4Z+GnIOWrLakqEF+pcaAw U99pKMYZwKFyxmUspSFx3eYqqWAdg3Wlp7Q1DT36MKj36TCA6x5KuIQZXaL4nQwM9Jgp9Idftsc fr8zecUW9YuydZvMTwxxNQ5vzjz0REe+W59/TtrCdhvPbG2A2uQZsgC5YqZlfqSSLX+eI9wOs3 X-Received: by 2002:a05:600c:8b2a:b0:485:379b:57bb with SMTP id 5b1f17b1804b1-48715fc3793mr56408115e9.3.1774451859292; Wed, 25 Mar 2026 08:17:39 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , kvm@vger.kernel.org Subject: [PATCH-for-11.0? 1/6] MAINTAINERS: Separate QDev section from QOM one Date: Wed, 25 Mar 2026 16:17:23 +0100 Message-ID: <20260325151728.45378-2-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260325151728.45378-1-philmd@linaro.org> References: <20260325151728.45378-1-philmd@linaro.org> 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=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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: 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 @linaro.org) X-ZM-MESSAGEID: 1774451942931154100 QDev is about QEMU devices model API, while QOM is about QEMU object model in plain C. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael Tokarev --- MAINTAINERS | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index cd8ba144506..64466cf4082 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3546,24 +3546,29 @@ M: Paolo Bonzini R: Daniel P. Berrange S: Supported F: docs/devel/qom.rst +F: include/qom/ +F: qapi/qom.json +F: scripts/coccinelle/qom-parent-type.cocci +F: scripts/qom-cast-macro-clean-cocci-gen.py +F: qom/ +F: tests/unit/check-qom-interface.c +F: tests/unit/check-qom-proplist.c +F: tests/qtest/qom-test.c + +QDev +M: Paolo Bonzini +R: Daniel P. Berrange +S: Supported F: docs/qdev-device-use.txt F: hw/core/qdev* F: hw/core/bus.c F: hw/core/sysbus.c F: include/hw/qdev* F: include/monitor/qdev.h -F: include/qom/ -F: qapi/qom.json F: qapi/qdev.json -F: scripts/coccinelle/qom-parent-type.cocci -F: scripts/qom-cast-macro-clean-cocci-gen.py F: system/qdev-monitor.c F: stubs/qdev.c -F: qom/ -F: tests/unit/check-qom-interface.c -F: tests/unit/check-qom-proplist.c F: tests/unit/test-qdev-global-props.c -F: tests/qtest/qom-test.c =20 QOM boilerplate conversion script S: Orphan --=20 2.53.0 From nobody Fri Apr 3 02:05:29 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1774451903; cv=none; d=zohomail.com; s=zohoarc; b=niYUuY8mcSAmqFrnDgBGqQsOsKqyBbVJ7vVl1s4O0dX7eTbizVTYOUYt5LIMMsjytnQ0f3y8jU2TwgnxgR4IGAwtviVMmPHwhB5+Rhz130gX3dDGmNj/s2JD9VUSBnsFQxU8LigcaeQnqXovJ4/TpqzzMwpKtojd6YwcMjVIU6g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774451903; 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=AGrRVHKmEX4IQk7MCycV3cbvFt2/hR4jH0QSvJAAcyQ=; b=cQhw1ZHHu7ODUEO4J1nBlKlYTLvpJSKCeHPOdzQu434+vbxZPLbFrwdoY1DN5YIVIU4YTrNFw2CVhaB1/SBYK1qfGzRFAfIfz6RiIeOrUGcSpqy/L9zvtwtVmcEVImER4rXjELqA+zzaoZhH4oFRfA8M+tPYbRmbLHcPLZJvadw= 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 1774451903453496.298093514407; Wed, 25 Mar 2026 08:18:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5Pze-0004eo-Vk; Wed, 25 Mar 2026 11:18:05 -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 1w5PzR-0004b1-Od for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:17:50 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w5PzQ-0007za-Aj for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:17:49 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-439b9cf8cb5so2884241f8f.0 for ; Wed, 25 Mar 2026 08:17:47 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b919e708asm340519f8f.36.2026.03.25.08.17.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Mar 2026 08:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774451867; x=1775056667; 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=AGrRVHKmEX4IQk7MCycV3cbvFt2/hR4jH0QSvJAAcyQ=; b=dYpMoroFSX5aJl4vJQkeqwj+xvsBexx3X7fKjtaG0UKV/TmLs8+TqjjsF2UyGiiP+Y URMdjrXWg0iup8zZESfDZbnbpux9M24C/SMph3O9xgrW8lE9hCEMX8KCCDnPEZfSW4yb KsjA6bSf9al1W9/us4oLfgSqypIno1VfmaP8jYhavI7njnsDeWKn8lTYCrNY0N8sV0Pl 7h9kXZPXfyvh3K+eH6jFp4bhM04XeI838po4jHXYmU4nYTh52ffZVcJK+2KacORLFUP2 zzxjlW7tvk7cBCqxw1KyFarOHQsx1TXbm8XpE7ztKLiSQxGMwRYwzsyuI7btTnVhWQxG gurA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774451867; x=1775056667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AGrRVHKmEX4IQk7MCycV3cbvFt2/hR4jH0QSvJAAcyQ=; b=XIQZqyDxWD3kyunJSF4FiRyYb8pAn/ayKg2+lC09ciZ5U5fli/e7wWimReXkGd/EUP qM1P4Jz401bVx/Iwth2Mvwu31KER31QeL49GUf5Qr8NtAT6nGm65o6HCtcuEgWGgaJQB SgAtprpzd5Eycp/jNOpfhe5c42lmdpqVYuEIZDTICSSNIoNLQ7Mqbu5XuAYcI4iSYitw a3do4cVN2wT/mesbYl7RwBoEEcArOgazgPbF/R54joSqtQXD5Y3Q5KNP+iGorgECe6OV B+MKi9ZKxl9pW3VM+aWcHjzxGOytfoMY48fvDoH45mxRLAzh4lCLL9WFDgOq4vcbxtip MFug== X-Forwarded-Encrypted: i=1; AJvYcCU2rnJ0HgYrXFvyCSMir1fByIAJgGrBTKZfz4+CKD84zymfOfnVFz70oWJ+QEqtu3Jrroiun/PWU8DG@nongnu.org X-Gm-Message-State: AOJu0YzYEankCW2k0oeZD5rzm+JTioenthhR1568aZO7p2MQmNNgszZF e0Yf+QoWk/haAJs/QBdgPgLHX3hPAzAZpGCIHANl0ekK0mIl9GJ9UIgEn+rpqB4RguU= X-Gm-Gg: ATEYQzwWSrNf3f4z4zR3lHcdVZERNIKIXEfymS+psMl3TlIKAsqwEegqAA3ikTvi4gz 2VTLlvjs0LVryTLcpswOrSvNZ1UsVnaqd5gc2uhWvIPU+fPl2ZulnoUvKnpzgoBuz2ZB2AiQnBZ YPiXTDDi3q412fe6tEpFIT1Vv+tewdCIvdob91O+ekSR52A9zOEvPsj3EWCvFXTj/7iGfXdvOFJ hqsjS2uj34R8z7qUnYpYboC1WeiZlkuzOFIXffRjQqKlHmjFZUeU+nOwcsYNXUe2tEPp/n9Q8N8 9aEHQYK6qYvC33Tv1LwqFXRkcjM24k/B436qqNihRI0XqaOX4drdF1s8VOI0YoJ4KRKZXBdHBc4 tqoPlaNOyFdBL5xxLx1e9Y8ZeF6USYjyNXnw3Tw8J3NjnUMI4bprUvFu/zeassjFMTQp1pw9i6M dtA34BDz23Jjfu4S0SAjo7f/HkX59uMEHia3mZKMzfHTXaZRAf6zIN7DmAuFwdskUCIfU1uTOP X-Received: by 2002:a5d:5d0a:0:b0:439:cd10:aaf1 with SMTP id ffacd0b85a97d-43b88a960a6mr5401366f8f.53.1774451866504; Wed, 25 Mar 2026 08:17:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , kvm@vger.kernel.org, Marcel Apfelbaum , Yanan Wang , Zhao Liu Subject: [PATCH-for-11.0? 2/6] hw/core: Move compat_props_add() to 'hw/core/boards.h' Date: Wed, 25 Mar 2026 16:17:24 +0100 Message-ID: <20260325151728.45378-3-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260325151728.45378-1-philmd@linaro.org> References: <20260325151728.45378-1-philmd@linaro.org> 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=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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: 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 @linaro.org) X-ZM-MESSAGEID: 1774451906352154100 compat_props_add() is only used by board models, no need to expose it to any device model. Restrict by defining it only in "hw/core/boards.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael Tokarev --- include/hw/core/boards.h | 10 ++++++++++ include/hw/core/qdev.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/hw/core/boards.h b/include/hw/core/boards.h index f85f31bd90d..b7138f2715e 100644 --- a/include/hw/core/boards.h +++ b/include/hw/core/boards.h @@ -804,6 +804,16 @@ struct MachineState { } \ } while (0) =20 +static inline void +compat_props_add(GPtrArray *arr, + GlobalProperty props[], size_t nelem) +{ + int i; + for (i =3D 0; i < nelem; i++) { + g_ptr_array_add(arr, (void *)&props[i]); + } +} + extern GlobalProperty hw_compat_10_2[]; extern const size_t hw_compat_10_2_len; =20 diff --git a/include/hw/core/qdev.h b/include/hw/core/qdev.h index f99a8979ccb..778617787c7 100644 --- a/include/hw/core/qdev.h +++ b/include/hw/core/qdev.h @@ -421,16 +421,6 @@ typedef struct GlobalProperty { bool optional; } GlobalProperty; =20 -static inline void -compat_props_add(GPtrArray *arr, - GlobalProperty props[], size_t nelem) -{ - int i; - for (i =3D 0; i < nelem; i++) { - g_ptr_array_add(arr, (void *)&props[i]); - } -} - /*** Board API. This should go away once we have a machine config file. = ***/ =20 /** --=20 2.53.0 From nobody Fri Apr 3 02:05:29 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1774451930; cv=none; d=zohomail.com; s=zohoarc; b=GTwWWP85/0Fv8hJz+epL3FXlC9KEdP5EmH3vt60W2mdMWuXCiQAXbVn7oAi5gkjwll476AdOmMrt/GRqkgn4RxvpZyYuAkjelw6avjMEHRKMkTLzma0Y8eQizVkUY/JaL4aZogP72SfZkGwwJJFiTffB/Zt2AQYDThvpBN+PAQw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774451930; 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=XA8bPid9+EKsdhouBQu4lXqcrGO4SDDhjT8ZDU7r9Ac=; b=FagNmvC7KUS4n6+xT/U2uENFQ8b6BzBqoIcrGhWy+pwtKUIwtYrlXGFPCLOU9ov4FhsT36akGqJpINpYIQNbW7bEib42Agc/+RdiC1PDci+YELjVi82CL+XREnrMxfpf4X7PLZjq+BPIEM7j+vx9Ahh4FuvDJqHyi3viimqPqdo= 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 1774451930800346.2627175782733; Wed, 25 Mar 2026 08:18:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5Pzm-0004mt-DC; Wed, 25 Mar 2026 11:18:10 -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 1w5PzZ-0004ed-QP for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:18:00 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w5PzX-0008F3-Li for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:17:57 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-486fe2024a9so39613595e9.0 for ; Wed, 25 Mar 2026 08:17:55 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4871174f2cesm139322565e9.10.2026.03.25.08.17.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Mar 2026 08:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774451874; x=1775056674; 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=XA8bPid9+EKsdhouBQu4lXqcrGO4SDDhjT8ZDU7r9Ac=; b=gDlBNZryujxUPYMA8/BnVCijWZf0qp420J55G+vf7tKSN3x8Pqv3FIwmQo7jm5P000 ELP//bkrzYHGVzV6jQXa39QuJffo/c43gXnhHDNRqLc2jfUv469WTQERcU7nVVfwu4xe 5Cq8GvnUqSNQ5NGjFSGs6BQBU1SAujyKmBGunygDutb6V9cnE43VFN2hGpluHS0UmvhP ry1wnnUtJYodjUlHqnT5jtKlH44HIPMCwBbppcPbGYqHx5213fvgJEjkTiClB19wBNgz mQ43h7ly8wDlkG7bZZUPB5Wp7VyFOU250iaM2EUr+KOokPkICGfMNrCb8909mzsovwzw Y60g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774451874; x=1775056674; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=XA8bPid9+EKsdhouBQu4lXqcrGO4SDDhjT8ZDU7r9Ac=; b=hbUVswK3ZG+NdngZsY8SwE2rzKkRenpYR5MTh4AUWuhq7/cGBs8uXGbwOwHFZ2WEOU Gjao1BEu0swe0V9obe9LaqnZVejFOiJ4mBZiSeZdc9LWVd6TxDJ68LMoYubrQookr5mP FC2MIpLL50Q3l4SgfOeSLKJKdwLS+k9e4FXNh00hpVqDrUqQbSBmUJb56TZkftXFmdOM uvxqBjruNh97RRMUKblNCdBX+XpEGeNsR61eO+ABLGXi+YWSTSe3XU7AIqCCJ0uoq+Dz dU5WCIltWza3rLqQZU2gbQKV33L4ZWHjWEZVSmnlwI0OX1gnkWiu0XF2UL5uBbr5AgY1 6I/g== X-Forwarded-Encrypted: i=1; AJvYcCXKt97bDfeJ82/palTKjoDD98agVgTUiQkaiLVR08vMu9CWg5/0iEgRnYazlImMcc+NxqCP89bkzSmg@nongnu.org X-Gm-Message-State: AOJu0YxhjKc0tF2+z6kb0nERehdYYx4BE0NYqkUDIaw7v+JEgOWm0wDm /FgGoO4na0tlrLA4Z6OONspBpywKR66mdee+lw4Olb5E/2u/yIrPWXYc6ICgJWs5+PfzScKK4YV X2z/7iQE= X-Gm-Gg: ATEYQzyUq+dU++tjwtcDzWnW2lVM+jci0jcNs1lU6U5EXUv8KYoFU741YGb4Gdc/eyd lqYORdX3cogQJitVb/e1B4bKTNk+wO/fZ29OyHfTMi1ga4Q7TrHXQE6qhEne5KlmW07I9TaV1OP Ux4oYoEWYBk88aOE1nBTge7cYVCnADFJ8J+kadYKNhYH9rwbV+hg5SsGqmTSsCZaoyLt20p5C5M e48jEhVlHgO6msEnd72DaQVfTy6edskdF5BAzGF6W9/fy4XFdqVI14h6NCk8O5VfYaqCWbuqEtm hgPIuiVrNjmoctaGqvyW4ImLABB/21yvMkzgRNkUmeddgrplnB9xThK+FSU/09lPYmMSTt0Rv+x SCOYQWSWtKjV93AUSsi5IkypdYaOMCZ5a1SabBF/VyWHOJv/b3gPKy0IQbQhEP13lgY6LxMmQxI xlBQP0QPFV0nxOk8pIFDrbWPNo/IZwHMKopmLRRIh8coyWUs1rETfjLs0auMjmo+DJPuIvnNp3 X-Received: by 2002:a05:600c:1f12:b0:486:fdca:ea8d with SMTP id 5b1f17b1804b1-48716050758mr55535255e9.25.1774451873986; Wed, 25 Mar 2026 08:17:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , kvm@vger.kernel.org, Marcel Apfelbaum , Yanan Wang , Zhao Liu Subject: [PATCH-for-11.0? 3/6] qom: Declare GlobalProperty structure in 'qom/compat-properties.h' Date: Wed, 25 Mar 2026 16:17:25 +0100 Message-ID: <20260325151728.45378-4-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260325151728.45378-1-philmd@linaro.org> References: <20260325151728.45378-1-philmd@linaro.org> 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=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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: 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 @linaro.org) X-ZM-MESSAGEID: 1774451933840154100 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 --- 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 b7138f2715e..ec8999c0e14 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 d8745d4c65f..17543957a6c 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 778617787c7..337d69ea2c3 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 00000000000..6e44aabc26b --- /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 ff8ede8a328..838b1d2b225 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.53.0 From nobody Fri Apr 3 02:05:29 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1774451917; cv=none; d=zohomail.com; s=zohoarc; b=e9M8+w+KHSoAV5/egRygasE3HeHrwiLu+fsIUSspT7OseIJEfwz+/6FjbqILb4lZAARQRm24mPHTS/JV1B+eI3OFc8tiL+cGB0XDEoCqSt7LsqIofwZEQS9BuQjRntC7hZxAFeLwiIblCwn99aWVT9toXFCSESPtNdigZsAbjpM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774451917; 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=QxrAV8rmf30CF98liKz5B3rdomtAez5skkM9aGRME4I=; b=GQh8MFiX0mVAE+MpN5sH4PZNzPTckYjA3dFJcojGZEgM1JkVUIMKeIFnS7rhCP7zxMMLQHpHNyRARbd9ctrY6QIidNnFaYl/kV22YMShPqEKNd3+q8Fbb38tPnGVx3Zy/DEG55vFPGopTRlzX0kiyDLXnTZKaCGBt3x0eTJuRYI= 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 1774451917339241.59003618622648; Wed, 25 Mar 2026 08:18:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5Pzn-0004qj-Fs; Wed, 25 Mar 2026 11:18:11 -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 1w5Pzi-0004kv-PH for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:18:08 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w5Pzg-0008Q4-7S for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:18:05 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-486fd5360d4so30229295e9.1 for ; Wed, 25 Mar 2026 08:18:02 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b919e265csm466393f8f.32.2026.03.25.08.17.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Mar 2026 08:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774451882; x=1775056682; 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=QxrAV8rmf30CF98liKz5B3rdomtAez5skkM9aGRME4I=; b=dgc7cLLR8UVmC8uoFDu+LeCwu1elh5cmVYIGeJgzF6Tq1+zSmFPD0O6ygCB7j9q3uH fBakTQojCGgCXRAqeJVulBp2cPbx7VwD2N4T3nvYarZkr86GyDKgopgZvH4IkPOYDdiO R5ZabHcAxRU3v+EF0IBwKVPGsQKrGJzf6637DgL5e8B5/hqFKtocdaBWdftZXZOuonfO GJQoxkviSqjqGiaVR2homItntotRoG8mX3RXr3tYEZ5j1boUhc5B1KnXnpxcmMPTVJrL KkB+mKVZDbvGCshwuo4OA48ojP6yDRNzaYgxykQgdyngTpqqoayyUNvJdypoTWOChYAh 2Yww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774451882; x=1775056682; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QxrAV8rmf30CF98liKz5B3rdomtAez5skkM9aGRME4I=; b=AU5AhuaFSpqjAtwE7UglxfiMR2nfOWrtA2wAR8rok6aq3YHGrIwg6JPpFkyJKzaequ 0SW6JLCxnokHSRe5k86/n8elc+CfibsbLdwxecSpRy8tAC3JtUi5agcyNgzHuDs1/E4X lpxIWFfMwRh2PojkPCX0R0Wp+kNTDyan4d1rOYjSuh5EJZbkUx73eUSVY7jAbA7/IwKG GUrOGMhtO5npT5ugvsOoqkYPpgdNiEH3kMAr+lAim3GvQt4GH53+mk5qw2mUDSkDtBdY JtOUHWUJhZFR3wZXefL75sRioWSwrRfu1l3AbVHuoOEQ33fuCU5yRQrfI6CrLzb9hZj+ ITsA== X-Forwarded-Encrypted: i=1; AJvYcCUgV6CqN6hPtRsWGTV40m+ZucHcs1h7yLsz6px4kDw8pUJm61kkznV3DleGD7QoMa41AWToKcW4Gwtx@nongnu.org X-Gm-Message-State: AOJu0YwurXOccodE2SlxyPQeFv9vITIopKCFbkUcG0mVZvpU7lsUtUsP oFet//Xm38pJT8Shl9wLSv5A8zUJLL+6mXiGfJSmLI7wRFMY/cdJKN7HFLoaG7Aj0u0= X-Gm-Gg: ATEYQzzMRwqaXs64hoIvO/EBoTwHY/p4FmGjh9C9Go3pxxPdz+A2L24YymakUqKuGgC 176rUAHq03xQ9VGkZzl5cd9bzev3V6nC8xw4GiMKaHRuJ4euEAA+claYXaU+iIaneWM8csJrf4T HUcAeueteO3HO7UDjmRU9petxUmRsVBQiLIicJtrWLFKLiO/4S/Kxju80jY3W+Pl4buy03O4n4E cK9saNUzXoVohzqAwHqDLgeRxF+KpiAaiO7l3mKl9Wht3YwsvwOVB/IRkPz4YtXE7Wjbe83I5eJ GI3Sddm9rQMkXW+9OvR7n1rAXhenJktpcSQ2MAGUnrRH7NOa/3C5Ut3cHepi3bRZbC3SgSM+eNC AU+LUjgHzhzWzGClb+1aOgeFPPCNGlDF7ZgQRlyslxaW5xEYh487GK/cKsY8xo0ZA7BZjNpRoxA Vws3sqEhmgw0FTsV1uJJXXiN6nzCB8Akdl3/xsZaOn3vmwzsl1OB6Yc7FpMh6WKCOTiGapqy4I X-Received: by 2002:a05:600c:1e2a:b0:487:18c:7acf with SMTP id 5b1f17b1804b1-4871606d963mr61278415e9.25.1774451881686; Wed, 25 Mar 2026 08:18:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , kvm@vger.kernel.org, David Hildenbrand , Igor Mammedov , Marcel Apfelbaum , Yanan Wang , Zhao Liu , "Michael S. Tsirkin" , Marcelo Tosatti Subject: [PATCH-for-11.0? 4/6] qom: Declare compat properties API in 'qom/compat-properties.h' Date: Wed, 25 Mar 2026 16:17:26 +0100 Message-ID: <20260325151728.45378-5-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260325151728.45378-1-philmd@linaro.org> References: <20260325151728.45378-1-philmd@linaro.org> 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=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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: 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 @linaro.org) X-ZM-MESSAGEID: 1774451921408154100 While most of QEMU files use the QOM concept, few of them use the compatibility properties API (mostly use in system emulation). Move its prototype to a new "qom/compat-properties.h" header, keeping "qom/object.h" for generic QOM. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael Tokarev --- include/qom/compat-properties.h | 8 ++++++++ include/qom/object.h | 8 -------- accel/accel-system.c | 1 + backends/hostmem.c | 1 + hw/core/machine.c | 1 + hw/core/qdev-properties.c | 1 + hw/core/qdev.c | 1 + hw/i386/pc_q35.c | 1 + system/rtc.c | 1 + system/vl.c | 1 + target/i386/sev.c | 1 + ui/vdagent.c | 1 + 12 files changed, 18 insertions(+), 8 deletions(-) diff --git a/include/qom/compat-properties.h b/include/qom/compat-propertie= s.h index 6e44aabc26b..90f8320adfd 100644 --- a/include/qom/compat-properties.h +++ b/include/qom/compat-properties.h @@ -29,4 +29,12 @@ typedef struct GlobalProperty { bool optional; } GlobalProperty; =20 +void object_set_machine_compat_props(GPtrArray *compat_props); +void object_set_accelerator_compat_props(GPtrArray *compat_props); +void object_register_sugar_prop(const char *driver, const char *prop, + const char *value, bool optional); +void object_apply_compat_props(Object *obj); +bool object_apply_global_props(Object *obj, const GPtrArray *props, + Error **errp); + #endif diff --git a/include/qom/object.h b/include/qom/object.h index 26df6137b91..510885218ba 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -700,14 +700,6 @@ Object *object_new_with_propv(const char *typename, Error **errp, va_list vargs); =20 -bool object_apply_global_props(Object *obj, const GPtrArray *props, - Error **errp); -void object_set_machine_compat_props(GPtrArray *compat_props); -void object_set_accelerator_compat_props(GPtrArray *compat_props); -void object_register_sugar_prop(const char *driver, const char *prop, - const char *value, bool optional); -void object_apply_compat_props(Object *obj); - /** * object_set_props: * @obj: the object instance to set properties on diff --git a/accel/accel-system.c b/accel/accel-system.c index 150af05bf5b..9176665202d 100644 --- a/accel/accel-system.c +++ b/accel/accel-system.c @@ -25,6 +25,7 @@ =20 #include "qemu/osdep.h" #include "qemu/accel.h" +#include "qom/compat-properties.h" #include "qapi/qapi-commands-accelerator.h" #include "monitor/monitor.h" #include "hw/core/boards.h" diff --git a/backends/hostmem.c b/backends/hostmem.c index 15d4365b697..cd2085fb3cd 100644 --- a/backends/hostmem.c +++ b/backends/hostmem.c @@ -18,6 +18,7 @@ #include "qapi/qapi-builtin-visit.h" #include "qapi/visitor.h" #include "qemu/config-file.h" +#include "qom/compat-properties.h" #include "qom/object_interfaces.h" #include "qemu/mmap-alloc.h" #include "qemu/madvise.h" diff --git a/hw/core/machine.c b/hw/core/machine.c index 6cf0e2f404e..6290b3556ee 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -21,6 +21,7 @@ #include "qapi/qapi-visit-machine.h" #include "qapi/qapi-commands-machine.h" #include "qemu/madvise.h" +#include "qom/compat-properties.h" #include "qom/object_interfaces.h" #include "system/cpus.h" #include "system/system.h" diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index ba8461e9a42..73539c727b3 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -10,6 +10,7 @@ #include "qemu/units.h" #include "qemu/cutils.h" #include "qdev-prop-internal.h" +#include "qom/compat-properties.h" #include "qom/qom-qobject.h" =20 void qdev_prop_set_after_realize(DeviceState *dev, const char *name, diff --git a/hw/core/qdev.c b/hw/core/qdev.c index e48616b2c6f..b36101f3a75 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -32,6 +32,7 @@ #include "qapi/visitor.h" #include "qemu/error-report.h" #include "qemu/option.h" +#include "qom/compat-properties.h" #include "hw/core/irq.h" #include "hw/core/qdev-properties.h" #include "hw/core/boards.h" diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index cb23322f5a4..6a0967ecd18 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -56,6 +56,7 @@ #include "hw/usb/hcd-uhci.h" #include "qapi/error.h" #include "qemu/error-report.h" +#include "qom/compat-properties.h" #include "system/numa.h" #include "hw/hyperv/vmbus-bridge.h" #include "hw/mem/nvdimm.h" diff --git a/system/rtc.c b/system/rtc.c index 56951288c40..f13dd392a76 100644 --- a/system/rtc.c +++ b/system/rtc.c @@ -28,6 +28,7 @@ #include "qemu/error-report.h" #include "qemu/option.h" #include "qemu/timer.h" +#include "qom/compat-properties.h" #include "qom/object.h" #include "system/replay.h" #include "system/system.h" diff --git a/system/vl.c b/system/vl.c index 38d7b849e0a..ec31fd76c0d 100644 --- a/system/vl.c +++ b/system/vl.c @@ -119,6 +119,7 @@ #include "qapi/string-input-visitor.h" #include "qapi/opts-visitor.h" #include "qapi/clone-visitor.h" +#include "qom/compat-properties.h" #include "qom/object_interfaces.h" #include "semihosting/semihost.h" #include "crypto/init.h" diff --git a/target/i386/sev.c b/target/i386/sev.c index 9dde972c118..261b6aaa37b 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -36,6 +36,7 @@ #include "system/reset.h" #include "trace.h" #include "migration/blocker.h" +#include "qom/compat-properties.h" #include "qom/object.h" #include "monitor/monitor.h" #include "monitor/hmp.h" diff --git a/ui/vdagent.c b/ui/vdagent.c index bb0c4aa14ca..bb55cbefc9c 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -5,6 +5,7 @@ #include "qemu/error-report.h" #include "qemu/option.h" #include "qemu/units.h" +#include "qom/compat-properties.h" #include "hw/core/qdev.h" #include "hw/core/qdev-properties.h" #include "migration/blocker.h" --=20 2.53.0 From nobody Fri Apr 3 02:05:29 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1774451913; cv=none; d=zohomail.com; s=zohoarc; b=O7hyHxeM0gAkDaRI9BGVJ6RQghC3sznQzGQccbznsLie8/mRIPLVMWa1IJEtRWjnaeNDoK7s441W6kiA1GOHOXeK0pfTA/cNghlY0TkEoTY0w49Yy6SOFuMhTqSDvkhBofQgTEUhkRbhWWleGaADI/vMKPvk0YBl4b4BHSCCQXQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774451913; 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=jek66EmZwh90Q0GbeJB2FKCf8mZ1pqgxf9FHcRMVDAM=; b=dAs+928Mbq0hk24JdMofwFiDCoToobH/EOqzkfRzziuiPj+QSEkL2bpV8xgacyWnvXN4pm+72CV22L3sPn9xoydqSZu9C5SjcS590pN93pSFS8Elo7Jes8NxvQQh2vZzoENtPpUbwT/4Q9bCYfWz9FfROAUopBvtfHs4q8uXWJM= 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 17744519135101004.2151941589863; Wed, 25 Mar 2026 08:18:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5Pzt-00055e-JT; Wed, 25 Mar 2026 11:18: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 1w5Pzo-0004vJ-Cl for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:18:12 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w5Pzm-0000Gd-Ej for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:18:12 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-486fc4725f0so10702905e9.1 for ; Wed, 25 Mar 2026 08:18:10 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4871174f2cesm139339185e9.10.2026.03.25.08.18.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Mar 2026 08:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774451889; x=1775056689; 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=jek66EmZwh90Q0GbeJB2FKCf8mZ1pqgxf9FHcRMVDAM=; b=An+Vzzv5JYxqrmfKsXRY942e61w+UibF/N83A3HPn8vNZ06rGeE7OoZoONLjq6jAxZ UQP2JnHEjWDBrAydbvpRryA3e7VXu3vvF2TmlWSM9a+EWt6FcNvQMBrHH2l45UPvBzrs jGm+0XneZ6mSn6gVfAIxsbsj+QJq6yQZaM8GiQnYvkQGR1UsjtcHS6jhS2nRrUubDVce cn/51HlJNsv31fJmK0w/Pt4OSO1mp0zymM5ihUlpjd/52s5+Hs29CUP9x0j5FFH8PG+e Zf8Xsk/INKexB/JMwdcRbwFi7DLAfXcoNkW6WZj0W9UHKFij3ziRsOgqXlGHbKXi9f9Q 7jqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774451889; x=1775056689; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jek66EmZwh90Q0GbeJB2FKCf8mZ1pqgxf9FHcRMVDAM=; b=eEMho61lkW/4nMOwPpPcd6e9q1I4/khRRYQWhx0Yr9Aq9eYoBVv+/Eh2Y6X8kAJ/Df TA1pd7ybuS0Wl/PyfclkUP2zNfGmYG/J0W6mIrq8BSR/7a37XAMDzuyltn0Hq/qZHYBS XnJN1FZGiXoNxjtfaR6KOKyGOOH0V67swqxYWMbq6HmTsHDvIlOpOst2DGNMU4L35+Y4 knk2fteKFzsee0uPNg9kz7YS0DYvgi3cVJHR1VS4M17L467vuO1vZ1KELEh2Pnu+xyKw tVcXD/wGkmx+1cQHFlSvf8lElWfTFGxmGO+GLg8RhWSRvuFjH+mLgHMBJZxUKeHfmBXT 6v7g== X-Forwarded-Encrypted: i=1; AJvYcCU5i45xyh94bCO+yBrQvYPVidNNMqqFeJcmxfrGACxr7S2myh7wk/u0e9FqHVSl+KYLaoIgb18BqN+Q@nongnu.org X-Gm-Message-State: AOJu0YycXfnLVov0pYukgYJQxYErpKZxBxb6Bq5cRQ2aOdgBfCBwDgpf bDQgxnp/4TvtjfL8qTT7zLO48hZYZ1l+7K+Na2K645dV3K+X9M0nR7jETy/Br2nMrcmaG4I3rTn tJ69zMho= X-Gm-Gg: ATEYQzxuSz3xURh8aDqwkH9umVWO0rTams6X5CI0WZauYi1i/q4vbneC+3wFelRtBxe MGLyE8Zj2n/9m0LSWYo2RD35EpTezV1/n2TnHiwjhbxTUYXYn1ulZMj0E/zvGylDAjfAZhQTfBy Lu/qWCGI1anTcWps48PPMCNmdl7uAdY9NQu2W+91eTFtIqj5UOwPd8j2duqGLZ+SWxejiJkyHxC O8lFIfFD+uOLgUhezSurX1fc9U+yhxPNjyHVwlVhMqFz1tLVisp4h8HTt77UCO3i0G1TZb1gd3J +ffqCSsAIDMm6104d73hsXAdyjVfks4xmJ71wbmg1nkokbfogYrY2zt08hVQ8js6xoU8sPNE4IF 6FHRs5zwOqlQ6E5qIADRZp7K58yPvr416bH5DfI1034BIm2mHAZxLbbuBwlWZSdcUG6L9w+GxeL ykg0SJF4+kOD9VXt93wiCve0Z+ET/wdResa9XTpnL4eOBv+c0Op12ujgIkOmLN+JRsQCWLyc8Z X-Received: by 2002:a05:600c:6814:b0:485:3c11:de84 with SMTP id 5b1f17b1804b1-487160a2589mr53284815e9.14.1774451888875; Wed, 25 Mar 2026 08:18:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , kvm@vger.kernel.org Subject: [PATCH-for-11.0? 5/6] qom: Restrict compat properties API to system emulation Date: Wed, 25 Mar 2026 16:17:27 +0100 Message-ID: <20260325151728.45378-6-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260325151728.45378-1-philmd@linaro.org> References: <20260325151728.45378-1-philmd@linaro.org> 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=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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: 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 @linaro.org) X-ZM-MESSAGEID: 1774451914045158500 Move compat properties API definitions to their own file unit, compile it only when system emulation is configured. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael Tokarev --- qom/compat-properties.c | 116 ++++++++++++++++++++++++++++++++++++++++ qom/object.c | 100 ---------------------------------- qom/meson.build | 3 ++ 3 files changed, 119 insertions(+), 100 deletions(-) create mode 100644 qom/compat-properties.c diff --git a/qom/compat-properties.c b/qom/compat-properties.c new file mode 100644 index 00000000000..f8d9b0036ae --- /dev/null +++ b/qom/compat-properties.c @@ -0,0 +1,116 @@ +/* + * QEMU Object Model + * + * Copyright IBM, Corp. 2011 + * + * Authors: + * Anthony Liguori + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qom/compat-properties.h" +#include "qom/qom-qobject.h" +#include "hw/core/qdev.h" + +bool object_apply_global_props(Object *obj, const GPtrArray *props, + Error **errp) +{ + int i; + + if (!props) { + return true; + } + + for (i =3D 0; i < props->len; i++) { + GlobalProperty *p =3D g_ptr_array_index(props, i); + Error *err =3D NULL; + + if (object_dynamic_cast(obj, p->driver) =3D=3D NULL) { + continue; + } + if (p->optional && !object_property_find(obj, p->property)) { + continue; + } + p->used =3D true; + if (!object_property_parse(obj, p->property, p->value, &err)) { + error_prepend(&err, "can't apply global %s.%s=3D%s: ", + p->driver, p->property, p->value); + /* + * If errp !=3D NULL, propagate error and return. + * If errp =3D=3D NULL, report a warning, but keep going + * with the remaining globals. + */ + if (errp) { + error_propagate(errp, err); + return false; + } else { + warn_report_err(err); + } + } + } + + return true; +} + +/* + * Global property defaults + * Slot 0: accelerator's global property defaults + * Slot 1: machine's global property defaults + * Slot 2: global properties from legacy command line option + * Each is a GPtrArray of GlobalProperty. + * Applied in order, later entries override earlier ones. + */ +static GPtrArray *object_compat_props[3]; + +/* + * Retrieve @GPtrArray for global property defined with options + * other than "-global". These are generally used for syntactic + * sugar and legacy command line options. + */ +void object_register_sugar_prop(const char *driver, const char *prop, + const char *value, bool optional) +{ + GlobalProperty *g; + if (!object_compat_props[2]) { + object_compat_props[2] =3D g_ptr_array_new(); + } + g =3D g_new0(GlobalProperty, 1); + g->driver =3D g_strdup(driver); + g->property =3D g_strdup(prop); + g->value =3D g_strdup(value); + g->optional =3D optional; + g_ptr_array_add(object_compat_props[2], g); +} + +/* + * Set machine's global property defaults to @compat_props. + * May be called at most once. + */ +void object_set_machine_compat_props(GPtrArray *compat_props) +{ + assert(!object_compat_props[1]); + object_compat_props[1] =3D compat_props; +} + +/* + * Set accelerator's global property defaults to @compat_props. + * May be called at most once. + */ +void object_set_accelerator_compat_props(GPtrArray *compat_props) +{ + assert(!object_compat_props[0]); + object_compat_props[0] =3D compat_props; +} + +void object_apply_compat_props(Object *obj) +{ + int i; + + for (i =3D 0; i < ARRAY_SIZE(object_compat_props); i++) { + object_apply_global_props(obj, object_compat_props[i], + i =3D=3D 2 ? &error_fatal : &error_abort= ); + } +} diff --git a/qom/object.c b/qom/object.c index 838b1d2b225..f00d659ef0f 100644 --- a/qom/object.c +++ b/qom/object.c @@ -440,106 +440,6 @@ static void object_post_init_with_type(Object *obj, T= ypeImpl *ti) } } =20 -bool object_apply_global_props(Object *obj, const GPtrArray *props, - Error **errp) -{ - int i; - - if (!props) { - return true; - } - - for (i =3D 0; i < props->len; i++) { - GlobalProperty *p =3D g_ptr_array_index(props, i); - Error *err =3D NULL; - - if (object_dynamic_cast(obj, p->driver) =3D=3D NULL) { - continue; - } - if (p->optional && !object_property_find(obj, p->property)) { - continue; - } - p->used =3D true; - if (!object_property_parse(obj, p->property, p->value, &err)) { - error_prepend(&err, "can't apply global %s.%s=3D%s: ", - p->driver, p->property, p->value); - /* - * If errp !=3D NULL, propagate error and return. - * If errp =3D=3D NULL, report a warning, but keep going - * with the remaining globals. - */ - if (errp) { - error_propagate(errp, err); - return false; - } else { - warn_report_err(err); - } - } - } - - return true; -} - -/* - * Global property defaults - * Slot 0: accelerator's global property defaults - * Slot 1: machine's global property defaults - * Slot 2: global properties from legacy command line option - * Each is a GPtrArray of GlobalProperty. - * Applied in order, later entries override earlier ones. - */ -static GPtrArray *object_compat_props[3]; - -/* - * Retrieve @GPtrArray for global property defined with options - * other than "-global". These are generally used for syntactic - * sugar and legacy command line options. - */ -void object_register_sugar_prop(const char *driver, const char *prop, - const char *value, bool optional) -{ - GlobalProperty *g; - if (!object_compat_props[2]) { - object_compat_props[2] =3D g_ptr_array_new(); - } - g =3D g_new0(GlobalProperty, 1); - g->driver =3D g_strdup(driver); - g->property =3D g_strdup(prop); - g->value =3D g_strdup(value); - g->optional =3D optional; - g_ptr_array_add(object_compat_props[2], g); -} - -/* - * Set machine's global property defaults to @compat_props. - * May be called at most once. - */ -void object_set_machine_compat_props(GPtrArray *compat_props) -{ - assert(!object_compat_props[1]); - object_compat_props[1] =3D compat_props; -} - -/* - * Set accelerator's global property defaults to @compat_props. - * May be called at most once. - */ -void object_set_accelerator_compat_props(GPtrArray *compat_props) -{ - assert(!object_compat_props[0]); - object_compat_props[0] =3D compat_props; -} - -void object_apply_compat_props(Object *obj) -{ - int i; - - for (i =3D 0; i < ARRAY_SIZE(object_compat_props); i++) { - object_apply_global_props(obj, object_compat_props[i], - i =3D=3D 2 ? &error_fatal : &error_abort= ); - } -} - static void object_class_property_init_all(Object *obj) { ObjectPropertyIterator iter; diff --git a/qom/meson.build b/qom/meson.build index 81922434309..bd6f4aadd78 100644 --- a/qom/meson.build +++ b/qom/meson.build @@ -5,6 +5,9 @@ qom_ss.add(files( 'object_interfaces.c', 'qom-qobject.c', )) +if have_system + qom_ss.add(files('compat-properties.c')) +endif =20 qmp_ss.add(files('qom-qmp-cmds.c')) system_ss.add(files('qom-hmp-cmds.c')) --=20 2.53.0 From nobody Fri Apr 3 02:05:29 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1774451923; cv=none; d=zohomail.com; s=zohoarc; b=m9Cx9NzlBzBrabEYE5R4/rgfJL/Y88PPDvHeSkr5Hrof9yUOcvcQ4hOgcLTWLoh0quwWJ8bPuPrrUiuv614e1J0TsXGu2Z+ojUid5C3/UUJecMfLvtCavz+L9EX5JOnWGW8TPVskRIiDbcRsOr4/R7JHjx22qihNlFWF38vLOgM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774451923; 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=cHp+isFeJ+Vwq620YK3TTBZ1M5KgDnZyZo3PdDfV4Bw=; b=SRJRFLZLHL58gdBm9tmGa3G5qgu1OPMbOasHQ29Ogi76L9A1EvmxYiqAEvd0iWvV4kiqUf3fPPbwxEgPSkUvvxR22HLageLxzGn7mhqECeVLPcfUDe+ipn8c0pPjmyrdTA+xStRNGbn61hiOj8lXL+zwabenWSBvNaD5iAJqJ8I= 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 17744519229817.237844558520123; Wed, 25 Mar 2026 08:18:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5Q01-0005aL-Rr; Wed, 25 Mar 2026 11:18:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w5Pzv-0005Cx-Mx for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:18:20 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w5Pzt-0000Uy-Lp for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:18:19 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-486fb14227cso27726625e9.3 for ; Wed, 25 Mar 2026 08:18:17 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4871e60322asm1408455e9.7.2026.03.25.08.18.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Mar 2026 08:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774451896; x=1775056696; 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=cHp+isFeJ+Vwq620YK3TTBZ1M5KgDnZyZo3PdDfV4Bw=; b=mFjLHo9jYg43yirpOTJqhwgWbHEJYkPLWr956jdWuSTeBTBt9OIA2aBueU2+fBcwWo +tKCkqTVeiX7/fpF21veSlIlbgXCtvqVnKOv+bWFal0Of+OQwfGXicHDv7oVwUXpy/S3 8ujPuTDTPgBsbbt7XZmp2DRNRATOAY7d7qx8HoPyr1QWsPxpCN6CBRCtS6V01P+jWd0G VAquij1iRRPZHq9u8WTWYlxHkZh0wWqiKo4DwlDU0F4rzaYxXXm1iufHMyvkwukjfRpe 5munUnd4Z4MpIctWb/NL8jtjP6pjRbwGU9Mah7gkTaRBPNtn45xE/ZEOSBri1cXiXjNE IUmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774451896; x=1775056696; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cHp+isFeJ+Vwq620YK3TTBZ1M5KgDnZyZo3PdDfV4Bw=; b=WBMSvTwsj2u9gIFp2ZqnQI/GRPVkPRsaWKBzFHyl+NPdct6SNvYsSOzr1RzsR7EWRi 6QSqGw5hIMIGZdv6Kwc7W3rwziCwU+bhRb9XDQuubii4s1W8hdeYH1Irrq65SrtK+c9U FwntwQj6NEPKqI9BLZvTrli7dAmubi17mMZCnU3Fi4x/8vk3oaTdKe5L7PDJGL6uKBNY gsu7RS/ckl5iFqj3r7xJrrNcWkibk7lIv/PmFn5tv2r00cA4mTK4MjuYKWcxnd9z1KyQ P34o1yS3vc0EkVnciL9Cp40sipzH9+KJPdZAU0FgVTYgaQLJJuJeuYnCHRkMPcr/bf+f ME3A== X-Forwarded-Encrypted: i=1; AJvYcCWhKVoOmeEWDKFtT5ZwUFEHOiTqKFrOZEBtkXEJQL77zet51u64psBRiTeEPE1ZSDXB9kizIhHnHJHe@nongnu.org X-Gm-Message-State: AOJu0YyjdiJkN47jrpn9/8ZMvMk8bVVPpq9XylyLbjFfOQHonnKmlhMU qN9Bqc/WE7tV1aWCbkUuFfQfCr/N/dOH8/Cf1KNXN2WEZyA5sVTzL2/2TR0yJj3NM1TrZ09u0o1 Iy+g7+r8= X-Gm-Gg: ATEYQzxufFDgRrY2e+iMhUhexbMSDdSR+QgOwUZz0qHOnY8+9A5NsPom+6CKSILo7h1 CWTRpC/2NHQe29PRCE4cSyf2HUgb0SEgx7qGr3bB68GFjv/8n2lieyrbQikow4wksW1PhznHpVe CW4cMCjxXnQSrFGC2CYG7PDDcLltXLGRx+umKr8U7nNG5BLcA4uLA49bGMonhJ4gzSDXeER3RLK fvA1Itk91Jgpt3glhf6hD77vkspPgqrukkxSFa2OZgd0FLN8e+rEDsGmw7f0RYqx9Lo1fJfetWQ 9M7xbHZQV5X+kAF10W0IxKpQnPSlsnqHLyCXGVXEtFAeMZR1zMgcF4rrRQpUqPd32Jfsa4xpfJ/ /T+qpzuxVHdR0Z7OHyKX1epjcU/fhd+V1cGgKG5aFhDRiqbNGX4ow6sarnzNxoLngkdn52HPdqk E5W08m8aQXBaxSNJZmt1SOn+aq4zJbE6b2VDFJSgz2FiiJKY+vjmeem/QF/14qWT7V/H7l7RZ83 w4oUSMZxKU= X-Received: by 2002:a05:600c:a408:b0:485:3f58:d9f with SMTP id 5b1f17b1804b1-487160a24e2mr43858395e9.30.1774451895998; Wed, 25 Mar 2026 08:18:15 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , kvm@vger.kernel.org Subject: [NOTFORMERGE PATCH 6/6] buildsys: Allow building guest-agent on 32-bit hosts Date: Wed, 25 Mar 2026 16:17:28 +0100 Message-ID: <20260325151728.45378-7-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260325151728.45378-1-philmd@linaro.org> References: <20260325151728.45378-1-philmd@linaro.org> 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=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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: 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 @linaro.org) X-ZM-MESSAGEID: 1774451924089158500 Partially revert commit range 5053e0a65db...90e2e8ada7c. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael Tokarev --- configure | 64 +++++++++++++++++++++++++++++++++++++++++++---------- meson.build | 2 +- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/configure b/configure index eea90306728..e984ec2bd3c 100755 --- a/configure +++ b/configure @@ -381,6 +381,8 @@ fi if test ! -z "$cpu" ; then # command line argument : +elif check_define __i386__ ; then + cpu=3D"i386" elif check_define __x86_64__ ; then if check_define __ILP32__ ; then cpu=3D"x32" @@ -399,22 +401,30 @@ elif check_define _ARCH_PPC64 ; then else cpu=3D"ppc64" fi -elif check_define __mips64 ; then - cpu=3D"mips64" +elif check_define __mips__ ; then + if check_define __mips64 ; then + cpu=3D"mips64" + fi elif check_define __s390__ ; then if check_define __s390x__ ; then cpu=3D"s390x" else cpu=3D"s390" fi -elif check_define __riscv && check_define _LP64 ; then - cpu=3D"riscv64" +elif check_define __riscv ; then + if check_define _LP64 ; then + cpu=3D"riscv64" + else + cpu=3D"riscv32" + fi +elif check_define __arm__ ; then + cpu=3D"arm" elif check_define __aarch64__ ; then cpu=3D"aarch64" elif check_define __loongarch64 ; then cpu=3D"loongarch64" elif check_define EMSCRIPTEN ; then - error_exit "wasm64 must be specified to the cpu flag" + error_exit "wasm32 or wasm64 must be specified to the cpu flag" else # Using uname is really broken, but it is just a fallback for architectu= res # that are going to use TCI anyway @@ -440,6 +450,18 @@ case "$cpu" in linux_arch=3Darm64 ;; =20 + armv*b|armv*l|arm) + cpu=3Darm + host_arch=3Darm + ;; + + i386|i486|i586|i686) + cpu=3D"i386" + host_arch=3Di386 + linux_arch=3Dx86 + CPU_CFLAGS=3D"-m32" + ;; + loongarch*) cpu=3Dloongarch64 host_arch=3Dloongarch64 @@ -448,7 +470,7 @@ case "$cpu" in =20 mips64*|mipsisa64*) cpu=3Dmips64 - host_arch=3Dmips64 + host_arch=3Dmips linux_arch=3Dmips ;; =20 @@ -464,8 +486,8 @@ case "$cpu" in CPU_CFLAGS=3D"-m64 -mlittle-endian" ;; =20 - riscv64) - host_arch=3Driscv64 + riscv32 | riscv64) + host_arch=3Driscv linux_arch=3Driscv ;; =20 @@ -500,6 +522,9 @@ case "$cpu" in linux_arch=3Dx86 CPU_CFLAGS=3D"-m64" ;; + wasm32) + CPU_CFLAGS=3D"-m32" + ;; wasm64) CPU_CFLAGS=3D"-m64 -sMEMORY64=3D$wasm64_memory64" ;; @@ -1287,7 +1312,7 @@ EOF test "$bigendian" =3D no && rust_arch=3D${rust_arch}el ;; =20 - riscv64) + riscv32|riscv64) # e.g. riscv64gc-unknown-linux-gnu, but riscv64-linux-android test "$android" =3D no && rust_arch=3D${rust_arch}gc ;; @@ -1449,18 +1474,26 @@ probe_target_compiler() { container_image=3Ddebian-all-test-cross container_cross_prefix=3Daarch64-linux-gnu- ;; - alpha|hppa|m68k|mips|riscv64|sh4|sparc64) + hppa|m68k|mips|riscv64|sparc64) container_image=3Ddebian-all-test-cross ;; mips64) container_image=3Ddebian-all-test-cross container_cross_prefix=3Dmips64-linux-gnuabi64- ;; - ppc|ppc64|ppc64le) + ppc64|ppc64le) container_image=3Ddebian-all-test-cross container_cross_prefix=3Dpowerpc${target_arch#ppc}-linux-gnu- ;; =20 + # debian-legacy-test-cross architectures (need Debian 11) + # - libc6.1-dev-alpha-cross: https://bugs.debian.org/cgi-bin/bugrepo= rt.cgi?bug=3D1054412 + # - sh4-linux-user: binaries don't run with bookworm compiler + + alpha|sh4) + container_image=3Ddebian-legacy-test-cross + ;; + # architectures with individual containers =20 aarch64) @@ -1930,7 +1963,14 @@ if test "$skip_meson" =3D no; then if test "$cross_compile" =3D "yes"; then echo "[host_machine]" >> $cross echo "system =3D '$host_os'" >> $cross - echo "cpu_family =3D '$cpu'" >> $cross + case "$cpu" in + i386) + echo "cpu_family =3D 'x86'" >> $cross + ;; + *) + echo "cpu_family =3D '$cpu'" >> $cross + ;; + esac echo "cpu =3D '$cpu'" >> $cross if test "$bigendian" =3D "yes" ; then echo "endian =3D 'big'" >> $cross diff --git a/meson.build b/meson.build index d7c4095b395..ae412263ec7 100644 --- a/meson.build +++ b/meson.build @@ -323,7 +323,7 @@ endif # Compiler flags # ################## =20 -if cc.sizeof('void *') < 8 +if not have_ga and cc.sizeof('void *') < 8 error('QEMU requires a 64-bit CPU host architecture') endif =20 --=20 2.53.0