Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp588508iog; Wed, 15 Jun 2022 08:14:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u9Anx/4TSzwBlNIF/V3CAJ5PVjrZBWqJLjQP6AghhGpRF6XUi4Kpj8WiUHhcTx8+DBraD2 X-Received: by 2002:a17:903:110c:b0:168:9cab:bfb with SMTP id n12-20020a170903110c00b001689cab0bfbmr256716plh.101.1655306077934; Wed, 15 Jun 2022 08:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655306077; cv=none; d=google.com; s=arc-20160816; b=eCuDTuNRE1Vk337+FHBrwMSH8aVly6e8TXkl2v6XB09lTuXCKN27rs2B9rxosRBDxA wdMxCwUv4yiUTfskbKSHh5vl7bv02fD/zDmx3sMsCmb9BcXB7D+MP3omMy177286xCWq LIWXnMqeAnSu/NCniwQSYKRVWu0IAJEx6rtMfplDwfkJI23/YXGcPZIeugVIfcFoeJi7 m4CQVg7tqJG0Rvl14kgMh7KdyKLUpe9uCA9hLyIMnsSo1/PE3SVGQmNAIyyrkIE+h8NK ylISWwPazsqN3QD4Ib5mD7ejxuM9e1eOKNDZ33p5NlFw7EaFe0j4M1a9S+j5mQKiKqwd 9jXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=IuYLHLrvs/hzz9AJ1rC0mPjJK8aRfaw1hMDOZ63Ubdw=; b=AGGGRlHK8jE3p1y4ZKpJefmMPA7OUwSXYkw6msNPylh34aaoTfO6JU1V65uEN6RJm+ +fob7ukO0EUlQUGMQhvZqzehV7TDg3iyXd4I6eXi+IC7S0dSm+D4I4GIxrz8QPsfoKbJ 5XFzLLxnTCaMSnrFqsz/MR2AH09wZymls5VPpt+zC4SRtUjqd4UtbqciKGicoLZOjNXH 3ebSHgybfNAc8KL+M4xeW/zD5lSKAATyd5qi38Qa7EGTB6nHgmsS+5KaFHCuJJzRlJZC yX26axxi2MjdBrN/mT8JsivP7TWrS/WQY+ETCLhnxuTENgC8zg7Ri8MbjQY2k1RX1gCT IDBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LuUNSUq9; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j6-20020a62b606000000b0050fac0168c6si14408911pff.49.2022.06.15.08.14.25; Wed, 15 Jun 2022 08:14:37 -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=@kernel.org header.s=k20201202 header.b=LuUNSUq9; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240882AbiFOPLI (ORCPT + 99 others); Wed, 15 Jun 2022 11:11:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232920AbiFOPLH (ORCPT ); Wed, 15 Jun 2022 11:11:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A13E0340C2; Wed, 15 Jun 2022 08:11:05 -0700 (PDT) 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 481C9B81ED1; Wed, 15 Jun 2022 15:11:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E6EAC34115; Wed, 15 Jun 2022 15:11:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655305862; bh=8QqTc264OWMZ8sfVZ4CWeOAu41bS0EzhOXWhbFygifs=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=LuUNSUq9DJXyVwzCzA1ADZiRM+aAgdaZ1rvQmPrrm6tOe703EoxSyzax9AD3Ob5Vx 1CYgRjxUkOFGBjdcbfHO7yOc2eJNLJlD9pN9sNfrYeL2CW40vZdgJIuKj8LzEwnjLX mP1rH4ndRvrtzH/PmaXFpt9gDe/9swcMmY5QYZA725W4jcTrzhgx6fWvurGQKoN7Fw ywtrKnyTDGSmz+OqGb+AXgcpmrljrVdq3yTHpoqZJVN2U7Hm2BxZEPHU9wBBGzWdHx iaF/8OgA3TXGBP6GodtliG3GrAxuEpXt4qCdkGsOfaEucyhgVyPOly5ZhYhZD7CNyG SJh55/XgsR06w== Date: Wed, 15 Jun 2022 10:11:00 -0500 From: Bjorn Helgaas To: Keith Busch Cc: "Guilherme G. Piccoli" , Hans de Goede , "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, Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org Subject: Re: [PATCH] x86/PCI: Revert: "Clip only host bridge windows for E820 regions" Message-ID: <20220615151100.GA937185@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 04:47:35PM -0700, Keith Busch wrote: > On Tue, Jun 14, 2022 at 06:01:28PM -0500, Bjorn Helgaas wrote: > > [+cc NVMe folks] > > > > On Tue, Jun 14, 2022 at 07:49:27PM -0300, Guilherme G. Piccoli wrote: > > > On 14/06/2022 12:47, Hans de Goede wrote: > > > > [...] > > > > > > > > Have you looked at the log of the failed boot in the Steam Deck kernel > > > > bugzilla? Everything there seems to work just fine and then the system > > > > just hangs. I think that maybe it cannot find its root disk, so maybe > > > > an NVME issue ? > > > > > > *Exactly* that - NVMe device is the root disk, it cannot boot since the > > > device doesn't work, hence no rootfs =) > > > > Beginning of thread: https://lore.kernel.org/r/20220612144325.85366-1-hdegoede@redhat.com > > > > Steam Deck broke because we erroneously trimmed out the PCI host > > bridge window where BIOS had placed most devices, successfully > > reassigned all the PCI bridge windows and BARs, but some devices, > > apparently including NVMe, didn't work at the new addresses. > > > > Do you NVMe folks know of gotchas in this area? I want to know > > because we'd like to be able to move devices around someday to > > make room for hot-added devices. > > > > This reassignment happened before drivers claimed the devices, so > > from a PCI point of view, I don't know why the NVMe device > > wouldn't work at the new address. > > The probe status quickly returns ENODEV. Based on the output (we > don't log much, so this is just an educated guesss), I think that > means the driver read all F's from the status register, which > indicates we can't read it when using the reassigned memory window. > > Why changing memory windows may not work tends to be platform or > device specific. Considering the renumbered windows didn't cause a > problem for other devices, it sounds like this nvme device may be > broken. It sounds like you've seen this sort of problem before, so we shouldn't assume that it's safe to reassign BARs. I think Windows supports rebalancing, but it does look like drivers have the ability to veto it: https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/stopping-a-device-to-rebalance-resources https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/the-pnp-manager-redistributes-system-resources So I suppose if/when we support rebalancing, it'll have to be an opt-in thing for each driver.