Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2197126/?format=api
{ "id": 2197126, "url": "http://patchwork.ozlabs.org/api/patches/2197126/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260217065512.245237-1-thuth@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260217065512.245237-1-thuth@redhat.com>", "list_archive_url": null, "date": "2026-02-17T06:55:12", "name": "hw/pci: Avoid adding PCI devices to the \"unattached\" QOM tree node", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "a5874a26095ac048ee9cba9fc54bb2779658af2f", "submitter": { "id": 66152, "url": "http://patchwork.ozlabs.org/api/people/66152/?format=api", "name": "Thomas Huth", "email": "thuth@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260217065512.245237-1-thuth@redhat.com/mbox/", "series": [ { "id": 492381, "url": "http://patchwork.ozlabs.org/api/series/492381/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=492381", "date": "2026-02-17T06:55:12", "name": "hw/pci: Avoid adding PCI devices to the \"unattached\" QOM tree node", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492381/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2197126/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2197126/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=D02ObU+Z;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fFVlY04tDz1xpl\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 17:55:37 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vsEzW-0002iB-1z; Tue, 17 Feb 2026 01:55:26 -0500", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <thuth@redhat.com>) id 1vsEzU-0002i2-Cj\n for qemu-devel@nongnu.org; Tue, 17 Feb 2026 01:55:24 -0500", "from us-smtp-delivery-124.mimecast.com ([170.10.133.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <thuth@redhat.com>) id 1vsEzR-0007nl-Gl\n for qemu-devel@nongnu.org; Tue, 17 Feb 2026 01:55:24 -0500", "from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-196-etKsC4ocNtSyeFSXLpr6VA-1; Tue,\n 17 Feb 2026 01:55:17 -0500", "from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 6CC661800451; Tue, 17 Feb 2026 06:55:16 +0000 (UTC)", "from thuth-p1g4.redhat.com (unknown [10.45.224.144])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 8F049180058A; Tue, 17 Feb 2026 06:55:14 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771311319;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding;\n bh=xxuPDdw5TH9LEkj25eyU1DH0VmeW/6aAiddyvkFrVU4=;\n b=D02ObU+Z5yMEYuGFJAmslq5AQFUY28NtsbAQWV+HYCeiQRqCwGNY/tK6HwjHc5XRhDs0AH\n fEiUHk/Byn2faXoN8krxj58vxISd+/PiARSynKX3gVmMe38hXSazAOpHJUDU5yMYg/CuR7\n 6cH8FOiPJhkKRv+R5jtnG8aZ3XdhN/o=", "X-MC-Unique": "etKsC4ocNtSyeFSXLpr6VA-1", "X-Mimecast-MFC-AGG-ID": "etKsC4ocNtSyeFSXLpr6VA_1771311316", "From": "Thomas Huth <thuth@redhat.com>", "To": "\"Michael S. Tsirkin\" <mst@redhat.com>, qemu-devel@nongnu.org,\n Markus Armbruster <armbru@redhat.com>", "Cc": "Marcel Apfelbaum <marcel.apfelbaum@gmail.com>", "Subject": "[PATCH] hw/pci: Avoid adding PCI devices to the \"unattached\" QOM tree\n node", "Date": "Tue, 17 Feb 2026 07:55:12 +0100", "Message-ID": "<20260217065512.245237-1-thuth@redhat.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.111", "Received-SPF": "pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com;\n helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n SPF_HELO_PASS=-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": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <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>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "From: Thomas Huth <thuth@redhat.com>\n\nPCI devices that are added via pci_create_simple_multifunction(),\npci_create_simple() or pci_init_nic_in_slot() currently show up\nunder \"/machine/unattached\" in the QOM tree. This is somewhat ugly,\nthe parent should rather be the PCI bus node instead, so let's add\nthe proper relation here.\n\nSigned-off-by: Thomas Huth <thuth@redhat.com>\n---\n hw/pci/pci.c | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)", "diff": "diff --git a/hw/pci/pci.c b/hw/pci/pci.c\nindex 90d6d71efdc..2f4d2be50fd 100644\n--- a/hw/pci/pci.c\n+++ b/hw/pci/pci.c\n@@ -2071,6 +2071,15 @@ const pci_class_desc *get_class_desc(int class)\n return desc;\n }\n \n+static void pci_dev_property_add_child(PCIBus *bus, const char *name,\n+ PCIDevice *dev)\n+{\n+ g_autofree char *childname = g_strdup_printf(\"%s[%d.%d]\", name,\n+ PCI_SLOT(dev->devfn),\n+ PCI_FUNC(dev->devfn));\n+ object_property_add_child(OBJECT(bus), childname, OBJECT(dev));\n+}\n+\n void pci_init_nic_devices(PCIBus *bus, const char *default_model)\n {\n qemu_create_nic_bus_devices(&bus->qbus, TYPE_PCI_DEVICE, default_model,\n@@ -2114,6 +2123,7 @@ bool pci_init_nic_in_slot(PCIBus *rootbus, const char *model,\n \n pci_dev = pci_new(devfn, model);\n qdev_set_nic_properties(&pci_dev->qdev, nd);\n+ pci_dev_property_add_child(bus, model, pci_dev);\n pci_realize_and_unref(pci_dev, bus, &error_fatal);\n return true;\n }\n@@ -2412,6 +2422,8 @@ PCIDevice *pci_create_simple_multifunction(PCIBus *bus, int devfn,\n const char *name)\n {\n PCIDevice *dev = pci_new_multifunction(devfn, name);\n+\n+ pci_dev_property_add_child(bus, name, dev);\n pci_realize_and_unref(dev, bus, &error_fatal);\n return dev;\n }\n@@ -2419,6 +2431,8 @@ PCIDevice *pci_create_simple_multifunction(PCIBus *bus, int devfn,\n PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name)\n {\n PCIDevice *dev = pci_new(devfn, name);\n+\n+ pci_dev_property_add_child(bus, name, dev);\n pci_realize_and_unref(dev, bus, &error_fatal);\n return dev;\n }\n", "prefixes": [] }