<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/acpi/boot.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-03-04T12:20:59Z</updated>
<entry>
<title>x86/acpi/boot: Correct acpi_is_processor_usable() check again</title>
<updated>2026-03-04T12:20:59Z</updated>
<author>
<name>Yazen Ghannam</name>
</author>
<published>2025-11-11T14:53:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a9ee74b28cde52dd395235c54244b0db753c1512'/>
<id>urn:sha1:a9ee74b28cde52dd395235c54244b0db753c1512</id>
<content type='text'>
[ Upstream commit adbf61cc47cb72b102682e690ad323e1eda652c2 ]

ACPI v6.3 defined a new "Online Capable" MADT LAPIC flag. This bit is
used in conjunction with the "Enabled" MADT LAPIC flag to determine if
a CPU can be enabled/hotplugged by the OS after boot.

Before the new bit was defined, the "Enabled" bit was explicitly
described like this (ACPI v6.0 wording provided):

  "If zero, this processor is unusable, and the operating system
  support will not attempt to use it"

This means that CPU hotplug (based on MADT) is not possible. Many BIOS
implementations follow this guidance. They may include LAPIC entries in
MADT for unavailable CPUs, but since these entries are marked with
"Enabled=0" it is expected that the OS will completely ignore these
entries.

However, QEMU will do the same (include entries with "Enabled=0") for
the purpose of allowing CPU hotplug within the guest.

Comment from QEMU function pc_madt_cpu_entry():

  /* ACPI spec says that LAPIC entry for non present
   * CPU may be omitted from MADT or it must be marked
   * as disabled. However omitting non present CPU from
   * MADT breaks hotplug on linux. So possible CPUs
   * should be put in MADT but kept disabled.
   */

Recent Linux topology changes broke the QEMU use case. A following fix
for the QEMU use case broke bare metal topology enumeration.

Rework the Linux MADT LAPIC flags check to allow the QEMU use case only
for guests and to maintain the ACPI spec behavior for bare metal.

Remove an unnecessary check added to fix a bare metal case introduced by
the QEMU "fix".

  [ bp: Change logic as Michal suggested. ]
  [ mingo: Removed misapplied -stable tag. ]

Fixes: fed8d8773b8e ("x86/acpi/boot: Correct acpi_is_processor_usable() check")
Fixes: f0551af02130 ("x86/topology: Ignore non-present APIC IDs in a present package")
Closes: https://lore.kernel.org/r/20251024204658.3da9bf3f.michal.pecio@gmail.com
Reported-by: Michal Pecio &lt;michal.pecio@gmail.com&gt;
Signed-off-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Tested-by: Michal Pecio &lt;michal.pecio@gmail.com&gt;
Tested-by: Ricardo Neri &lt;ricardo.neri-calderon@linux.intel.com&gt;
Link: https://lore.kernel.org/20251111145357.4031846-1-yazen.ghannam@amd.com
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/acpi: Don't limit CPUs to 1 for Xen PV guests due to disabled ACPI</title>
<updated>2025-04-07T14:35:21Z</updated>
<author>
<name>Petr Vaněk</name>
</author>
<published>2025-04-07T13:24:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b37357a78d7fa13d88ea822b35b40137da1c85e'/>
<id>urn:sha1:8b37357a78d7fa13d88ea822b35b40137da1c85e</id>
<content type='text'>
Xen disables ACPI for PV guests in DomU, which causes acpi_mps_check() to
return 1 when CONFIG_X86_MPPARSE is not set. As a result, the local APIC is
disabled and the guest is later limited to a single vCPU, despite being
configured with more.

This regression was introduced in version 6.9 in commit 7c0edad3643f
("x86/cpu/topology: Rework possible CPU management"), which added an
early check that limits CPUs to 1 if apic_is_disabled.

Update the acpi_mps_check() logic to return 0 early when running as a Xen
PV guest in DomU, preventing APIC from being disabled in this specific case
and restoring correct multi-vCPU behaviour.

Fixes: 7c0edad3643f ("x86/cpu/topology: Rework possible CPU management")
Signed-off-by: Petr Vaněk &lt;arkamar@atlas.cz&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/all/20250407132445.6732-2-arkamar@atlas.cz
</content>
</entry>
<entry>
<title>Merge tag 'acpi-6.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm</title>
<updated>2025-01-30T23:22:18Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2025-01-30T23:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47cbb41a2e22554ab63ad2d6f36e9cdacd8cdc11'/>
<id>urn:sha1:47cbb41a2e22554ab63ad2d6f36e9cdacd8cdc11</id>
<content type='text'>
Pull ACPI fixes from Rafael Wysocki:
 "Add a new ACPI-related quirk for Vexia EDU ATLA 10 tablet 5V (Hans de
  Goede) and fix the MADT parsing code so that CPUs with different entry
  types (LAPIC and x2APIC) are initialized in the order in which they
  appear in the MADT as required by the ACPI specification (Zhang Rui)"

* tag 'acpi-6.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  x86/acpi: Fix LAPIC/x2APIC parsing order
  ACPI: x86: Add skip i2c clients quirk for Vexia EDU ATLA 10 tablet 5V
</content>
</entry>
<entry>
<title>mm/memblock: add memblock_alloc_or_panic interface</title>
<updated>2025-01-26T04:22:38Z</updated>
<author>
<name>Guo Weikang</name>
</author>
<published>2025-01-02T07:25:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c6f239796b55dbc4225a6fca9f96232092b9df83'/>
<id>urn:sha1:c6f239796b55dbc4225a6fca9f96232092b9df83</id>
<content type='text'>
Before SLUB initialization, various subsystems used memblock_alloc to
allocate memory.  In most cases, when memory allocation fails, an
immediate panic is required.  To simplify this behavior and reduce
repetitive checks, introduce `memblock_alloc_or_panic`.  This function
ensures that memory allocation failures result in a panic automatically,
improving code readability and consistency across subsystems that require
this behavior.

[guoweikang.kernel@gmail.com: arch/s390: save_area_alloc default failure behavior changed to panic]
  Link: https://lkml.kernel.org/r/20250109033136.2845676-1-guoweikang.kernel@gmail.com
  Link: https://lore.kernel.org/lkml/Z2fknmnNtiZbCc7x@kernel.org/
Link: https://lkml.kernel.org/r/20250102072528.650926-1-guoweikang.kernel@gmail.com
Signed-off-by: Guo Weikang &lt;guoweikang.kernel@gmail.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;	[m68k]
Reviewed-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;	[s390]
Acked-by: Mike Rapoport (Microsoft) &lt;rppt@kernel.org&gt;
Cc: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>x86/acpi: Fix LAPIC/x2APIC parsing order</title>
<updated>2025-01-24T13:27:54Z</updated>
<author>
<name>Zhang Rui</name>
</author>
<published>2025-01-17T08:14:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0141978ae75bd48bac13fca6de131a5071c32011'/>
<id>urn:sha1:0141978ae75bd48bac13fca6de131a5071c32011</id>
<content type='text'>
On some systems, the same CPU (with the same APIC ID) is assigned a
different logical CPU id after commit ec9aedb2aa1a ("x86/acpi: Ignore
invalid x2APIC entries").

This means that Linux enumerates the CPUs in a different order, which
violates ACPI specification[1] that states:

  "OSPM should initialize processors in the order that they appear in
   the MADT"

The problematic commit parses all LAPIC entries before any x2APIC
entries, aiming to ignore x2APIC entries with APIC ID &lt; 255 when valid
LAPIC entries exist. However, it disrupts the CPU enumeration order on
systems where x2APIC entries precede LAPIC entries in the MADT.

Fix this problem by:

 1) Parsing LAPIC entries first without registering them in the
    topology to evaluate whether valid LAPIC entries exist.

 2) Restoring the MADT in order parser which invokes either the LAPIC
    or the X2APIC parser function depending on the entry type.

The X2APIC parser still ignores entries &lt; 0xff in case that #1 found
valid LAPIC entries independent of their position in the MADT table.

Link: https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#madt-processor-local-apic-sapic-structure-entry-order
Cc: All applicable &lt;stable@vger.kernel.org&gt;
Reported-by: Jim Mattson &lt;jmattson@google.com&gt;
Closes: https://lore.kernel.org/all/20241010213136.668672-1-jmattson@google.com/
Fixes: ec9aedb2aa1a ("x86/acpi: Ignore invalid x2APIC entries")
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Jim Mattson &lt;jmattson@google.com&gt;
Tested-by: Jim Mattson &lt;jmattson@google.com&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://patch.msgid.link/20250117081420.4046737-1-rui.zhang@intel.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>x86/acpi: Switch to irq_get_nr_irqs() and irq_set_nr_irqs()</title>
<updated>2024-10-16T19:56:57Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2024-10-15T19:09:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f642974c0b772a18675602f2a366aa49d07baf8c'/>
<id>urn:sha1:f642974c0b772a18675602f2a366aa49d07baf8c</id>
<content type='text'>
Use the irq_get_nr_irqs() and irq_set_nr_irqs() functions instead of the
global variable 'nr_irqs'. Prepare for changing 'nr_irqs' from an
exported global variable into a variable with file scope.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/all/20241015190953.1266194-7-bvanassche@acm.org

</content>
</entry>
<entry>
<title>xen: allow mapping ACPI data using a different physical address</title>
<updated>2024-09-12T06:25:07Z</updated>
<author>
<name>Juergen Gross</name>
</author>
<published>2024-08-09T15:52:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9221222c717dbddac1e3c49906525475d87a3a44'/>
<id>urn:sha1:9221222c717dbddac1e3c49906525475d87a3a44</id>
<content type='text'>
When running as a Xen PV dom0 the system needs to map ACPI data of the
host using host physical addresses, while those addresses can conflict
with the guest physical addresses of the loaded linux kernel. The same
problem might apply in case a PV guest is configured to use the host
memory map.

This conflict can be solved by mapping the ACPI data to a different
guest physical address, but mapping the data via acpi_os_ioremap()
must still be possible using the host physical address, as this
address might be generated by AML when referencing some of the ACPI
data.

When configured to support running as a Xen PV domain, have an
implementation of acpi_os_ioremap() being aware of the possibility to
need above mentioned translation of a host physical address to the
guest physical address.

This modification requires to #include linux/acpi.h in some sources
which need to include asm/acpi.h directly.

Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Reviewed-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
</content>
</entry>
<entry>
<title>x86/acpi: Extract ACPI MADT wakeup code into a separate file</title>
<updated>2024-06-17T15:45:25Z</updated>
<author>
<name>Kirill A. Shutemov</name>
</author>
<published>2024-06-14T09:58:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b5e22afae07ca7d833e251f6d60da8455676ee9'/>
<id>urn:sha1:2b5e22afae07ca7d833e251f6d60da8455676ee9</id>
<content type='text'>
In order to prepare for the expansion of support for the ACPI MADT
wakeup method, move the relevant code into a separate file.

Introduce a new configuration option to clearly indicate dependencies
without the use of ifdefs.

There have been no functional changes.

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Baoquan He &lt;bhe@redhat.com&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Acked-by: Kai Huang &lt;kai.huang@intel.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Tested-by: Tao Liu &lt;ltao@redhat.com&gt;
Link: https://lore.kernel.org/r/20240614095904.1345461-2-kirill.shutemov@linux.intel.com
</content>
</entry>
<entry>
<title>x86/cpu/topology: Let XEN/PV use topology from CPUID/MADT</title>
<updated>2024-02-15T21:07:44Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2024-02-13T21:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=354da4cf57af5d8b5302251204d6077600b6d3d6'/>
<id>urn:sha1:354da4cf57af5d8b5302251204d6077600b6d3d6</id>
<content type='text'>
It turns out that XEN/PV Dom0 has halfways usable CPUID/MADT enumeration
except that it cannot deal with CPUs which are enumerated as disabled in
MADT.

DomU has no MADT and provides at least rudimentary topology information in
CPUID leaves 1 and 4.

For both it's important that there are not more possible Linux CPUs than
vCPUs provided by the hypervisor.

As this is ensured by counting the vCPUs before enumeration happens:

  - lift the restrictions in the CPUID evaluation and the MADT parser

  - Utilize MADT registration for Dom0

  - Keep the fake APIC ID registration for DomU

  - Fix the XEN APIC fake so the readout of the local APIC ID works for
    Dom0 via the hypercall and for DomU by returning the registered
    fake APIC IDs.

With that the XEN/PV fake approximates usefulness.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Michael Kelley &lt;mhklinux@outlook.com&gt;
Tested-by: Sohil Mehta &lt;sohil.mehta@intel.com&gt;
Link: https://lore.kernel.org/r/20240213210252.626195405@linutronix.de





</content>
</entry>
<entry>
<title>x86/acpi: Dont invoke topology_register_apic() for XEN PV</title>
<updated>2024-02-15T21:07:42Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2024-02-13T21:05:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cab8e164a49c0ee5c9acb7edec33d76422d831bf'/>
<id>urn:sha1:cab8e164a49c0ee5c9acb7edec33d76422d831bf</id>
<content type='text'>
The MADT table for XEN/PV dom0 is not really useful and registering the
APICs is momentarily a pointless exercise because XENPV does not use an
APIC at all.

It overrides the x86_init.mpparse.parse_smp_config() callback, resets
num_processors and counts how many of them are provided by the hypervisor.

This is in the way of cleaning up the APIC registration. Prevent MADT
registration for XEN/PV temporarily until the rework is completed and
XEN/PV can use the MADT again.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Michael Kelley &lt;mhklinux@outlook.com&gt;
Tested-by: Sohil Mehta &lt;sohil.mehta@intel.com&gt;
Link: https://lore.kernel.org/r/20240213210251.885489468@linutronix.de



</content>
</entry>
</feed>
