From patchwork Tue Jan 2 16:04:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 759367 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp6113004wrw; Tue, 2 Jan 2024 08:06:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IGMkpGfbcAr7KEtt+02hiL4g9FPLK0nqsIKiVMWlkV5vewDDvv+0GuDh2V/yCjzb6ciOt1G X-Received: by 2002:a05:622a:346:b0:427:92d6:5fe9 with SMTP id r6-20020a05622a034600b0042792d65fe9mr26027891qtw.19.1704211575291; Tue, 02 Jan 2024 08:06:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704211575; cv=none; d=google.com; s=arc-20160816; b=n/VT3vp94Fnt22q6TFVeljsVtm0/nGpmY3FQlEfjRu/bpj9yXgGcp+CVJjDa1+SEbm Zz9I1MYsVwtuzYKF6y4diPsAGsZmouwOu0qDlxYvu1iEpdEnFDb0oznoxRU05CDSfEKp xF+ojxUhJR9Z5SfseSrdxO2usJ0javqKSFmstdTnnrt1rD3hytTxiWDrJJCLpNpxAIDn i3FK6I6tqzmTYEIT3xgUk/yF2A9GDyarKbe+x7PlwPetcwrS+1VeNvo3mCMtbwDHLr/Z rtUXEa+PQUgW04z+kETw8kw/Kh8lcYW+49kAs20QOhBRbiPsg7hlx1xrOcGuu8zrDb+D +K1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=BRQYwKaD5nL/etQUQHLcvnsdC8oyTg3NrDmrCWZHoMk=; fh=Fbl4rt7vNadFyu+mhE5sPZ2m5GJmVL0UTbP+h3uuTlY=; b=nr61gVenh1U2wjZZf/UsWTV8Mlu0j9HHFsu0F5MfoidLG5boyI/sg09LjZ1vtuK33r HBpxq20kaBu7MLTeOxL+IBNgE6JsJWkoYdgZGkxAp9ZVCi+WBS8whG4cm5pCxiQdztEx rr2eQzl5FkZyxcCActZNYC0aaOy/MFm2maPWOKOjYZUiiBUGUvhnHBt01cSViLiCG94y TjkCwZs8vek60DycHXmCTDiq5NwKjYVS4P2ietdQClH7mXQufAmK80+81vu/n0dNLg2d 8WbtaIESBGsQB0zUjs5NsHscMXFUVqBaxsOiJTcXbKjh/KvLDIyuLcy5/yAT6Yf2uV4A HxmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yYAGIa5C; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f8-20020a05622a114800b00427fcbcd55dsi11753692qty.799.2024.01.02.08.06.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jan 2024 08:06:15 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yYAGIa5C; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKhGX-0006Ft-1p; Tue, 02 Jan 2024 11:05:18 -0500 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 1rKhGJ-0006DH-Qj for qemu-devel@nongnu.org; Tue, 02 Jan 2024 11:05:03 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rKhGG-0002QK-7I for qemu-devel@nongnu.org; Tue, 02 Jan 2024 11:05:03 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40d3c4bfe45so101436625e9.1 for ; Tue, 02 Jan 2024 08:04:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704211498; x=1704816298; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BRQYwKaD5nL/etQUQHLcvnsdC8oyTg3NrDmrCWZHoMk=; b=yYAGIa5CtRSixTq6vJVQ2y37T2eH1sa6tbld34cUfDfudxvdYsKEpl4VuLiJ2e4S0t 5fSmRN7VV9R7tilse6VdmKXA4+04/WgE6W3qleiq7Yi524kuqjhREnsJGgNwmr+IbQJp ROW8trxi5Jx4JoPiKdRInsKc7i93SLimiCjyI6E6CJJRBjXzqIbV0hs+h2zHkW7PWcoL OILo26dF5bGWaVWFAvmxwU9hO/nZnKUFbQiXMRDtRl7n1gRjnYZxDF1DbO3ELGegJMGQ GE3yj6mQ8fWGoERgLIgYoxBFnndPBZGIK8Q8zi97li74ehGIgBgTW2zKSlWkp/nQDFIA Kugw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704211498; x=1704816298; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BRQYwKaD5nL/etQUQHLcvnsdC8oyTg3NrDmrCWZHoMk=; b=PNIW7nOe05rU3f9ZLD1ApTRHkurH6LKg3rVCMkDjAop+8s4CcZj8QmqN+cvh3RW1ZD YBX6YXU+2aIaZN2f971FvaAXbLEGHekEAisfxoW53G6Zw0E1ELx1v2cupt+lhC5VX1Kh s64QLDE148dI8vii4TnzG8no0nTC8TzGWYHxQkvaGvCrcXwbCDVZA4UFxwMR31hod2Gf rRVBzbP1KpMsm2XXcx+HHW3AbjPF3qV+XWsrAl1ZTH0G0gCCuj322wMOmJyib6+9VyPU JCqTL5hD0dSJHSdF0TGcFPHAZ5WdhOSdOA7r/rfAxXeefXkW0qaWQPRb+d8yxpaLckQj +9NA== X-Gm-Message-State: AOJu0YyXYytVZGOuHqKvVykP2P/jaIkqwVtT2Gcp3NX2yyPvhMGMIWWd 0HbSSkVzIgrZzmi/+u+0tJadbv3fY6fuPrtiG7vSLcahfvc= X-Received: by 2002:a05:600c:4ed3:b0:40d:4d87:39f7 with SMTP id g19-20020a05600c4ed300b0040d4d8739f7mr4417565wmq.261.1704211498296; Tue, 02 Jan 2024 08:04:58 -0800 (PST) Received: from m1x-phil.lan (sal63-h02-176-184-16-71.dsl.sta.abo.bbox.fr. [176.184.16.71]) by smtp.gmail.com with ESMTPSA id w10-20020adfec4a000000b00336670abdcasm28690520wrn.40.2024.01.02.08.04.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 02 Jan 2024 08:04:57 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Eric Blake , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , qemu-arm@nongnu.org, Luc Michel , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Mark Cave-Ayland , Eduardo Habkost , Frederic Konrad , Markus Armbruster , Paolo Bonzini , Kevin Wolf , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 0/5] qdev-properties: Try to improve use of dynamic property introspection Date: Tue, 2 Jan 2024 17:04:49 +0100 Message-ID: <20240102160455.68612-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Hi, This RFC series tries to work over some limitations exposed in https://lore.kernel.org/qemu-devel/9293e63b-8032-4ea0-b516-9db6949fb607@linaro.org/ Eventually all QDev objects would use static QOM properties, but in some cases we can not. ARMv7MState is a such example adding properties that might end up irrelevant. This is just an example, but thinking long term (in particular in the context of dynamic machines) I'm looking at how this could be improved. Thus this series. I don't like much this current approach (because more boiler place and complexity) however this seems to DTRT for the user. Philippe Mathieu-Daudé (5): qdev-properties: Add qdev_property_del_static() qdev-properties: Add OptionalBool QAPI type hw/arm/armv7m: Convert ARMv7MState::vfp from bool to OptionalBool hw/arm/armv7m: Error if trying to set unavailable ARMCPU::vfp property hw/arm/armv7m: Do not expose 'vfp' property if ARM CPU doesn't have it qapi/common.json | 16 ++++++++++++++++ include/hw/arm/armv7m.h | 2 +- include/hw/qdev-properties.h | 7 +++++++ hw/arm/armsse.c | 2 +- hw/arm/armv7m.c | 12 +++++++++++- hw/core/qdev-properties.c | 17 +++++++++++++++++ 6 files changed, 53 insertions(+), 3 deletions(-)