Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1557145lqe; Mon, 8 Apr 2024 12:25:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU9z/ShmqRg1jMMGcQIQ2nQ+SmSrBFQX81qMF0DZfejK70IoFNyq1r9O7zVo5/Umb9SW45RNomwwxzDgU49s4pwfWPtj1iLFqRYNFeJXA== X-Google-Smtp-Source: AGHT+IEWSF6lf1hmyuglRpHLTp4Y7Po7tRm7NX39oan87mmYGTGEMgOarPcxHOUxJWZp239IXYzn X-Received: by 2002:a05:6512:34d8:b0:513:21a9:79a8 with SMTP id w24-20020a05651234d800b0051321a979a8mr7062049lfr.62.1712604312484; Mon, 08 Apr 2024 12:25:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712604312; cv=pass; d=google.com; s=arc-20160816; b=0sqE3zppR1+qLhOXwMcSYSO7V805pn8++UpBe2XPYzq0NxaVo5A6F88gzK7dHT8E8g lHhouosPPD8+ZvdQO1y9kFk/G8JDV8rN+U7QQyrgXLC/ROav/7EsJKorurNI3rPiv2D9 SO73ILmDu+wdVBYMLvcY+SV7SYO4pK1xhDUH3wQNrkRdxve9rAzPeekKSHls56XMz7vk 3xLFU65BGrPXQFMwIVBVocoru/t0Kr5mUx687ajFEjqrb+v2FKLyPdbHV4H/lc6R1Xtm ujsZdEoflHlB4ZuVd0uC2iN/hMHZWEJS1s5mLOGYkt/8N+SITR958nfso+TgGAzu3YaX /tLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IF6HYmCApmPTyNHr63U1rIYQ14KP/oFylj40o59c9tc=; fh=mZwaVHk5Yxz3pS6QyHf2CodE9BLWnFV2t1ajXKxDwN4=; b=NJkJX3udIpKOiZBJAk7O3zJa/0EqZzw8DMAsd1uO/jKNGaS7uTc34plLDZ2+wBS2hL BJ/4OQLOJq2L9BugDKs7KMV9IOiMW2+/WFh7TdKajws0s0tfZkZDBWv1KgTe5BfuTQKu OXdkwtRG0P87xjWfWhbrk0jlcHGqw2u8+D+b4xV06rYsnWIC4wNCsHpvzyUl/Hak3gee W1wSpJGjiZhR5roAuuPsKTuqsDQqpQkLqu3WdZjsHbn2S5KiXQ8lnfTMstOGY0/ZCIa7 yDmcpr6veBO17+S69GK6SK9UdcNERCYgp/K+DK4AONOro4dxsgjvHEgceVXyFs2xij0z DsZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G3QsaudN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-135869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135869-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 g11-20020a1709063b0b00b00a4e7e177696si3918381ejf.725.2024.04.08.12.25.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 12:25:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135869-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=G3QsaudN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-135869-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135869-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 2D3A81F2358C for ; Mon, 8 Apr 2024 19:25:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A802B145B11; Mon, 8 Apr 2024 19:25:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="G3QsaudN" 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 C3C62145320; Mon, 8 Apr 2024 19:25:02 +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=1712604302; cv=none; b=jAiy10uQ52Og5mI0MENRNNBy7QlS0K7R8IwZdpCEyDJQgwsjFrvXp2EZSG6q1nKKF7h0k8J/wV8sm82BC/NWJbgkdVeNfjUFzNIqDl7di6AxX0HXfEKi3MXIkPm92UA+33g/NtbmjQlu6LpaURJ5PysAV451Q1MSmP+P1CZZ7Ko= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712604302; c=relaxed/simple; bh=a9D0uk0Qedve0Ll3vO3jl2yVBSXkeqcxwBkYczAKJMI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RcdnY3SJ/FSp0x2SVDv6lRQL5vELyNBYDZayweKHqwD37pSubWSyjXKX8t3jklFUl94T0OB5dAke/RIxqKJscSRrsd6y5yFvAErzTCQHFqklGsDXE3vJqrx1sw0JacfPZu8VZsaYtJdHXTg/02R8tFam4bukgV0SOTjnWjrx4lY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G3QsaudN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F9D9C43399; Mon, 8 Apr 2024 19:25:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712604302; bh=a9D0uk0Qedve0Ll3vO3jl2yVBSXkeqcxwBkYczAKJMI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=G3QsaudNhmzWTjozx/3Q/wNd9957Q3jUlQ5zwYr1FaFh2qyOhURaYexVf1gQJ1iIz DTfr0CjRs0r9A43qAEDPK5hh4qSVSDE3pTzWbt5wPcSMqp3SSFAlc1n/V79kZRyuXl NdLfEZXTz0tN/hFRQMb4zBrqtQ2zp7436vmg7iifvy2W+1enUm4ADjbJJp4EYjpq+J wKnI7MgyMIYuczlch6mc0EZPwZoNNV9BAqZrectjjNC8VKriF/mR6c1ldHHwbldszD krNx9dq77SK/EV8zXiyUowwVdH1CBd0rEmxxJHYkLQMqN8m2hpnexsxWVNzf9v6bht nRGcgaRKP9EpQ== Date: Mon, 8 Apr 2024 12:25:00 -0700 From: PJ Waskiewicz To: Dan Williams Cc: linux-cxl@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] cxl/acpi.c: Add buggy BIOS hint for CXL ACPI lookup failure Message-ID: References: <20240407210526.8500-1-ppwaskie@kernel.org> <661421574048c_2583ad294d0@dwillia2-xfh.jf.intel.com.notmuch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <661421574048c_2583ad294d0@dwillia2-xfh.jf.intel.com.notmuch> On 24/04/08 09:54AM, Dan Williams wrote: > ppwaskie@ wrote: > > From: PJ Waskiewicz > > > > Currently, Type 3 CXL devices (CXL.mem) can train using host CXL > > drivers on Emerald Rapids systems. However, on some production > > systems from some vendors, a buggy BIOS exists that improperly > > populates the ACPI => PCI mappings. This leads to the cxl_acpi > > driver to fail probe when it cannot find the root port's _UID, in > > order to look up the device's CXL attributes in the CEDT. > > > > Add a bit more of a descriptive message that the lookup failure > > could be a bad BIOS, rather than just "failed." > > Makes sense, but is the goal here to name and shame the BIOS, or find a > potential quirk workaround? Presumably we could fall back to parsing > _UID instead of a string and then get some guidance from said BIOS about > how to lookup the corresponding ACPI0016 device from that identifier. In this particular case, I tried making sense of what was the _UID value, and what was actually in the CEDT. There was no sense to be made. For this device, it was ACPI0016:02 with a _UID of CX02. For this particular vendor BIOS, all ACPI0016:* devices' _UID's counted up from CX01 => CX* sequentially. But what was actually in the CEDT in this particular case for ACPI0016:02 was 49. I attempted hex, octal, atoi(), literal string interpretation per-character, etc. It was just plain wrong. > In other words, I see this patch as a warning shot of, "hey, > $platform_vendor if you > don't want folks to RMA these platforms please tell us how to do the > association Linux expects per the spec". Otherwise, this can escalate to > a loud WARN_TAINT(TAINT_FIRMWARE_WORKAROUND...), but I first want more > details from this platform like an acpidump and the exact error code > acpi_evaluate_integer() is returning. Pasting an acpidump is difficult... It'll be tricky since this particular host is walled off from the world. And moving data in and out of this environment is quite challenging due to regulatory reasons. acpi_evaluate_integer() in this case was returning AE_BUFFER_OVERFLOW. In the meantime, I'm fine either fixing up the commit message per Jonathan's review, or I'm fine shelving it in favor of a broader effort to fix the underlying BIOS's with the vendors. I don't have a strong preference. I've been in the weeds with this for awhile, so I know why it's breaking. But someone new to CXL with shiny new hardware may be left scratching their heads. -PJ