Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2698234rdb; Mon, 5 Feb 2024 15:05:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUqMCKK4VwIYYISOfhPoO9Z0dF/UQjkG6HaAazD4V6+C2GyNDISmcHOJbrlCGrH5BnGhRJ X-Received: by 2002:a17:906:b2d1:b0:a37:58cb:699d with SMTP id cf17-20020a170906b2d100b00a3758cb699dmr994252ejb.26.1707174316342; Mon, 05 Feb 2024 15:05:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707174316; cv=pass; d=google.com; s=arc-20160816; b=ZEyvaxIVYP0+FFuKlHkHqjlFYZjWkWD7muPO6eTrpELzJjdsEX1rBXkcoTzA6TQpYg en5dJtYOuSUGyaNdtL6icTtbXhSBiHBjdp6sLcqzuJdILtuIHwHfVKelwUIdp1B4qsli MC4P8ZA25rV/vaTIGvonCrbSTiaESzLbJNS7nHfJ9lQTHyDE0zmgT4CPi2CtPkThjJ7D cG0SXyRWXvJ4inoDUcOeaEy9sV8RlZL2wQE1Ua0MvosbA7koLAaUgiD9TYY/ASsgWZig QlA57poMF7i0eFmuQR+5QC0V6H7/A0vDXZ/MynnPbIPEM2SpSs7T3TFSiSIAM8WZO21k Mw0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:organization:autocrypt :references:in-reply-to:date:cc:to:reply-to:from:subject:message-id :dkim-signature; bh=exX5KdRECIuDkgSKffW/CCcJimxZSmAS3Hy5qSzhDs0=; fh=mZTp9i6TsZ3hhbipm0/oVzCD/T9Fo7K4LMk7kHCu/VM=; b=guFhzBflQcd4xJeVq8ifOmBJVRkJHYWUpHE0IufyLkPgEh48JbZnx1OkcfOXxVJRGf TsCWKAWRVtIsEjDGJIYbOd9xJQGkg5fvXrKW1wjVXssUjZztc0PDKVLrgKnUnYo0an9U 1Rh+htyMJyo/HXrT/34JyzJj0NgeFLItpGSJRj8UtjNz/Buw9JHlAVLHGsPkiFHmkoNV STsOU5gLKVIktT/5XjYwZNArFByMtLHqrdx/n7enbexipZ2uYlZvwmf31jpzdcQO/BdU Ql2AHTDC4gvP4fbB/uchudhJ3LzUipCojdu3LiLyZBl3ZrB49X4MHIMKQAFOldQZjvGs cBHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=a+4vsT+d; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-54065-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54065-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCUCQqxmEgLzaSnkmuShG4kZOmSH4YEhpftJEmho4zsOG3OrkLzp9UsKhJgldoOTXrJDktcqzCjdcyiu42xb687fCs9BhbRvVQDpSPrR0A== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v9-20020a17090606c900b00a35a69ff2a2si319786ejb.864.2024.02.05.15.05.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 15:05:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54065-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=a+4vsT+d; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-54065-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54065-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 D45701F2BE71 for ; Mon, 5 Feb 2024 23:05:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2A37481BF; Mon, 5 Feb 2024 23:05:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="a+4vsT+d" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 ED8ED482F6; Mon, 5 Feb 2024 23:05:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707174307; cv=none; b=AnhouwySRQCFpDxp171ksAQkMZ+h/dRVBZbQUCb3BNvHwAAdUYxM/4kABhLAWdr2tvzr4hkx9wdwe4rdx+W+OH8X1WcWdfDyajszeYPeeBCZLhvb/zaeQ1O0V0irjfg2kK0clEiHQyAgg4Xj3GP+QHYYfeLABtoc8Ir/F96SlSQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707174307; c=relaxed/simple; bh=s83lCuKokWH11mDshMciFhjc8wYrwZThNCAv4SF+2fU=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=L5FXLcTDOj4twY2Xd0n9LboLk+zawbx7ITHF2qUUk88KXO83u6WPHxYi0yqSq83Fy3J+qtNEvThzYOBSaFqyaArh+2CSNl3iA+45PZRbm3zAek8XsnaR6UwzkYhNkHhMrKz84yEVA4cBiHWrwP/uJkJIodezXmqDgC+OC9QO/IQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=a+4vsT+d; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707174305; x=1738710305; h=message-id:subject:from:reply-to:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=s83lCuKokWH11mDshMciFhjc8wYrwZThNCAv4SF+2fU=; b=a+4vsT+dvsrZDWFiskd5ErjDt+UPtKmgubUtNENZKVmEjAhZbLBHYeoc v8q1hCc1y8sTQx5bHS9lF0f0k+150BJ8EbwAcPj5hG4WAYdDEcqf8xVx8 grOdP++o+/XAyr2RMy07vABPDwaWVsrjKGzbscTjpOjblhH0v4maOinbX phSsI1BsTHFAgxLaEVGv58dSNUin5UzrQu3wvDfne1ZL0eAlvPBtzEy+Y eJV3YVTxAE3jn02u6T9N1o63m8IeuZXDXxHcWJY8qrSW4+ObJX08CR1N+ 0VeqyiUsNRPVObD+Gbsnin7PcgwumWm6vlSvDYQO10fKsweeCZmGv05S0 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10975"; a="11707866" X-IronPort-AV: E=Sophos;i="6.05,245,1701158400"; d="scan'208";a="11707866" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2024 15:05:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,245,1701158400"; d="scan'208";a="31924907" Received: from linux.intel.com ([10.54.29.200]) by fmviesa001.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2024 15:05:03 -0800 Received: from [10.54.75.156] (debox1-desk1.jf.intel.com [10.54.75.156]) by linux.intel.com (Postfix) with ESMTP id EA048580D9C; Mon, 5 Feb 2024 15:05:02 -0800 (PST) Message-ID: <02938148545933dc9865ddbc5551e3e8a579d57e.camel@linux.intel.com> Subject: Re: [PATCH v2] PCI: vmd: Enable PCI PM's L1 substates of remapped PCIe Root Port and NVMe From: "David E. Box" Reply-To: david.e.box@linux.intel.com To: Bjorn Helgaas Cc: Jian-Hong Pan , Johan Hovold , Mika Westerberg , Damien Le Moal , Niklas Cassel , Nirmal Patel , Jonathan Derrick , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux@endlessos.org Date: Mon, 05 Feb 2024 15:05:02 -0800 In-Reply-To: <20240205224215.GA829734@bhelgaas> References: <20240205224215.GA829734@bhelgaas> Autocrypt: addr=david.e.box@linux.intel.com; prefer-encrypt=mutual; keydata=mQENBF2w2YABCACw5TpqmFTR6SgsrNqZE8ro1q2lUgVZda26qIi8GeHmVBmu572RfPydisEpCK246rYM5YY9XAps810ZxgFlLyBqpE/rxB4Dqvh04QePD6fQNui/QCSpyZ6j9F8zl0zutOjfNTIQBkcar28hazL9I8CGnnMko21QDl4pkrq1dgLSgl2r2N1a6LJ2l8lLnQ1NJgPAev4BWo4WAwH2rZ94aukzAlkFizjZXmB/6em+lhinTR9hUeXpTwcaAvmCHmrUMxeOyhx+csO1uAPUjxL7olj2J83dv297RrpjMkDyuUOv8EJlPjvVogJF1QOd5MlkWdj+6vnVDRfO8zUwm2pqg25DABEBAAG0KkRhdmlkIEUuIEJveCA8ZGF2aWQuZS5ib3hAbGludXguaW50ZWwuY29tPokBTgQTAQgAOBYhBBFoZ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MRmOo+AiBSnTI4xvb1s/TxSfoLZvtoj2MR+2PW1zBALWYUKHOzhfFKs3cMufwIIoQUPVqGVeH+u6Asun6ZpNRxdDONop+uEXHe6q6LzI/NnczqoZQLhM8d1XqokYax/IZ4= Organization: David E. Box Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.2 (3.50.2-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2024-02-05 at 16:42 -0600, Bjorn Helgaas wrote: > On Mon, Feb 05, 2024 at 11:37:16AM -0800, David E. Box wrote: > > On Fri, 2024-02-02 at 18:05 -0600, Bjorn Helgaas wrote: > > > On Fri, Feb 02, 2024 at 03:11:12PM +0800, Jian-Hong Pan wrote: > > ... >=20 > > > > @@ -775,6 +773,14 @@ static int vmd_pm_enable_quirk(struct pci_dev > > > > *pdev, > > > > void *userdata) > > > > =C2=A0 pci_write_config_dword(pdev, pos + PCI_LTR_MAX_SNOOP_LAT, > > > > ltr_reg); > > > > =C2=A0 pci_info(pdev, "VMD: Default LTR value set by driver\n"); > > >=20 > > > You're not changing this part, and I don't understand exactly how LTR > > > works, but it makes me a little bit queasy to read "set the LTR value > > > to the maximum required to allow the deepest power management > > > savings" and then we set the max snoop values to a fixed constant. > > >=20 > > > I don't think the goal is to "allow the deepest power savings"; I > > > think it's to enable L1.2 *when the device has enough buffering to > > > absorb L1.2 entry/exit latencies*. > > >=20 > > > The spec (PCIe r6.0, sec 7.8.2.2) says "Software should set this to > > > the platform's maximum supported latency or less," so it seems like > > > that value must be platform-dependent, not fixed. > > >=20 > > > And I assume the "_DSM for Latency Tolerance Reporting" is part of th= e > > > way to get those platform-dependent values, but Linux doesn't actuall= y > > > use that yet. > >=20 > > This may indeed be the best way but we need to double check with our > > BIOS folks.=C2=A0 AFAIK BIOS writes the LTR values directly so there > > hasn't been a need to use this _DSM. But under VMD the ports are > > hidden from BIOS which is why we added it here. I've brought up the > > question internally to find out how Windows handles the DSM and to > > get a recommendation from our firmware leads. >=20 > We want Linux to be able to program LTR itself, don't we?=C2=A0 We > shouldn't have to rely on firmware to do it.=C2=A0 If Linux can't do > it, hot-added devices aren't going to be able to use L1.2, right? Agreed. We just want to make sure we are not conflicting with what BIOS may= be doing. David