No description
Find a file
Thomas Gleixner c983c044ad x86/apic: Don't access the APIC when disabling x2APIC
commit 720a22fd6c upstream.

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: d10a904435 ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-17 12:15:08 +02:00
arch x86/apic: Don't access the APIC when disabling x2APIC 2024-05-17 12:15:08 +02:00
block blk-iocost: do not WARN if iocg was already offlined 2024-05-17 12:14:50 +02:00
certs
crypto
Documentation dt-bindings: iio: health: maxim,max30102: fix compatible check 2024-05-17 12:15:02 +02:00
drivers misc/pvpanic-pci: register attributes via pci_driver 2024-05-17 12:15:08 +02:00
fs btrfs: make sure that WRITTEN is set on all metadata blocks 2024-05-17 12:15:01 +02:00
include kmsan: compiler_types: declare __no_sanitize_or_inline 2024-05-17 12:15:03 +02:00
init
io_uring
ipc
kernel workqueue: Fix selection of wake_cpu in kick_pool() 2024-05-17 12:15:02 +02:00
lib dyndbg: fix old BUG_ON in >control parser 2024-05-17 12:15:04 +02:00
LICENSES
mm mm/slub: avoid zeroing outside-object freepointer for single free 2024-05-17 12:15:00 +02:00
net net: fix out-of-bounds access in ops_init 2024-05-17 12:15:07 +02:00
rust
samples
scripts
security
sound ASoC: ti: davinci-mcasp: Fix race condition during probe 2024-05-17 12:15:04 +02:00
tools selftests: test_bridge_neigh_suppress.sh: Fix failures due to duplicate MAC 2024-05-17 12:14:53 +02:00
usr
virt
.clang-format
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.