From patchwork Mon Oct 30 14:39:51 2023 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: 739258 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c47:0:b0:32d:baff:b0ca with SMTP id n7csp1155736wrt; Mon, 30 Oct 2023 07:40:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHRPJEKGF+vWBXYXYcTKgiLENjZz/Wkl+ijAlnMSofFeO0tIU8x5fASnS1j4lNzojgvSNd X-Received: by 2002:a05:620a:c4a:b0:77a:94c:79f with SMTP id u10-20020a05620a0c4a00b0077a094c079fmr11501243qki.6.1698676837757; Mon, 30 Oct 2023 07:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698676837; cv=none; d=google.com; s=arc-20160816; b=Rb71rAEd3SKKpnUe1rAbyj7yKrnL03GGrbTbJ0gvo1dDsxM/rCJgNevYG43E9XZ4L5 WIqPStPAt79OD3+VoXz5OWAXheFpPHas7vUyb0yahAMup7i+sQ5yof7uLYKg4Bl5N0ip w3o0x8hXAg39gUGodCo09n/H+oDXX1mC5zT+R3H3JJWKP1XXhs75vIVPEb4VlVEDsdx0 vW5523nhZcjf7dHtFFCF9Jsc5n0xHYjKFHChnQdya7TJ5KQNBKFK3JZGEjtRQ3y7VM4l 9Ymk38v04KGdj9D30aC1zPdhtLEogMKINXBDpm3fgN2ggJ6DSpB+1NYpPEYxY0zZBmT3 kYkg== 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=niBNf+TyWYzsuNRRJa73BCYeP8vLtDybQJD3Qrkr9Dg=; fh=h9i03/I3DsCPcmeGrMxb+5kHX6/oPGtJs5JE9RaGQZs=; b=moso4p5siDtUJtzpxfOESs7CO5dhcQufJq4RZ862l0hinvQniGq9QxvdKHxEzWER4i 0vdiCIF/VlY4TVg+uiXFPuQ2BXCUMVajQ33OTgM769ICwDRY9mnxlBS5NTl0lH7OCKos D9feueDUUSTTjoo4KtBrsO5wQlLyRdT8hzvYOQijfEsVue/C0Qip31uCfmCjvNc6vwIW Eap9jHKJPIUNcHLkungF1rsOY/S5veptO9w0Dmd4NDLJ9k+pIbmt1QQ1iEyFEi+HTCBH Rh6sB2pWr+IMnkg8pli7sPUvc7ouw4bQrRgeLZRfdbvR74I3zPLD2yrnJ6XnHVFTzbiC Ic1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jX2YcC4P; 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 y9-20020ae9f409000000b00778b0f5d4c0si5479160qkl.566.2023.10.30.07.40.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Oct 2023 07:40:37 -0700 (PDT) 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=jX2YcC4P; 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 1qxTRB-0001NF-PP; Mon, 30 Oct 2023 10:40: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 1qxTR9-0001Mz-KE for qemu-devel@nongnu.org; Mon, 30 Oct 2023 10:40:16 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qxTQz-0001bh-NH for qemu-devel@nongnu.org; Mon, 30 Oct 2023 10:40:13 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-408382da7f0so33348025e9.0 for ; Mon, 30 Oct 2023 07:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698676802; x=1699281602; 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=niBNf+TyWYzsuNRRJa73BCYeP8vLtDybQJD3Qrkr9Dg=; b=jX2YcC4PdnWAWgu3x58Rkdq1VbdTlEyPEtZ3jKLCvgsk9bJfA4va/5oCCq8sssNVcr Y+dDu0mUpLZ9ImnZapcIKQ0JuZxFkdHd6eXovEc5Ad/POPmlxX6nbKCe0Kuq0ksmtA/d G8CUmW/sthG1Kb4kJ12Ah4FgplXf8sx2nqLVJD4XFus5re36/nO4rtJ9AzwUPlQwFYS1 abKoRZULdAgmU7RQeOUWmOrH4zEbxT7jq0A4BuczfpnhpPWBX1X/b77pagvduUVGqI+V srE+j5kxkjRkSMVNkHFe0dDDnfWkIiCclltjx0UL7VtdQSWyrQenr9SCT2MjcOEqYeHP S9OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698676802; x=1699281602; 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=niBNf+TyWYzsuNRRJa73BCYeP8vLtDybQJD3Qrkr9Dg=; b=Dm38+jEidSZjvw64LYEloLoGIKq42vNlDMvBeJu0BUv2m4a2N8hhIErWtPzuLztLdY YIrLqgmOSqryPWujZRJ8B2VEIDXQId61FjyOc3QxK26omfywdIWiM9b0jUwK6OznFkpp UNMF8OhHE4kVx/m5mROoeZ1oTDlSRszTb3PhpmBJuvz1lD8bxmwRvnJ+urJvttcQQLRW xbOY9BP2QpFbLA1OqfrolVycDc+5RUSzagO4sh4znQwcnrFPDS1TFLj9TXP2is7vuRvp EdDNBw76m9CAhVRvhhakGJbMQVz840NaApFDKEh9m4owcVryjjdV4NoVLgDM8B0cBLr8 gXlA== X-Gm-Message-State: AOJu0YwJMdbuURM3mdZnPkvZeiHUvE5aWuQXKfgQeUz6tPsK3AUkalwb AzEXEN3owIRr2XoZJNVDZeqRd6A1ZSpqfTHhodQ= X-Received: by 2002:a05:600c:46cd:b0:405:3dbc:8823 with SMTP id q13-20020a05600c46cd00b004053dbc8823mr9051179wmo.12.1698676801546; Mon, 30 Oct 2023 07:40:01 -0700 (PDT) Received: from m1x-phil.lan ([176.170.212.50]) by smtp.gmail.com with ESMTPSA id h10-20020a05600c314a00b003fe1fe56202sm9423258wmo.33.2023.10.30.07.39.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 30 Oct 2023 07:40:01 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Peter Maydell , Markus Armbruster Cc: Luc Michel , Daniel Henrique Barboza , Alistair Francis , Paolo Bonzini , Eduardo Habkost , Mark Cave-Ayland , Bernhard Beschow , qemu-ppc@nongnu.org, "Edgar E . Iglesias" , "Daniel P . Berrange" , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 0/5] hw/ppc/e500: Pass array of CPUs as array of canonical QOM paths Date: Mon, 30 Oct 2023 15:39:51 +0100 Message-ID: <20231030143957.82988-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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Following the discussion with Peter on my "cpus: Step toward removing global 'first_cpu'" series [*], we now pass the array of CPUs via property. Since we can not pass array of "link" properties, we pass the QOM path of each CPU as a QList(String). Tagged as RFC to discuss the idea of using qdev_prop_set_array with qlist_append_str(object_get_canonical_path). Personally I find it super simple. Regards, Phil. [*] https://lore.kernel.org/qemu-devel/CAFEAcA9FT+QMyQSLCeLjd7tEfaoS9JazmkYWQE++s1AmF7Nfvw@mail.gmail.com/ Kevin Wolf (1): qdev: Add qdev_prop_set_array() Philippe Mathieu-Daudé (4): hw/ppc/e500: Declare CPU QOM types using DEFINE_TYPES() macro hw/ppc/e500: QOM-attach CPUs to the machine container hw/ppc/e500: Inline sysbus_create_simple(E500_SPIN) hw/ppc/e500: Pass array of CPUs as array of canonical QOM paths include/hw/qdev-properties.h | 3 ++ hw/core/qdev-properties.c | 21 +++++++++++ hw/ppc/e500.c | 11 +++++- hw/ppc/ppce500_spin.c | 69 ++++++++++++++++++++++++++---------- 4 files changed, 84 insertions(+), 20 deletions(-)