From: Mario Limonciello <superm1@kernel.org>
To: "Derek J. Clark" <derekjohn.clark@gmail.com>,
"Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Armin Wolf" <W_Armin@gmx.de>, "Len Brown" <lenb@kernel.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>
Cc: Zhixin Zhang <zhangzx36@lenovo.com>,
Mia Shao <shaohz1@lenovo.com>,
Mark Pearson <mpearson-lenovo@squebb.ca>,
"Pierre-Loup A . Griffais" <pgriffais@valvesoftware.com>,
Kurt Borja <kuurtb@gmail.com>,
platform-driver-x86@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 3/3] platform/x86: lenovo-wmi-gamezone Use explicit allow list
Date: Sun, 26 Oct 2025 16:19:01 -0500 [thread overview]
Message-ID: <e3f19e6b-9500-4283-aae8-24ebba2bbb60@kernel.org> (raw)
In-Reply-To: <1411B6CE-132B-4450-BB27-9ED44BD897B0@gmail.com>
On 10/26/25 2:22 PM, Derek J. Clark wrote:
> On October 26, 2025 10:50:40 AM PDT, Mario Limonciello <superm1@kernel.org> wrote:
>>
>>
>> On 10/26/25 3:12 AM, Derek J. Clark wrote:
>>> The stubbed extreme mode issue seems to be more prevalent than previously
>>> thought with multiple users having reported BIOS bugs from setting
>>> "performance" when using userspace tools such as PPD. To avoid this ever
>>> being possible, make enabling extreme mode an explicit allow list instead.
>>> These users will still be able to set extreme mode using the Fn+Q keyboard
>>> chord, so no functionality is lost. Currently no models have been
>>> validated with extreme mode.
>>
>> So what exactly happens when a user uses FN+Q to change to extreme mode but it's now in the allow list? Does it report as "custom" mode?
>>
> It turns out I got a correction after posting this that I'll need to include for v2. Extreme is never actually set using Fn+Q and can only be set in software. In that case, functionality is lost (though extreme should match custom mode default values, so only slightly). The only chance this could happen realistically would be if a user switched from windows in extreme mode and then booted windows, since the setting is retained.
Is retaining the setting across reboots/OSes the "expected" behavior?
Or should it be resetting to balanced at startup?
If you set it explicitly to balanced when the module is loaded that
would help to alleviate any of these corner cases.
>
> TBS, I'm asking some folks to test exactly that situation so we can know definitely. My assumption was that it would report extreme normally but not be setable.
>
>> I feel like this is going to turn into an impedance mismatch. I'm leaning it's better to just expose extreme mode so that userspace knows what's actually going on.
>
> It's possible, I'll wait for confirmation of the behavior from someone with the affected hardware.
OK.
>
> Thanks,
> Derek
>
>> I feel the bug situation will actually improve because PPD and Tuned have no idea what extreme mode means so it won't be "easy" to get into it. This at least will allow discovery of BIOS bugs as well that can then get reported and fixed in BIOS.
>>
>>>
>>> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
>>> ---
>>> .../wmi/devices/lenovo-wmi-gamezone.rst | 10 +++---
>>> drivers/platform/x86/lenovo/wmi-gamezone.c | 33 ++-----------------
>>> 2 files changed, 8 insertions(+), 35 deletions(-)
>>>
>>> diff --git a/Documentation/wmi/devices/lenovo-wmi-gamezone.rst b/Documentation/wmi/devices/lenovo-wmi-gamezone.rst
>>> index 6c908f44a08e..79051dc62022 100644
>>> --- a/Documentation/wmi/devices/lenovo-wmi-gamezone.rst
>>> +++ b/Documentation/wmi/devices/lenovo-wmi-gamezone.rst
>>> @@ -31,11 +31,11 @@ The following platform profiles are supported:
>>> Extreme
>>> ~~~~~~~~~~~~~~~~~~~~
>>> Some newer Lenovo "Gaming Series" laptops have an "Extreme Mode" profile
>>> -enabled in their BIOS.
>>> -
>>> -For some newer devices the "Extreme Mode" profile is incomplete in the BIOS
>>> -and setting it will cause undefined behavior. A BIOS bug quirk table is
>>> -provided to ensure these devices cannot set "Extreme Mode" from the driver.
>>> +enabled in their BIOS. For some newer devices the "Extreme Mode" profile
>>> +is incomplete in the BIOS and setting it will cause undefined behavior. To
>>> +prevent ever setting this on unsupported hardware, an explicit allow quirk
>>> +table is provided with all validated devices. This ensures only fully
>>> +supported devices can set "Extreme Mode" from the driver.
>>> Custom Profile
>>> ~~~~~~~~~~~~~~
>>> diff --git a/drivers/platform/x86/lenovo/wmi-gamezone.c b/drivers/platform/x86/lenovo/wmi-gamezone.c
>>> index faabbd4657bd..0488162a7194 100644
>>> --- a/drivers/platform/x86/lenovo/wmi-gamezone.c
>>> +++ b/drivers/platform/x86/lenovo/wmi-gamezone.c
>>> @@ -47,10 +47,6 @@ struct quirk_entry {
>>> bool extreme_supported;
>>> };
>>> -static struct quirk_entry quirk_no_extreme_bug = {
>>> - .extreme_supported = false,
>>> -};
>>> -
>>> /**
>>> * lwmi_gz_mode_call() - Call method for lenovo-wmi-other driver notifier.
>>> *
>>> @@ -241,31 +237,8 @@ static int lwmi_gz_profile_set(struct device *dev,
>>> return 0;
>>> }
>>> +/* Explicit allow list */
>>> static const struct dmi_system_id fwbug_list[] = {
>>> - {
>>> - .ident = "Legion Go 8APU1",
>>> - .matches = {
>>> - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
>>> - DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go 8APU1"),
>>> - },
>>> - .driver_data = &quirk_no_extreme_bug,
>>> - },
>>> - {
>>> - .ident = "Legion Go S 8APU1",
>>> - .matches = {
>>> - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
>>> - DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go S 8APU1"),
>>> - },
>>> - .driver_data = &quirk_no_extreme_bug,
>>> - },
>>> - {
>>> - .ident = "Legion Go S 8ARP1",
>>> - .matches = {
>>> - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
>>> - DMI_MATCH(DMI_PRODUCT_VERSION, "Legion Go S 8ARP1"),
>>> - },
>>> - .driver_data = &quirk_no_extreme_bug,
>>> - },
>>> {},
>>> };
>>> @@ -278,7 +251,7 @@ static const struct dmi_system_id fwbug_list[] = {
>>> * Anything version 5 or lower does not. For devices with a version 6 or
>>> * greater do a DMI check, as some devices report a version that supports
>>> * extreme mode but have an incomplete entry in the BIOS. To ensure this
>>> - * cannot be set, quirk them to prevent assignment.
>>> + * cannot be set, quirk them to enable assignment.
>>> *
>>> * Return: bool.
>>> */
>>> @@ -292,7 +265,7 @@ static bool lwmi_gz_extreme_supported(int profile_support_ver)
>>> dmi_id = dmi_first_match(fwbug_list);
>>> if (!dmi_id)
>>> - return true;
>>> + return false;
>>> quirks = dmi_id->driver_data;
>>>
>>
>
next prev parent reply other threads:[~2025-10-26 21:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-26 8:12 [PATCH 0/3] Add extreme platform profile Derek J. Clark
2025-10-26 8:12 ` [PATCH 1/3] acpi: platform_profile - Add Extreme profile option Derek J. Clark
2025-10-26 17:53 ` Mario Limonciello
2025-11-03 15:58 ` Rafael J. Wysocki
2025-10-26 8:12 ` [PATCH 2/3] platform/x86: lenovo-wmi-gamezone Use Extreme vice balanced-performance Derek J. Clark
2025-10-26 17:52 ` Mario Limonciello
2025-10-26 19:10 ` Derek J. Clark
2025-10-26 8:12 ` [PATCH 3/3] platform/x86: lenovo-wmi-gamezone Use explicit allow list Derek J. Clark
2025-10-26 17:50 ` Mario Limonciello
2025-10-26 19:22 ` Derek J. Clark
2025-10-26 21:19 ` Mario Limonciello [this message]
2025-10-31 1:19 ` Derek John Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e3f19e6b-9500-4283-aae8-24ebba2bbb60@kernel.org \
--to=superm1@kernel.org \
--cc=W_Armin@gmx.de \
--cc=corbet@lwn.net \
--cc=derekjohn.clark@gmail.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kuurtb@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpearson-lenovo@squebb.ca \
--cc=pgriffais@valvesoftware.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=shaohz1@lenovo.com \
--cc=zhangzx36@lenovo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).