Message ID | 20250102151244.59357-2-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7821421wrq; Thu, 2 Jan 2025 07:13:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV33j2UFgYL5kls0oyRTuVY8ZpAy5DPJ25V0kT5zXOJni2aN68s9PKdNHcN9ZjV9/aiGVEa/A==@linaro.org X-Google-Smtp-Source: AGHT+IF78dtVIt7ndCYFeaj9Nb1XQ95lYyLDS//jDqvT6QGtIQ9Z1gzAwsKzwBazjRFyJrXo/myZ X-Received: by 2002:a05:6102:440b:b0:4b2:49ff:e470 with SMTP id ada2fe7eead31-4b2cc449353mr30120005137.21.1735830809490; Thu, 02 Jan 2025 07:13:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735830809; cv=none; d=google.com; s=arc-20240605; b=RCGM4H4Yp3M4jwPGg4b8MXramfiPF2iT46CZE4ZRb2gnsV5z+Evn0SDjzZTjlqELg1 POrzovHgC0kQH9jjTU8EykjY8fV6cymiGNVfRa3brDVWrh8QbD2RGyTkWk4le8UWdL1I CiJwGT2K7K8ETnt3I6EdVqRsBmf1tcu9uk/V6TImqn0K2xQE6K8rS6CQoTK/VC8rHB8s gdR3dfonuoWYOBdh3TXiouuSyNtlku5F4nltROtlbFY04gzdIxqC1xu9pjN0pq+oSPqL mBjq4GQlLM1RPq/IrkitO9pO8YVHWC4ddqcLOqtSREVnnLZI33xxbTFhtNxtVZJcByRU qJXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jzeo4aQg6DouqNm9ntCEUK8qegBuD5L5E5v2+2/k5ko=; fh=PTspa9wvhkaR6hEChXR5orGauuRbRK309fOYTYlWOh4=; b=XVzVK/V80pSg773tRfB2V68OxOTGqN9wyPYqpt3g4F+v+Q6wyHV1gBnddU8xzuiF/V mvT4pj0TTVDNtI22VpfphfKNJV8t0NHw3X0G0wDyJODfiGVB6MrHMPR3mB0yque/B3Ep 4AO00TNjS6ZguBtx7a5UtVYtbl0DI0T+Iqsa452CxK65CqAymtao13/MUOw4voltBCVR LgEJ+eeTM53yRhllcNSggqa8C+2VdSZt2GhamPfyriM7IJAvORRc4MN3TxYwEe2fTyU1 LxuwoKl+ojMOV0XFnLfOQY97wDiujiecs7ocif0zksV7MN+1bZLUXDpwoCtlceybNHPN xRZg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Xq9KCM/l"; 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; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4b2bfb75228si8259414137.434.2025.01.02.07.13.29 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Jan 2025 07:13:29 -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="Xq9KCM/l"; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tTMsd-0007U9-Hb; Thu, 02 Jan 2025 10:13:05 -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 <philmd@linaro.org>) id 1tTMsY-0007Tl-VN for qemu-devel@nongnu.org; Thu, 02 Jan 2025 10:12:55 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tTMsX-0006UV-Dt for qemu-devel@nongnu.org; Thu, 02 Jan 2025 10:12:54 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-385df53e559so8988499f8f.3 for <qemu-devel@nongnu.org>; Thu, 02 Jan 2025 07:12:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735830771; x=1736435571; 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=jzeo4aQg6DouqNm9ntCEUK8qegBuD5L5E5v2+2/k5ko=; b=Xq9KCM/lMMO8ea9iHnb35tjtVrBWw9SQeoSY45N/eb/Mu6cpeXb3bxIuIE6a4a72Qd pVwP+nrq3lYro0zeowBAX8SdJKaaVwE7nPOCBhYoFX92wr3+NJnk+8DZZvDmpmD6aAxP Wid9XX63cftl0Dy+dA4B4dqZbtBR1R5jQejwDxV00en0H5rjSUbe4yEQ1rt8OPiNaS1Z iS+uL3nEiysZ6QGi+z4pCvtZtGWAXILFOpkqOlGXiiwABj473LTZjbGyQkPQ+9Sk4UY2 6ziQ3uzEOeJbhEE8hIGPznvht3OazG+Rjrcp8VxsUWUtOHXL4Kg4F7jhRScNZY5083Bb 2yZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735830771; x=1736435571; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jzeo4aQg6DouqNm9ntCEUK8qegBuD5L5E5v2+2/k5ko=; b=iAZWoZFL7PloeXJjmQhzn57mNWIaCAyYV7plxDh6EOxtDPhZre3vLtJn+cE0DRbiA1 r8nKgmagICup8k1vMIGKs/oTYBv6QmDXoXut3tEv52KF7dxv+AfDQoTjrK6Oy0C5xU6A A9b8+ZirYAF2APstP24Q4uQ9Wx4wrOQom3d+HM3AcB9aupgA0v17V7ou7o6cbtKbefx4 bijgRVB2H/8smqxaXcg3Eko8RRJ39/63NDOIpcV/GxZqCHzkACmJ1l1WPHe7t50zW7rx 6Te+1YrACmvD1wWfB1BPtff0Zh63Zja2qVy0Z8oEXbVUOQ8vOFbAhes1PncSE7/s4Ro5 rSUQ== X-Gm-Message-State: AOJu0YyQ4bkW56ci5vYNSmdK1ehHqOgYwYGKz8IhgPlu7GJeGIH/Jt/6 rdc6k8UNHcduqbHoQtORweILrSgESIdYTEUW3YGW8+BQqGZRIl19aXb91486WTbYSbJH5RgoTBl iwTOpZw== X-Gm-Gg: ASbGncvClFgX/wlmF7C6b9C5lOsvPUqlxxgLVvjAPiFnqRvgdy5Kc4vb/mYm2JKu1vs TjqbEmdy5IL7sk0uDuzUgBylV9zx27pQrxSaye9Y8sRQRTi/Gg0d7a2hWB0H3tKPF3tWqnE4iie 4Ghdo/gEvFQdGAY073sxAhle/2hPOpBnPE1HT1HsRM/HKomMTNRDg1/S6QrXwnIvSW6QAnSBTb5 0osi/cJK7ck4VZRLpDg4css678cBEz/XRkRjtUwJVzV50kY8KT+4n4bkkqvcKghCif5ltpTTKUe 3T21ImyzPe/dcQtgkSKOCEXTyunaZeQ= X-Received: by 2002:a5d:5e09:0:b0:385:ddd2:6ab7 with SMTP id ffacd0b85a97d-38a2240874bmr42102687f8f.52.1735830771342; Thu, 02 Jan 2025 07:12:51 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8acafesm38227583f8f.98.2025.01.02.07.12.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Jan 2025 07:12:50 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Eduardo Habkost <eduardo@habkost.net>, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>, qemu-block@nongnu.org, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, David Hildenbrand <david@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Zhenwei Pi <pizhenwei@bytedance.com>, Fam Zheng <fam@euphon.net>, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>, Peter Xu <peterx@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Gonglei (Arei)" <arei.gonglei@huawei.com>, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= <philmd@linaro.org> Subject: [PATCH v3 01/10] qdev: Expose qemu_create_machine() Date: Thu, 2 Jan 2025 16:12:35 +0100 Message-ID: <20250102151244.59357-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250102151244.59357-1-philmd@linaro.org> References: <20250102151244.59357-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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=unavailable 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-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
QOM: container_get() removal
|
expand
|
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index e6ef80b7fd0..bf8a0ee6486 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -1106,6 +1106,8 @@ void device_listener_unregister(DeviceListener *listener); */ bool qdev_should_hide_device(const QDict *opts, bool from_json, Error **errp); +void qemu_create_machine(QDict *qdict); + typedef enum MachineInitPhase { /* current_machine is NULL. */ PHASE_NO_MACHINE, diff --git a/system/vl.c b/system/vl.c index 0843b7ab49b..33fbb9f32f3 100644 --- a/system/vl.c +++ b/system/vl.c @@ -28,6 +28,7 @@ #include "qemu/units.h" #include "exec/cpu-common.h" #include "exec/page-vary.h" +#include "hw/qdev-core.h" #include "hw/qdev-properties.h" #include "qapi/compat-policy.h" #include "qapi/error.h" @@ -2128,7 +2129,7 @@ static void qemu_create_machine_containers(Object *machine) } } -static void qemu_create_machine(QDict *qdict) +void qemu_create_machine(QDict *qdict) { MachineClass *machine_class = select_machine(qdict, &error_fatal); object_set_machine_compat_props(machine_class->compat_props);
We need to create a 'fake' machine container for the QOM API. We already have the system implementation for qemu_create_machine(). Expose its prototype to be able to add the user implementation. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/hw/qdev-core.h | 2 ++ system/vl.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)