From: "Zhang, Rui" <rui.zhang@intel.com>
To: "ggherdovich@suse.cz" <ggherdovich@suse.cz>,
"rafael@kernel.org" <rafael@kernel.org>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"lenb@kernel.org" <lenb@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 1/2] ACPI: processor: idle: Return an error if both P_LVL{2,3} idle states are invalid
Date: Mon, 31 Mar 2025 01:08:59 +0000 [thread overview]
Message-ID: <55bc62e588f526ae964533cf2af612a4beea5d32.camel@intel.com> (raw)
In-Reply-To: <20250328143040.9348-1-ggherdovich@suse.cz>
On Fri, 2025-03-28 at 15:30 +0100, Giovanni Gherdovich wrote:
> Prior to commit 496121c02127e9c460b436244c38260b044cc45a ("ACPI:
> processor:
> idle: Allow probing on platforms with one ACPI C-state"), the
> acpi_idle
> driver wouldn't load on systems without a valid C-State at least as
> deep
> as C2. The behavior was desirable for guests on hypervisors such as
> VMWare
> ESXi, which by default don't have the _CST ACPI method, and set the
> C2 and
> C3 latencies to 101 and 1001 microseconds respectively via the FADT,
> to
> signify they're unsupported.
>
> Since the above change though, these virtualized deployments end up
> loading
> acpi_idle, and thus entering the default C1 C-State set by
> acpi_processor_get_power_info_default(); this is undesirable for a
> system
> that's communicating to the OS it doesn't want C-States (missing
> _CST, and
> invalid C2/C3 in FADT).
>
> Make acpi_processor_get_power_info_fadt() return ENODEV in that case,
> so
> that acpi_processor_get_cstate_info() exits early and doesn't set
> pr->flags.power = 1.
>
> Fixes: 496121c02127 ("ACPI: processor: idle: Allow probing on
> platforms with one ACPI C-state")
> Signed-off-by: Giovanni Gherdovich <ggherdovich@suse.cz>
LGTM.
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
-rui
> ---
> drivers/acpi/processor_idle.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/acpi/processor_idle.c
> b/drivers/acpi/processor_idle.c
> index 586cc7d1d8aa..b181f7fc2090 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -268,6 +268,10 @@ static int
> acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
> ACPI_CX_DESC_LEN, "ACPI P_LVL3 IOPORT
> 0x%x",
> pr->power.states[ACPI_STATE_C3].address);
>
> + if (!pr->power.states[ACPI_STATE_C2].address &&
> + !pr->power.states[ACPI_STATE_C3].address)
> + return -ENODEV;
> +
> return 0;
> }
>
next prev parent reply other threads:[~2025-03-31 1:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-28 14:30 [PATCH 1/2] ACPI: processor: idle: Return an error if both P_LVL{2,3} idle states are invalid Giovanni Gherdovich
2025-03-28 14:30 ` [PATCH 2/2] ACPI: processor: idle: Remove obsolete comment Giovanni Gherdovich
2025-03-31 7:38 ` Zhang, Rui
2025-03-31 12:07 ` Rafael J. Wysocki
2025-04-01 0:25 ` Zhang, Rui
2025-04-01 12:13 ` Rafael J. Wysocki
2025-04-03 1:11 ` Zhang, Rui
2025-04-03 10:42 ` Rafael J. Wysocki
2025-04-09 0:54 ` Zhang, Rui
2025-04-09 12:54 ` Rafael J. Wysocki
2025-03-31 1:08 ` Zhang, Rui [this message]
2025-03-31 12:02 ` [PATCH 1/2] ACPI: processor: idle: Return an error if both P_LVL{2,3} idle states are invalid Rafael J. Wysocki
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=55bc62e588f526ae964533cf2af612a4beea5d32.camel@intel.com \
--to=rui.zhang@intel.com \
--cc=ggherdovich@suse.cz \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
/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