From 3342ee9318cd38ba006255b687ab7a145399ea92 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 23 Sep 2019 14:42:43 +0200 Subject: [PATCH] x86/boot: silence MADT table entry logging Logging disabled LAPIC / x2APIC entries with invalid local APIC IDs (ones having "broadcast" meaning when used) isn't very useful, and can be quite noisy on larger systems. Suppress their logging unless opt_cpu_info is true. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper master commit: 936b77255269b3b9b5685d565550e77d5080ac81 master date: 2018-09-03 17:51:40 +0200 --- xen/arch/x86/acpi/boot.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c index 8e6c96dcf6..5b86ba0d30 100644 --- a/xen/arch/x86/acpi/boot.c +++ b/xen/arch/x86/acpi/boot.c @@ -83,21 +83,26 @@ acpi_parse_x2apic(struct acpi_subtable_header *header, const unsigned long end) { struct acpi_madt_local_x2apic *processor = container_of(header, struct acpi_madt_local_x2apic, header); - bool enabled = false; + bool enabled = false, log = false; if (BAD_MADT_ENTRY(processor, end)) return -EINVAL; - acpi_table_print_madt_entry(header); + if ((processor->lapic_flags & ACPI_MADT_ENABLED) || + processor->local_apic_id != 0xffffffff || opt_cpu_info) { + acpi_table_print_madt_entry(header); + log = true; + } /* Record local apic id only when enabled and fitting. */ if (processor->local_apic_id >= MAX_APICS || processor->uid >= MAX_MADT_ENTRIES) { - printk("%sAPIC ID %#x and/or ACPI ID %#x beyond limit" - " - processor ignored\n", - processor->lapic_flags & ACPI_MADT_ENABLED ? - KERN_WARNING "WARNING: " : KERN_INFO, - processor->local_apic_id, processor->uid); + if (log) + printk("%sAPIC ID %#x and/or ACPI ID %#x beyond limit" + " - processor ignored\n", + processor->lapic_flags & ACPI_MADT_ENABLED + ? KERN_WARNING "WARNING: " : KERN_INFO, + processor->local_apic_id, processor->uid); /* * Must not return an error here, to prevent * acpi_table_parse_entries() from terminating early. @@ -132,7 +137,9 @@ acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) if (BAD_MADT_ENTRY(processor, end)) return -EINVAL; - acpi_table_print_madt_entry(header); + if ((processor->lapic_flags & ACPI_MADT_ENABLED) || + processor->id != 0xff || opt_cpu_info) + acpi_table_print_madt_entry(header); /* Record local apic id only when enabled */ if (processor->lapic_flags & ACPI_MADT_ENABLED) { -- 2.39.5