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: 1857142 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=jX2YcC4P; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SJwtH1JQDz1yQW for ; Tue, 31 Oct 2023 01:40:39 +1100 (AEDT) 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-Google-Smtp-Source: AGHT+IH/E9TzuBtqXEDhpX6K6nTL/AY8Ajp6zVHe75+jCc7Of+LXy0IkkQ9wFGFjaWBaETqp+PnuPg== 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.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(-)