diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-04-26 00:30:36 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2024-04-30 07:51:34 +0200 |
commit | 720a22fd6c1cdadf691281909950c0cbc5cdf17e (patch) | |
tree | c4cf9c83678c34c28fc759d026d0db6fb2d3b2df /arch/x86/crypto/camellia_glue.c | |
parent | 400fea4b9651adf5d7ebd5d71e905f34f4e4e493 (diff) | |
download | linux-stable-720a22fd6c1cdadf691281909950c0cbc5cdf17e.tar.gz linux-stable-720a22fd6c1cdadf691281909950c0cbc5cdf17e.tar.bz2 linux-stable-720a22fd6c1cdadf691281909950c0cbc5cdf17e.zip |
x86/apic: Don't access the APIC when disabling x2APIC
With 'iommu=off' on the kernel command line and x2APIC enabled by the BIOS
the code which disables the x2APIC triggers an unchecked MSR access error:
RDMSR from 0x802 at rIP: 0xffffffff94079992 (native_apic_msr_read+0x12/0x50)
This is happens because default_acpi_madt_oem_check() selects an x2APIC
driver before the x2APIC is disabled.
When the x2APIC is disabled because interrupt remapping cannot be enabled
due to 'iommu=off' on the command line, x2apic_disable() invokes
apic_set_fixmap() which in turn tries to read the APIC ID. This triggers
the MSR warning because x2APIC is disabled, but the APIC driver is still
x2APIC based.
Prevent that by adding an argument to apic_set_fixmap() which makes the
APIC ID read out conditional and set it to false from the x2APIC disable
path. That's correct as the APIC ID has already been read out during early
discovery.
Fixes: d10a904435fa ("x86/apic: Consolidate boot_cpu_physical_apicid initialization sites")
Reported-by: Adrian Huang <ahuang12@lenovo.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Adrian Huang <ahuang12@lenovo.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/875xw5t6r7.ffs@tglx
Diffstat (limited to 'arch/x86/crypto/camellia_glue.c')
0 files changed, 0 insertions, 0 deletions