From nobody Sat Nov 23 23:44:06 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1730754418; cv=none; d=zohomail.com; s=zohoarc; b=Zc2FIF96znEwPtCYMDEXQcQL0d1bP1Ml162q/BZT+rUyA5D9oWxqH1YYr7d2ZYDIzDektk3BJpby2se7fu64RJYMGAx9ksDxfHtfaGcvPAjJHP17QevUCEH5pE9hQijbs3NP3nvfHhTKt94kzKKqXz7j3hgM2CF6y9Vjs5kOVy4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730754418; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=M3wqy1laOvYaRTXIjGpIu1PJBysiXZhRmeHUFm2/bAI=; b=ECkqhqp1tZhoztxDvD1aVJxrhDnBzE1ME61/pJId46/iQc+bh6z+kGXWaR7PuG9l0ajL49eBONh2SebvOih9dJYABljx6QpU4lLnGfl9a+1OOLVHOtbtqRPgpU2PcuDIhX0Yad8YNNMiQHid7JmgH+n3ZEShF0EuShMr8e1GB0w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730754418464494.29848358976744; Mon, 4 Nov 2024 13:06:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t84HG-0003zI-HG; Mon, 04 Nov 2024 16:06:22 -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 1t84HB-0003ns-Pk for qemu-devel@nongnu.org; Mon, 04 Nov 2024 16:06:19 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t84HA-0005Iv-9A for qemu-devel@nongnu.org; Mon, 04 Nov 2024 16:06:17 -0500 Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-580-TJYuk4i_PKyfpRLfbfq5jQ-1; Mon, 04 Nov 2024 16:06:13 -0500 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-539e5f9df25so2787908e87.0 for ; Mon, 04 Nov 2024 13:06:13 -0800 (PST) Received: from redhat.com ([2.52.14.134]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432a26a7508sm907965e9.0.2024.11.04.13.06.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2024 13:06:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730754375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=M3wqy1laOvYaRTXIjGpIu1PJBysiXZhRmeHUFm2/bAI=; b=U83kTbrpz1EwgPPdBGnJ6X/rrQt//Pzft+vyprzwhRFEYDfH1qpR+vF3HcLdAo8ivFCJHB fgVc2HFvQ+RSOvTvFgABnbHhtixBQY6sSdn5vd3ILrX3u8QQA5C+WxU8EbSys9VCatXdxP Ih1aGUHvOoejYlJ4T94bLm3GBUM9gdk= X-MC-Unique: TJYuk4i_PKyfpRLfbfq5jQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730754371; x=1731359171; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=M3wqy1laOvYaRTXIjGpIu1PJBysiXZhRmeHUFm2/bAI=; b=Li4JTDOta8KQ6Yim3QYDjcjXhFhEx77mN4ZR4JnagLT6Dt3DcL0KE6z68obY4Wtdeg Pc5pgg2xNAL0dOtvMPJgfR4McpgGCzq7FsWjQQJC+gMWKPeSxu/idIiUJA3Vo4Z5b4Bk DqPq+hHQCrDgnYntEMFTxxLdtZVJkBgpRUcib0yxt26VZT9UnMWVqFHIZ2UjtswC0r6h l3YlEhJaa30C8nqSw+J5CSfRBBRK3VJt0czKYq3a57tVhWLEpbvt3JC8udHVD7kZ7QS4 1vSdpOBhuGhsaIcF2gR6+fTlCrx5GjQT0ggG8236b4d4aa7X0MfQQZF+jEwG07Tm0L8a QZSw== X-Gm-Message-State: AOJu0Yw49k/BEVNZJ9gEVQt+Y/iHP6jUWoYxQZZu+RKO9in6ntqZrXh9 xyklAAWN7vzuqNgHvnm7AFUY2o2cvsKsMxEkhPuV8Vd5kvDCaOkmSUIGiQaGkia7msqKRKDN0nt hrW916IXDszIdnoZE7ULSUrXjSzBcBS8G2Bh14L57ZvL9VAuS+n/mMQi/7/cGOp59J2NOw7pjQH Wcw1v/307SpSfe1DMOeXrVjBRktpiXNg== X-Received: by 2002:a05:6512:e98:b0:533:3fc8:43ee with SMTP id 2adb3069b0e04-53b348d0d3emr17331355e87.13.1730754371545; Mon, 04 Nov 2024 13:06:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IEP7970synxMt3POaa+uRKLERHLgm2zCMyXwZvmPOKdkSaL1Gx8xe0NbiHTZdZmW+xZJ17cxA== X-Received: by 2002:a05:6512:e98:b0:533:3fc8:43ee with SMTP id 2adb3069b0e04-53b348d0d3emr17331324e87.13.1730754371031; Mon, 04 Nov 2024 13:06:11 -0800 (PST) Date: Mon, 4 Nov 2024 16:06:06 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Jonathan Cameron , Igor Mammedov , "Huang, Ying" , Ani Sinha , Paolo Bonzini , Richard Henderson , Eduardo Habkost , Marcel Apfelbaum Subject: [PULL 10/65] hw/i386/acpi: Use TYPE_PXB_BUS property acpi_uid for DSDT Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.34, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1730754418893116600 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Jonathan Cameron Rather than relying on PCI internals, use the new acpi_property to obtain the ACPI _UID values. These are still the same as the PCI Bus numbers so no functional change. Suggested-by: Igor Mammedov Tested-by: "Huang, Ying" Reviewed-by: Igor Mammedov Signed-off-by: Jonathan Cameron Message-Id: <20240916171017.1841767-9-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index afb2fa2edc..88227e343e 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1475,6 +1475,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, QLIST_FOREACH(bus, &bus->child, sibling) { uint8_t bus_num =3D pci_bus_num(bus); uint8_t numa_node =3D pci_bus_numa_node(bus); + uint32_t uid; =20 /* look only for expander root buses */ if (!pci_bus_is_root(bus)) { @@ -1485,6 +1486,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, root_bus_limit =3D bus_num - 1; } =20 + uid =3D object_property_get_uint(OBJECT(bus), "acpi_uid", + &error_fatal); scope =3D aml_scope("\\_SB"); =20 if (pci_bus_is_cxl(bus)) { @@ -1492,7 +1495,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, } else { dev =3D aml_device("PC%.02X", bus_num); } - aml_append(dev, aml_name_decl("_UID", aml_int(bus_num))); + aml_append(dev, aml_name_decl("_UID", aml_int(uid))); aml_append(dev, aml_name_decl("_BBN", aml_int(bus_num))); if (pci_bus_is_cxl(bus)) { struct Aml *aml_pkg =3D aml_package(2); --=20 MST