Thread (9 messages) 9 messages, 5 authors, 2021-06-07

RE: [PATCH v5 2/2] acpi: PM: Add quirks for AMD Renoir/Lucienne CPUs to force the D3 hint

From: "Deucher, Alexander" <Alexander.Deucher@amd.com>
Date: 2021-06-04 18:49:09
Also in: linux-acpi

[AMD Public Use]
-----Original Message-----
From: Limonciello, Mario <Mario.Limonciello@amd.com>
Sent: Friday, June 4, 2021 1:58 PM
To: Raul Rangel <redacted>
Cc: Keith Busch <kbusch@kernel.org>; Jens Axboe <axboe@fb.com>;
Christoph Hellwig [off-list ref]; Sagi Grimberg [off-list ref]; Rafael
J . Wysocki [off-list ref]; open list:NVM EXPRESS DRIVER <linux-
nvme@lists.infradead.org>; linux-acpi@vger.kernel.org;
david.e.box@linux.intel.com; S-k, Shyam-sundar <Shyam-sundar.S-
k@amd.com>; Deucher, Alexander [off-list ref]; Liang,
Prike [off-list ref]; Julian Sikorski [off-list ref]
Subject: Re: [PATCH v5 2/2] acpi: PM: Add quirks for AMD Renoir/Lucienne
CPUs to force the D3 hint

On 6/4/2021 12:43, Raul Rangel wrote:
quoted
On Fri, Jun 4, 2021 at 10:54 AM Mario Limonciello
[off-list ref] wrote:
quoted
+
+#ifdef CONFIG_X86
+static const struct x86_cpu_id storage_d3_cpu_ids[] = {
+       X86_MATCH_VENDOR_FAM_MODEL(AMD, 23, 96, NULL),  /* Renoir
*/
quoted
quoted
+       X86_MATCH_VENDOR_FAM_MODEL(AMD, 23, 104, NULL), /*
Lucienne */
quoted
quoted
+       {}
+};
+#endif
+
Is this the same matching logic that Windows is using?
I don't have access to confirm their logic for it - but they do have an allowlist
that was used for systems before StorageD3Enable was introduced as well as
a registry key to override it in Windows.

My understanding from the windows team is that these AMD platforms use the allow list.

Alex
In Linux we can do it a number of ways:

* Detect the CPU in RN/LCN platforms
   - Like I did in this patch

* Detect some other PCI device only present in RN/LCN platforms and set
this hint
   - Like some earlier versions of this patch series from Prike did

* Introduce a tri-state module parameter like d3=auto,off,on
   - Set up logic behind auto to use acpi_storage_d3 primarily and look at a
quirk list as a fallback if that was false.

* Add a compile time option to include these quirks in either acpi or nvme.ko
only if a user selected them.

* Enumerate all the field systems SMBIOS we can find with these CPUs
   - Expect this to be a large quirk list.

I don't have a strong opinion between those two first options, but suspect
the 3rd through 5th aren't really acceptable or scalable.

I'm open to other suggestions but testers of the patches thus far have made
it clear that /something/ needs to be done to avoid the problems on RN with
Linux though.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help