From patchwork Thu Jan 2 15:12:34 2025 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: 854652 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7821416wrq; Thu, 2 Jan 2025 07:13:29 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWit7gtRD04Q+knCDO2cVWJQaQm3MrHVT7/NbrGARIO/9J/Hpi9dXHHi3sP7LgmRqelOQSm5w==@linaro.org X-Google-Smtp-Source: AGHT+IGxeTqGeYqNFgXay0/DOl6srTIwJOrRvA8YAn53HzNLsRGKe4ivS7wXCyWgWoKvarvjplUp X-Received: by 2002:a05:6102:160e:b0:4b2:bdf1:c1ba with SMTP id ada2fe7eead31-4b2cc380883mr37972151137.13.1735830809516; 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=J3ot341Wbwb6yuEO7nGLm23zdstSG5WbmZkUTNw+3TIA/h6ravJixdmUhJgXC8tTv7 cvayQi5Hm2N7r7y3Kuk9wblUFVul8yhlCZwJ5/JtSOda5Kq/+rItdAX5nMvYvAXYb5O+ t689o2jrGCi/t4lhd2zQl6x4/ZnWYFXwS6J3Lr6wQjrJ2KwpLgCV6TlFzc6706UEqZNW 5p2AA/nX77AaTK0nQdcbILGs3yF0elppYwdIzzqIQoMCAGg54lXHxVF8NZ/bBdowr7x+ BRgjVPI8FwEHs1fXCQ7WcOm+AERFWQWkLm/CLAk2PC7Ohb2qJIYHkMInrhTQ+geydEtS sz4Q== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=YDKEqLpmAAdeoEjAfD6jDt2HPzyZ6ohNl8ZwF9QQRwM=; fh=PTspa9wvhkaR6hEChXR5orGauuRbRK309fOYTYlWOh4=; b=X3pHDR83W7xllxOm54s3xavbNytWwnsPj6Ceo6m8z2spUmPj/kJxLwbJkH05UPVoMU cYtKnokIgJH23w19hFNnFwi5teG37y4XEKBgajaxE6Ra9LdI8BTNqBCOlHp+IlF98yNV J9m+8Ec7Og3en8wZe9sBWOzhIdggwa6uoC5Ud+d0NkTT4Y34k62EhM/qpEDQQfKCU1N7 03ggVXlndPrDtS3p8xdvHwdsDX3AE3If8qdI5DUYyYw44zjZ7qSmQ6LpkOuGtzsQ35lA R1Twy7TRlCK+pTKgT0F9p80F7d5wpeaO55I+XcoTtiarGzUjj5mb7naCyZBIJOzUFdwx OGFQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=isff923z; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4b2bfba43a1si7147066137.573.2025.01.02.07.13.29 for (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=isff923z; 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 ) id 1tTMsW-0007Sx-U5; Thu, 02 Jan 2025 10:12:52 -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 1tTMsU-0007Sg-Rz for qemu-devel@nongnu.org; Thu, 02 Jan 2025 10:12:50 -0500 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 1tTMsS-0006Td-Vg for qemu-devel@nongnu.org; Thu, 02 Jan 2025 10:12:50 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-436ae3e14b4so19474325e9.1 for ; Thu, 02 Jan 2025 07:12:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735830766; x=1736435566; 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=YDKEqLpmAAdeoEjAfD6jDt2HPzyZ6ohNl8ZwF9QQRwM=; b=isff923zr//Ffdkweebpvod1KUfifSRU2BhuT5HDZ6TMRsZjmlHirOzRhX7LEitoxT loMveLmlkXC6zRt/zNHi5xp0TLdrMEq7BAqJZD/3aNDnSdCEDLfG8UyMkQ4Lsw2M1dJz LfGlPOtdzZ9LnRozOlz2rFHGUK6M95ofBNlklropc+5mKwffU5hhSRNbSMhwC79PuHZg ewN7ZHL0szvvhLJiMauzGDE+0D2WbTVP9ujWhThKmxRFttX+GHU0Hg92h9oAQjpk7ORT 9oa0nZoXzixxvpDaZwFd/Vq3MxN8Fto/AfrUFn2Q7c+OZtl8XDKqo6y2ncrEt9RyXbtU mxGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735830766; x=1736435566; 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=YDKEqLpmAAdeoEjAfD6jDt2HPzyZ6ohNl8ZwF9QQRwM=; b=op1jSqaCVtOdSLYZj9e0QECZU/vpSb4ObQo2HfyLwsbDJ4GS+YhGuvMFY0Pjr0e3ih IDMl6RMvy0jAINRuW/a9lcXudtmMvPRwvpegvbOAI2rq3CRllCZH9wo5hMD3svSeRftT jouvHnQ3mCVnPESflNy6BjeMlPkydHfVCtz8vYEtqf7d6hfOhWQBHR+Fk1OSRZQoz7Rh QfFGG98yiKFq8Ju+URHhhx/lVEXOdMw7z4zGw48m4iLbflrsMLaSh6g0HWE/701UB2CM sriVDFFstcPs3JHZi101jWQgmFMl2/wsu+tSiaql6o1hNIDPc+hiVfaMoshZX35wT3Rj K+jw== X-Gm-Message-State: AOJu0Yz50ejCAnSi+xjPrp9RQKd3YCCMf7N8ibyjh8gFUZ/Tl7yb6JP+ VNeEl+tQ+c8dTKJbyyweW+RVQ3HfhpgJFeuh1CjnV3kd40y5iHMWtSbblN6+iWIPzz4aQjqueJp n5DrjOA== X-Gm-Gg: ASbGncuOsavWaNExnnqKirkm5rXjJ2dAUmSQWewQU+/7yzG4ij9G+Z9IHC84zh6FC3O uq4ERJ4T11iNFGgHhW09R1z80hR3iF8XDOilEgyFWj37P9rO7G2/ZBKJmbKVLboB/C9G01asrzo /UQuHEkKi74XSG0oBQ1xI8IljV3qzELEHYZ2Kdxr06kyRd+1/2XuZCSuft2p/ixxAKoFz+vDDLa ChB0Mub9pImmlxIrLg5rJmUppFncS2sUczsdd+cIzPnl16pymopwNm5hJDb5klp9Ll5y2TxraIG G149XaaJHo35HovNQdwyfri6wLKQIlY= X-Received: by 2002:a05:600c:154b:b0:432:d797:404a with SMTP id 5b1f17b1804b1-43668b49976mr374947885e9.22.1735830766255; Thu, 02 Jan 2025 07:12:46 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b1143dsm486574975e9.18.2025.01.02.07.12.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Jan 2025 07:12:45 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-block@nongnu.org, Marcel Apfelbaum , David Hildenbrand , "Michael S. Tsirkin" , Zhenwei Pi , Fam Zheng , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Peter Xu , Richard Henderson , Paolo Bonzini , "Gonglei (Arei)" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH v3 00/10] QOM: container_get() removal Date: Thu, 2 Jan 2025 16:12:34 +0100 Message-ID: <20250102151244.59357-1-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 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: 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 Respin of Peter's v2: https://lore.kernel.org/qemu-devel/20241121192202.4155849-1-peterx@redhat.com/ 'The series is about container_get() and its removal.' (See v2's cover). Since v2: - Create fake machine container for user emulation to avoid: $ ./qemu-x86_64 /bin/echo foo qemu-x86_64: ../../hw/core/qdev.c:825: qdev_get_machine: Assertion `dev' failed. Aborted (core dumped) Peter Xu (6): qdev: Make qdev_get_machine() not use container_get() qdev: Add machine_get_container() qdev: Use machine_get_container() qom: Add object_get_container() qom: Use object_get_container() qom: Remove container_get() Philippe Mathieu-Daudé (4): qdev: Expose qemu_create_machine() qdev: Implement qemu_create_machine() for user emulation qdev: Call qemu_create_machine() on user emulation qdev: Inline machine_containers[] in qemu_create_machine_containers() include/hw/qdev-core.h | 12 ++++++++++++ include/qom/object.h | 21 ++++++++++----------- accel/tcg/tcg-all.c | 8 +++++++- backends/cryptodev.c | 4 ++-- chardev/char.c | 2 +- hw/core/gpio.c | 3 +-- hw/core/qdev-user-stubs.c | 11 +++++++++++ hw/core/qdev.c | 21 ++++++++++++++++++--- hw/core/sysbus.c | 4 ++-- hw/i386/pc.c | 4 ++-- qom/container.c | 23 ----------------------- qom/object.c | 12 +++++++++++- scsi/pr-manager.c | 4 ++-- system/ioport.c | 2 +- system/memory.c | 2 +- system/qdev-monitor.c | 6 +++--- system/vl.c | 20 +++++++++----------- ui/console.c | 2 +- ui/dbus-chardev.c | 2 +- hw/core/meson.build | 1 + 20 files changed, 96 insertions(+), 68 deletions(-) create mode 100644 hw/core/qdev-user-stubs.c Acked-by: Peter Xu