Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1486624iog; Tue, 14 Jun 2022 07:04:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOlIrozUqlDTATPpDRCCsBIepy7GY3OdL5GMdC6zu6n2qknjYdZWHRU6iGDCDTK4oi6XUX X-Received: by 2002:a17:906:7a57:b0:711:faf1:587d with SMTP id i23-20020a1709067a5700b00711faf1587dmr4366307ejo.581.1655215481753; Tue, 14 Jun 2022 07:04:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655215481; cv=none; d=google.com; s=arc-20160816; b=uCK2FVskKliKtbQ2k4N6rbWe7P0UfpBA1D9h2ivM1aVmspxJwbClkQZv0oqKwL/qd5 zcGNHw7iZt7G+g0FsBUe9M/cfywI/+6iiFh69hIvuZ5aaEujofGIX0EspydhxcuDOZHe BVQRJKb03Ga7B2QFaEgVt5MuAUVwg515eYqYiupohTFuJlX4SIwZ/tNJiTJsHneGlmx4 9giZercLy56R0BhUrrenthjjNxhDCdppEF/rwVK6I9b0cf5MMlgk268zlz9n84KEox/J 8ZOEJaHDcsdQVgbVFQ48pE6Y8lhfw5ESd39e62qHl/+ijVwGMe8DU5xoNMqbzPskw0oI inQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=6Numpn3PnxxfGkEwUbo8NblW+6Xi7Nh3l74cct7iUSY=; b=ca+G07ODiEqgwFU+nKHlKI9Hk6QqXm61htyoW+bf+gYSLHJugsNM1vtmZflxAlk7Px 8ksBNviRnhuL91p8TeqgsiJ2NZBNsHDYspX+YJtdS9dTJ1NqFuESAD9fs+U+LGWSbZSX NJFn2kBJMruYgtZhhM/5mW20lrxWcjSExS7/x/elFIx8jx6MORwsau/GDqdF8OPhvyfy a4Tw5fUuc9Q3B7a3L5+GVWflQY8X/f67DKxfXfa1RUcYXkrE86WzQVxDr4w8+ER8apqb J3c+fGn+UGEtkHgC1XWXjxtitKbvr3O+8dPxPwem93R0D/MAct6gXTyn+4LLt7P8bWoI d/TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=n3cwPn0R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020a056402440b00b0042bcb9b15cesi13168848eda.582.2022.06.14.07.04.07; Tue, 14 Jun 2022 07:04:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=n3cwPn0R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241899AbiFNN7G (ORCPT + 99 others); Tue, 14 Jun 2022 09:59:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343676AbiFNN6o (ORCPT ); Tue, 14 Jun 2022 09:58:44 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35AFD2E696; Tue, 14 Jun 2022 06:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655215124; x=1686751124; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=we4ojTybIP4ZBv9pT35w2MXKtjIBA6VKpIHuWVylsjA=; b=n3cwPn0RJpKGb3fXJn3vdr1jyNBwsNJbXbjVFwTwTDI+Pd6701aP75o+ dFNFvwqdw+Xmut8CS/H6dQfDqI+EFDBUjBfHXHETWHjq8R7vNgcEBjSP+ mT8I92O/nKT+OaB72OrdiHJuxqHLjDMbyrz2SnzEWeK8LQNkRrwIy9IS5 SegpxldRxwNNY+UFtwtRXPyzy244J8OInOscjfEAIuBTWeOvKNmUzDbgQ 5K8OutPcSrzEkUdgneAk2JcSUrCnxkkAQ4PG2KYHipXlh1ohx7IS+LfQZ B2WKh1Ch8eXnsCkMvr7St9KpKx40zJheZ+4KN35IIsxS2ETBon+xK2e73 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10377"; a="277407957" X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="277407957" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2022 06:58:44 -0700 X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="673907783" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2022 06:58:39 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1o173z-000cQq-VG; Tue, 14 Jun 2022 16:58:35 +0300 Date: Tue, 14 Jun 2022 16:58:35 +0300 From: Andy Shevchenko To: Hans de Goede Cc: "Rafael J . Wysocki" , Mika Westerberg , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Myron Stowe , Juha-Pekka Heikkila , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Benoit =?iso-8859-1?Q?Gr=E9goire?= , Hui Wang , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, "Guilherme G . Piccoli" Subject: Re: [PATCH] x86/PCI: Revert: "Clip only host bridge windows for E820 regions" Message-ID: References: <20220612144325.85366-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 14, 2022 at 03:28:36PM +0300, Andy Shevchenko wrote: > On Sun, Jun 12, 2022 at 04:43:25PM +0200, Hans de Goede wrote: > > Clipping the bridge windows directly from pci_acpi_root_prepare_resources() > > instead of clipping from arch_remove_reservations(), has a number of > > unforseen consequences. > > > > If there is an e820 reservation in the middle of a bridge window, then > > the smallest of the 2 remaining parts of the window will be also clipped > > off. Where as the previous code would clip regions requested by devices, > > rather then the entire window, leaving regions which were either entirely > > above or below a reservation in the middle of the window alone. > > > > E.g. on the Steam Deck this leads to this log message: > > > > acpi PNP0A08:00: clipped [mem 0x80000000-0xf7ffffff window] to [mem 0xa0100000-0xf7ffffff window] > > > > which then gets followed by these log messages: > > > > pci 0000:00:01.2: can't claim BAR 14 [mem 0x80600000-0x806fffff]: no compatible bridge window > > pci 0000:00:01.3: can't claim BAR 14 [mem 0x80500000-0x805fffff]: no compatible bridge window > > > > and many more of these. Ultimately this leads to the Steam Deck > > no longer booting properly, so revert the change. > > > > Note this is not a clean revert, this revert keeps the later change > > to make the clipping dependent on a new pci_use_e820 bool, moving > > the checking of this bool to arch_remove_reservations(). > > It does _not_ fix the Intel MID case. It requires to have my patch applied as well. > So the difference as I see is the flags checking. I believe that you still need to > have it in case pci_use_e820 == true. But it might be that I missed an importan > detail. Yeah, I missed that I have compiled a tested something else, and not what I was focused on. That said, I double checked with your patch and nothing else and v5.19-rc2 based tree works nicely. Tested-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko