summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2024-02-13 22:05:43 +0100
committerThomas Gleixner <tglx@linutronix.de>2024-02-15 22:07:42 +0100
commitcab8e164a49c0ee5c9acb7edec33d76422d831bf (patch)
treed22cbc05a101a4e1915214fc68045c14cde15e7f
parent8098428c541212e9835c1771ee90caa968ffef4f (diff)
downloadlinux-stable-cab8e164a49c0ee5c9acb7edec33d76422d831bf.tar.gz
linux-stable-cab8e164a49c0ee5c9acb7edec33d76422d831bf.tar.bz2
linux-stable-cab8e164a49c0ee5c9acb7edec33d76422d831bf.zip
x86/acpi: Dont invoke topology_register_apic() for XEN PV
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 <tglx@linutronix.de> Tested-by: Michael Kelley <mhklinux@outlook.com> Tested-by: Sohil Mehta <sohil.mehta@intel.com> Link: https://lore.kernel.org/r/20240213210251.885489468@linutronix.de
-rw-r--r--arch/x86/kernel/acpi/boot.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 42799d5d3876..df741fbbc660 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -23,6 +23,8 @@
#include <linux/serial_core.h>
#include <linux/pgtable.h>
+#include <xen/xen.h>
+
#include <asm/e820/api.h>
#include <asm/irqdomain.h>
#include <asm/pci_x86.h>
@@ -166,7 +168,8 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)
static __init void acpi_register_lapic(u32 apic_id, u32 acpi_id, bool present)
{
- topology_register_apic(apic_id, acpi_id, present);
+ if (!xen_pv_domain())
+ topology_register_apic(apic_id, acpi_id, present);
}
static bool __init acpi_is_processor_usable(u32 lapic_flags)
@@ -1087,7 +1090,8 @@ static int __init early_acpi_parse_madt_lapic_addr_ovr(void)
return count;
}
- register_lapic_address(acpi_lapic_addr);
+ if (!xen_pv_domain())
+ register_lapic_address(acpi_lapic_addr);
return count;
}