Skip to content

Commit a74fabf

Browse files
superm1bp3tk0v
authored andcommitted
x86/ACPI/boot: Use FADT version to check support for online capable
ACPI 6.3 introduced the online capable bit, and also introduced MADT version 5. Latter was used to distinguish whether the offset storing online capable could be used. However ACPI 6.2b has MADT version "45" which is for an errata version of the ACPI 6.2 spec. This means that the Linux code for detecting availability of MADT will mistakenly flag ACPI 6.2b as supporting online capable which is inaccurate as it's an ACPI 6.3 feature. Instead use the FADT major and minor revision fields to distinguish this. [ bp: Massage. ] Fixes: aa06e20 ("x86/ACPI: Don't add CPUs that are not online capable") Reported-by: Eric DeVolder <eric.devolder@oracle.com> Reported-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Cc: <stable@kernel.org> Link: https://lore.kernel.org/r/943d2445-84df-d939-f578-5d8240d342cc@unsolicited.net
1 parent 197b6b6 commit a74fabf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/x86/kernel/acpi/boot.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,11 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)
146146

147147
pr_debug("Local APIC address 0x%08x\n", madt->address);
148148
}
149-
if (madt->header.revision >= 5)
149+
150+
/* ACPI 6.3 and newer support the online capable bit. */
151+
if (acpi_gbl_FADT.header.revision > 6 ||
152+
(acpi_gbl_FADT.header.revision == 6 &&
153+
acpi_gbl_FADT.minor_revision >= 3))
150154
acpi_support_online_capable = true;
151155

152156
default_acpi_madt_oem_check(madt->header.oem_id,

0 commit comments

Comments
 (0)