Module Name: src Committed By: martin Date: Thu Mar 30 11:43:18 UTC 2023
Modified Files: src/sys/arch/x86/x86 [netbsd-10]: mpacpi.c Log Message: Pull up following revision(s) (requested by bouyer in ticket #130): sys/arch/x86/x86/mpacpi.c: revision 1.110 mpacpi_config_cpu(): Xen with a PVH dom0 reports x2apic->LocalApicId below 0xff, which causes a panic later because no CPUs are attached. Accept the bogus LocalApicId value for VM_GUEST_XENPVH. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.109.4.1 src/sys/arch/x86/x86/mpacpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/x86/mpacpi.c diff -u src/sys/arch/x86/x86/mpacpi.c:1.109 src/sys/arch/x86/x86/mpacpi.c:1.109.4.1 --- src/sys/arch/x86/x86/mpacpi.c:1.109 Sat Jan 22 11:49:17 2022 +++ src/sys/arch/x86/x86/mpacpi.c Thu Mar 30 11:43:17 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: mpacpi.c,v 1.109 2022/01/22 11:49:17 thorpej Exp $ */ +/* $NetBSD: mpacpi.c,v 1.109.4.1 2023/03/30 11:43:17 martin Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.109 2022/01/22 11:49:17 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.109.4.1 2023/03/30 11:43:17 martin Exp $"); #include "acpica.h" #include "opt_acpi.h" @@ -396,8 +396,9 @@ mpacpi_config_cpu(ACPI_SUBTABLE_HEADER * /* ACPI spec: "Logical processors with APIC ID values * less than 255 must use the Processor Local APIC * structure to convey their APIC information to OSPM." + * But Xen with PVH dom0 breaks this ACPI spec. */ - if (x2apic->LocalApicId <= 0xff) { + if (x2apic->LocalApicId <= 0xff && vm_guest != VM_GUEST_XENPVH) { printf("bogus MADT X2APIC entry (id = 0x%"PRIx32")\n", x2apic->LocalApicId); break;