Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-10]: src/sys/arch/x86/x86 Pull up following revision(s) (requeste...



details:   https://anonhg.NetBSD.org/src/rev/d0bdc9ed426a
branches:  netbsd-10
changeset: 374069:d0bdc9ed426a
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Mar 30 11:43:17 2023 +0000

description:
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.

diffstat:

 sys/arch/x86/x86/mpacpi.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r ce8be71d1fc7 -r d0bdc9ed426a sys/arch/x86/x86/mpacpi.c
--- a/sys/arch/x86/x86/mpacpi.c Thu Mar 30 11:41:07 2023 +0000
+++ b/sys/arch/x86/x86/mpacpi.c Thu Mar 30 11:43:17 2023 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index