[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230807135027.952716842@linutronix.de>
Date: Mon, 7 Aug 2023 15:53:18 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: x86@...nel.org, Tom Lendacky <thomas.lendacky@....com>,
Andrew Cooper <andrew.cooper3@...rix.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
Huang Rui <ray.huang@....com>, Juergen Gross <jgross@...e.com>,
Dimitri Sivanich <dimitri.sivanich@....com>,
Michael Kelley <mikelley@...rosoft.com>,
Sohil Mehta <sohil.mehta@...el.com>,
K Prateek Nayak <kprateek.nayak@....com>,
Kan Liang <kan.liang@...ux.intel.com>,
Zhang Rui <rui.zhang@...el.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Feng Tang <feng.tang@...el.com>,
Andy Shevchenko <andy@...radead.org>
Subject: [patch 29/53] 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@...utronix.de>
---
arch/x86/kernel/acpi/boot.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- 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>
@@ -161,7 +163,8 @@ static int __init acpi_parse_madt(struct
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)
@@ -1070,7 +1073,8 @@ static int __init early_acpi_parse_madt_
return count;
}
- register_lapic_address(acpi_lapic_addr);
+ if (!xen_pv_domain())
+ register_lapic_address(acpi_lapic_addr);
return count;
}
Powered by blists - more mailing lists