Skip to content

Commit fdaeae8

Browse files
committed
ACPI: processor: idle: Return an error if both P_LVL{2,3} idle states are invalid
JIRA: https://issues.redhat.com/browse/RHEL-114091 commit 9e9b893 Author: Giovanni Gherdovich <ggherdovich@suse.cz> Date: Mon, 31 Mar 2025 13:59:04 +0000 Prior to commit 496121c ("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: 496121c ("ACPI: processor: idle: Allow probing on platforms with one ACPI C-state") Signed-off-by: Giovanni Gherdovich <ggherdovich@suse.cz> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Link: https://patch.msgid.link/20250328143040.9348-1-ggherdovich@suse.cz [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
1 parent c51abe8 commit fdaeae8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/acpi/processor_idle.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
276276
ACPI_CX_DESC_LEN, "ACPI P_LVL3 IOPORT 0x%x",
277277
pr->power.states[ACPI_STATE_C3].address);
278278

279+
if (!pr->power.states[ACPI_STATE_C2].address &&
280+
!pr->power.states[ACPI_STATE_C3].address)
281+
return -ENODEV;
282+
279283
return 0;
280284
}
281285

0 commit comments

Comments
 (0)