From patchwork Fri Mar 4 03:51:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 12768433 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62D6FC433FE for ; Fri, 4 Mar 2022 03:51:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237364AbiCDDwY (ORCPT ); Thu, 3 Mar 2022 22:52:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236557AbiCDDwY (ORCPT ); Thu, 3 Mar 2022 22:52:24 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2C0D17DB88; Thu, 3 Mar 2022 19:51:37 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5D96AB826D4; Fri, 4 Mar 2022 03:51:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBE9EC340E9; Fri, 4 Mar 2022 03:51:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646365895; bh=7+fO707x0WrVZkp++sBHfClqiE5cFjIMHZkZxzrlSrg=; h=From:To:Cc:Subject:Date:From; b=Q5YW105F0lX/sN2XrfyUPAGY7fJzq7cEjhhx6Uxau9uReCtqdvQH9XWHos/t1LylO To0zRXTdmeEvROK2RxzbwSkgORlQsayPByc61Hmmqm+BhHRGx8FVUcemHlB32HwhuE +FWuDld8OcISjIi+UBS3gpe59cqlvuHvkg5KuxV5cDbOaBzfGEA9Ww+EOSuUVkV4Vh bK/iOdKT9kS2AyROuKTdBDNP9BOfq8AEfip0NSyhYMYNFkOpokz3kcprR6orHIVWBg c5YZWphlATCNTurSQQxPmxe/uzOfje3Ijuivz8Qt92tFw9SAqX1c+YzzlqEhr/qVEs JYl2aaFJ+E20Q== From: Bjorn Helgaas To: Hans de Goede , "Rafael J . Wysocki" , Borislav Petkov , "H . Peter Anvin" , Ingo Molnar Cc: Mika Westerberg , =?utf-8?q?Krzysztof_W?= =?utf-8?q?ilczy=C5=84ski?= , Myron Stowe , Juha-Pekka Heikkila , =?utf-8?q?Benoit_Gr?= =?utf-8?q?=C3=A9goire?= , Hui Wang , Kai-Heng Feng , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 0/3] x86/PCI: Clip only partial E820 overlaps Date: Thu, 3 Mar 2022 21:51:07 -0600 Message-Id: <20220304035110.988712-1-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bjorn Helgaas This is based on Hans' extensive debugging and patch at https://lore.kernel.org/r/20220228105259.230903-1-hdegoede@redhat.com and applies on 7e57714cd0ad ("Linux 5.17-rc6"). This is basically the same idea (applying the 4dc2287c1805 workaround only when an E820 region *partially* overlaps a host bridge window), but I think it's a little simpler. This also adds a little dmesg output when clipping, which should make future debugging easier. I bcc'd several folks who didn't have public email addresses in the RedHat bugzilla or Launchpad. If you review or test this, I'd be happy to acknowledge that. Bjorn Helgaas (3): x86/PCI: Eliminate remove_e820_regions() common subexpressions x86/PCI: Log host bridge window clipping for E820 regions x86/PCI: Preserve host bridge windows completely covered by E820 arch/x86/include/asm/e820/api.h | 5 +++++ arch/x86/kernel/resource.c | 34 ++++++++++++++++++++++++++------- arch/x86/pci/acpi.c | 5 +++++ 3 files changed, 37 insertions(+), 7 deletions(-) Reviewed-by: Hans de Goede Reviewed-by: Mika Westerberg