Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1160783lqa; Sun, 28 Apr 2024 22:57:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVAgsXqB9/btz8V0GmlPYJwVQK4SsIn7o2sSePdzHxLP1+TRQdPgZYipSaWuGtDciVcqaSsKRn6LpyoaS6er6stWOq/oP3AWB/o7x3tOQ== X-Google-Smtp-Source: AGHT+IHLFc+/iN6FSD9Cxudczkz27ZIOTRAIXVm6H6ZjcTxJdWraJbjc5NTQti9fIFfdMbr7wBBJ X-Received: by 2002:a17:906:e2c5:b0:a58:a37d:7192 with SMTP id gr5-20020a170906e2c500b00a58a37d7192mr5518743ejb.76.1714370246104; Sun, 28 Apr 2024 22:57:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714370246; cv=pass; d=google.com; s=arc-20160816; b=lBADOMX/GnEutdsrqC3N28WEjm9IsJCI40nKTDbX7sNs1nliaLUR8EgeziF0D9ZFeq tDV+z0mlcIc5tu0aT47NaYWhPSBsduDQpwgz6SOMZJDT2wgOYuZv6IHQGnikWwGxXwJT ESYFIl3S0tXl0bJrQaSpFBrH6dJn66r4osFiqjjwuZAvgz0c6g9v+CTtbH1rZ3vxUcY2 7jq9AmQldwT7dAkitPtRMpqrxPUHm6rbpE5+OyBRnyjeA2FpWXmRZviy6guQyMmmH+1w s7+AeqTa3lKhmelO0yDVnd9Hmc3cKojOKI5E5DmV9osZ+eqY37DpfYok8g3EHYwEetTM m8VQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=1yQpHLaZVJKK2CHASHiHvyGEoC0BlRj0BxvshCUas8w=; fh=1/FarmjPTkFc2KvcdpPyWvoXKSmY+8QbGbWHd13C9GU=; b=XQW0n6LF6pVYou0FUolLmysQ0M2tZZRjyTw0wggk3XBVpk1CN2AuRx1UvVfTE+ABzU 2eezcyxsSwbCzJmOxWsC3Ph21J0/WfXycMM243FaUmAhHmfC1YhQ9RFNEolVX9i45dO/ XmGt5METkVh+gmhLyeWqoHeKYy0wYvnikPZzsgng6a16gfx0QzamhHosxM466BjZop7a yA8qQcIsl1V1LxksMjMeuBmRAgC6JlhVludSb/h+2s9ITG2dJuSMma0XCoPbT/5Emx9T KkC5f7bMWJAixugD70dT1iuU6xpqn/jbWm2k33JdHQSV5pOI2pqQ7bvzVg60L3scfM5e 5TyQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i2OoIamw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-161762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161762-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hr28-20020a1709073f9c00b00a58e8c94f74si2479065ejc.503.2024.04.28.22.57.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 22:57:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i2OoIamw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-161762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161762-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D025B1F220E8 for ; Mon, 29 Apr 2024 05:57:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 32049F516; Mon, 29 Apr 2024 05:57:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i2OoIamw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FE74DDD8; Mon, 29 Apr 2024 05:57:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714370235; cv=none; b=PHw91w2wBcXruHLvrlSKil8QC1+DMRpJY3CYcNQc+3VC+t9U3hhQHXDUfioM0+tXFkekYPvt+fbjuJsP07VyD/dUxu4hZ6SgEDtdkGnjXpo5T4aqlBVs6VmRlaUN0000yIjSY+B4shnuTZL0p/Can1qEPs+b6pIxpvXuAvF1j70= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714370235; c=relaxed/simple; bh=Y3JTxXiA/2VBJh7i4el44QgN8SPiNeyLeGOOlvqfmP0=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=nJgdMVa12/SirUBkEmIefz/rcY4OfqqxvNkrGTRX0F3y4Wv4yYbnPRTPXRoCqXJN/IDhacqDCKtel12xYqCpgLUD4qgCLI95jqOlzr726OmYD5jDCFS8p652OE/9LlDIfJvnh1KB52pxx4lRHQPvsPtRxEEMuP10PxXL+CLS5NA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=i2OoIamw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95946C113CD; Mon, 29 Apr 2024 05:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714370234; bh=Y3JTxXiA/2VBJh7i4el44QgN8SPiNeyLeGOOlvqfmP0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=i2OoIamw2CGACWO/JQNbAGxyr7rJdGVbGok+nc8nzzVIZxeZvjG0Qr9HYAF5x1zO6 oJb/RNUsBYCfzCGKKylsm5WBZK8QmyjceFnIyDuj33+CEgD2AX82GDJBFmq8sOxpDt GpXyVmV0jgPa4B+6HfVu7lrJWocleE4an4FaCmwXDmRCxZzrE4EWcZhtUjnLIqDzTF yLnH8XfVKc5qNZOY6ouR16LRwSm+fr50ek46uPWZIEIyfy2iCpfN6UHNOEcTRPvqSs nuPY1Gdu6ek6en/jw4r5cKNXDzAeUgvZ+EgltFrnweJ924jq2OB+ivLkQ5qUnwevFC LWWJCOR8HpWlA== Message-ID: Subject: Re: [PATCH 1/1] cxl/acpi.c: Add buggy BIOS hint for CXL ACPI lookup failure From: PJ Waskiewicz To: Bjorn Helgaas Cc: Dan Williams , linux-cxl@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sun, 28 Apr 2024 22:57:13 -0700 In-Reply-To: <20240409132241.GA2071709@bhelgaas> References: <20240409132241.GA2071709@bhelgaas> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.0-1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2024-04-09 at 08:22 -0500, Bjorn Helgaas wrote: > On Sun, Apr 07, 2024 at 02:05:26PM -0700, ppwaskie@kernel.org=C2=A0wrote: > > From: PJ Waskiewicz > >=20 > > Currently, Type 3 CXL devices (CXL.mem) can train using host CXL > > drivers on Emerald Rapids systems.=C2=A0 However, on some production > > systems from some vendors, a buggy BIOS exists that improperly > > populates the ACPI =3D> PCI mappings. >=20 > Can you be more specific about what this ACPI =3D> PCI mapping is? > If you already know what the problem is, I'm sure this is obvious, > but > otherwise it's not. Apologies for the delay in response. Things got a bit busy with travel and whatnot... On one of these particular hosts, in /sys/bus/acpi/devices/ACPI0016:00, for example, the UID would be something like CX01. It isn't an u64 at all, and there's no atoi() or other conversions that would match what the UID should be. In my case, /sys/bus/acpi/devices/ACPI0016:02/ is my CXL device in question. The UID that is presented from enumeration was CX02.=20 However, if I scour the CEDT manually, the UID of my particular CXL device is really UID 49. So, if I went from the PCI/CXL device side, and called something along the lines of to_cxl_host_bridge() and tried to go from the pci_dev to the acpi_handle, I'd get CX02 back. Then trying to use that to call acpi_table_parse_cedt() would fail. The BIOS fix from the vendor corrected the UID enumeration on the ACPI side. This allowed things to properly line up when traversing through the kernel APIs and parsing the ACPI tables. Let me know if this helps clarify! If not, I can try and get more detailed info. -PJ