Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp896321lqb; Wed, 17 Apr 2024 14:10:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVnhuopkaL3LJCOln0g+FNOWj3+k3LcoVOaaFzDSqaO+F/xIwGMbxM+a/n44keyvzChFOmBLnpgvVVOSVCygR/YJ8gy7UsQHVmDHCWM7A== X-Google-Smtp-Source: AGHT+IEgBFISRxv+d0CyKj2AMw8LPIoEodbNY6muv6zm0I9G85u1haKqVZnpM99SyEx6MrQs/D5k X-Received: by 2002:a17:906:a994:b0:a46:8daa:436f with SMTP id jr20-20020a170906a99400b00a468daa436fmr388149ejb.69.1713388203343; Wed, 17 Apr 2024 14:10:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713388203; cv=pass; d=google.com; s=arc-20160816; b=ZnmoKiwuVJtD5GIr7R0vkAiBVJEGJJpJO3iRmS2Cr8gz/JVUdo4KPzMBjChL/M8Icv 8FFGlK3FFm7ufjguE0+MkFPXQrDJ5b1qc79Eeyf9mUvB3a64HutiDk781ivzAIR34E81 szSgraRiuqzSPhb7baBJF9GesCMdJ2uxZfO2NXDZ1YMXThuwv/1vrvX/w0hE4d8yb5EW aC818nXYOuCbRJ5XZyrjFNxCGAJqx5dfMQaQus0v+RXNwQLmBXmiUz+VTlZBY3HAudSE ks0OJLatYOtgepLDGcsSc6WyS9YZ6IxO8SE30luSMZAaAnd88FpiU/H3I9KYDcL3pb+O nYTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:subject:cc:to:from:date:dkim-signature; bh=PCDlGYRS4ATACGe+MU+Z+POCM7OxU45WiNlkcuro5g4=; fh=CzGWqo0GqhKWAxdXRBgUFPijXy0XMeYjuBYCa05KhjA=; b=L1NphFf3X91oElFxvi4oyXssZ4eELkUpt/OZxsYWjGar/o0Uq7FSPh6/5G6en83nC7 mvmsmRcwf8GjmN4kZPbJ4+RCZ9PqCW2+f92Bq5F923neydVmhTOqWze1Eic3xa43WUmx H4rNpc1jVH95CbRebta1+iZxzUOG20nj1fwObKDF9XkNB8R4watkQ3MPUKmzifwEgLuY WLoRRVDYToPMDvCzVHlVk9heRp/thwf3EE2Fz6Oxp4fnZMG2gnESZrUsFbzlkiEmWre7 zfOY3R5hBuSxqwVaooP9PAM+HstgNGm/TGDusovTlxAh3UsFXf2iZ4mvrQSr1vWH5sHW XSWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aClyTeqL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-149238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149238-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 o8-20020a17090611c800b00a522cd67dc6si34756eja.954.2024.04.17.14.10.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 14:10:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149238-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=aClyTeqL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-149238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149238-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 16E321F227D6 for ; Wed, 17 Apr 2024 21:10:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B38E4EB5C; Wed, 17 Apr 2024 21:09:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aClyTeqL" 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 2E8EF524D9; Wed, 17 Apr 2024 21:09:45 +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=1713388186; cv=none; b=rjlOPIhmOqsNj9EWD9TBjGBrbM4eiJ21XnVajtyMEcREVZKHWiR3UAU+c/1d5mWgdWvq76CAO7VesKvb01nDBPPAmz1CIhICqStxRkuEADdVSKvxOaG3hzNNhylbTfqiO/YQ7xZ74D/jCge1vSgI1YlNTpTHPnZbzK9adAI1Mt8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713388186; c=relaxed/simple; bh=cuh1OHui6t5s2+TUiZ8RUAlkinFvy8M3FadxFyze++w=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=Ca/PnRASfEwGuGbYkvQbYzK4tqOKzt4TCIM84SMkhQfwV9hBDCKb6aJeGyWnrqd5wiSAD6fqWMM5KQbOOdGkSfBpbZT13XIlalBLGBsAKv6nvn+7UKe+09ObmA/MN6THm4QGh4wofKW/Kh/1jZUcjh+VlJhU+SmmNzu0kV7uFM4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aClyTeqL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59C3BC072AA; Wed, 17 Apr 2024 21:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713388185; bh=cuh1OHui6t5s2+TUiZ8RUAlkinFvy8M3FadxFyze++w=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=aClyTeqLk+cwibgYRldv0mbzdTqyFBvsR+ohlku0Nhr0GU5mGC6ao7fzutM6CdFgo js2WfErTPOgS/oeJFgmCcE3QzvepvXtmL1uJCNPwBtXNovnAL0I2Nj65frkN5tc0gw 0sxwE4qPwKDRAUUawQGq8cokREu5hypvkwkac8Ex8dkk7SvZ0hnIFCVvdvOa0dmLIf Xtq3G7XJuP1kC0APJ9cQW/Foixko6x5Iys+WdBnP96jLU3rObAlPcBaGfkRP275J6h T7Nx9KZjgsPjE/Rn3INv8ky+OQnGkv77jZMbPI0haK++trm8DLCkmeY6+FB+EQ2yly 4stfRitmpXUKg== Date: Wed, 17 Apr 2024 16:09:43 -0500 From: Bjorn Helgaas To: Andy Shevchenko Cc: linux-pci@vger.kernel.org, Mateusz Kaduk , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Tj , Hans de Goede , x86@kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , stable@vger.kernel.org Subject: Re: [PATCH 1/1] x86/pci: Skip early E820 check for ECAM region Message-ID: <20240417210943.GA215723@bhelgaas> 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 Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Apr 17, 2024 at 11:47:27PM +0300, Andy Shevchenko wrote: > On Wed, Apr 17, 2024 at 11:40 PM Bjorn Helgaas wrote: > > Reported-by: Mateusz Kaduk > > > Reported-by: Arul <...> > > Reported-by: Imcarneiro91 <...> > > Reported-by: Aman <...> > > Isn't bugzilla public enough? You may take emails from there, no? Good question. I think email addresses in bugzilla are only visible to logged-in users, so I wanted permission before publishing them. I got that from Mateusz and am hoping to hear from the others because I want everybody to get credit for their contribution. > > + /* > > + * 946f2ee5c731 ("Check that MCFG points to an e820 > > + * reserved area") added this E820 check in 2006 to work > > + * around BIOS defects. > > + * > > + * Per PCI Firmware r3.3, sec 4.1.2, ECAM space must be > > + * reserved by a PNP0C02 resource, but it need not be > > + * mentioned in E820. Before the ACPI interpreter is > > + * available, we can't check for PNP0C02 resources, so > > + * there's no reliable way to verify the region in this > > + * early check. Keep it only for the old machines that > > + * motivated 946f2ee5c731. > > + */ > > > + if (dmi_get_bios_year() < 2016 && raw_pci_ops) > > I probably missed something, but where does 2016 come from? > (I've been following the bz discussion) I made it up based on the fact that 946f2ee5c731 was added in 2006, and I just added 10 years. I would love to get rid of the E820 checks altogether because they're really completely bogus and an ongoing headache, but I don't know the details of the machines that 946f2ee5c731 fixed. I'm open to other suggestions. The Lenovo BIOS is from 2023, so it would have to be something earlier than that: DMI: LENOVO 83AG/LNVNB161216, BIOS MHCN40WW 12/15/2023 > > if (pci_mmcfg_running_state) > > return true; > > > > - /* Don't try to do this check unless configuration > > - type 1 is available. how about type 2 ?*/ > > - if (raw_pci_ops) > > - return is_mmconf_reserved(e820__mapped_all, cfg, dev, > > - "E820 entry"); > > - > > return false; > > Not strictly related to this patch, but now it can simply > > return pci_mmcfg_running_state; Good point, changed locally. > In any case, LGTM, > Reviewed-by: Andy Shevchenko Thanks! Bjorn