From nobody Thu Sep 05 02:38:16 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wzk7H2TgSz5WXW7; Thu, 05 Sep 2024 02:38:19 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wzk7G6Mz5z4hg8; Thu, 5 Sep 2024 02:38:18 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id lxDhsSDWZ9TOUm2O2scVtE; Thu, 05 Sep 2024 02:38:18 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id m2O0sjRBOGvSVm2O1sHHEt; Thu, 05 Sep 2024 02:38:18 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=FpSm/Hrq c=1 sm=1 tr=0 ts=66d9199a a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=0_lmrure0TmMD5iX:21 a=kj9zAlcOel0A:10 a=EaEq8P2WXUwA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=VxmjJ2MpAAAA:8 a=NEAV23lmAAAA:8 a=eWv-Ina5K8jpqD3U3YMA:9 a=yqttXw7gEnsO1n-h:21 a=CjuIK1q_8ugA:10 a=RVmHIydaz68A:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=7gXAzLPJhVmCkEl4_tsf:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 28B55423; Wed, 04 Sep 2024 19:38:16 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 22B72121; Wed, 04 Sep 2024 19:38:16 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 65b133e5d292 - main - x86: allow to have more than one kind of IOMMU In-reply-to: <20240905020602.4AF2711D@slippy.cwsent.com> References: <202409042150.484LoeAq031493@gitrepo.freebsd.org> <20240904235204.1FCD9C5@slippy.cwsent.com> <20240905010600.B9D292A@slippy.cwsent.com> <20240905020602.4AF2711D@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Wed, 04 Sep 2024 19:06:02 -0700." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 04 Sep 2024 19:38:16 -0700 Message-Id: <20240905023816.22B72121@slippy.cwsent.com> X-CMAE-Envelope: MS4xfNYoC/XrClBEpq2EX4wvr/Y7n0RMHBi+Gd1c0U8p+5XCCq9Q6H9Eq50VUM0+Zb15d0ScNhcwv931PBl6zPkP7s41QRWibgxzpPfxsTqWltrx+QYkzpoa vAWFcp+BA9I/IaWkijAO3sjfeeCu1ixtmkaTouYGpBtKppZOV+IEgBtl4qzCnyNLGJcwcKDdLUtIBn15ovFUEvXPzK4zzCkhD1pWiTaamyY5Vc8J7yhOlMLs ZDahLmiHZ119QEKZKxtnXizbM6ATwRCKEkDAz/nq+uA2qyJ3qNgd8G86FQD5IgKz39H41x/lbbtXLzq4XrDOHTOhYYMTIO12q8OA07JPVFY= X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4Wzk7G6Mz5z4hg8 Looks like we have success. I removed /usr/obj/sys and rebuilt the kernel from scratch. How did I arrive at this? Both backtraces included: ??() at 0/frame 0xffffffff81f088e0 acpi_pci_get_dma_tag() at acpi_pci_get_dma_tag+0x34/frame 0xffffffff81f08900 "??()" had to be line 447 in acpi_pci.c: tag = iommu_get_dma_tag(bus, child); Some more background: Originally the buildworld/buildkernel was performed on my main build server (cwsys). The initial build and subsequent builds were performed on that machine. During my latter tests I was building the kernel on my laptop (slippy). Both builds exhibited the same problem, ruling out some local-only "thing" on that machine only. The problem affected my AMD machines however my laptop, Intel i7, had no such problems. I will deploy this on all my machines downstairs. The risk being that I may send out an email retracting all this if it fails to boot a second time. But I'm willing to take that risk (looking stupid) to avoid you spending more time at this. I will test this on my i5 laptop tomorrow morning. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 In message <20240905020602.4AF2711D@slippy.cwsent.com>, Cy Schubert writes: > Both machines still panic. > > First machine panics on ohci(4) attach while the second at re(4) attach in > acpi_pci_get_dma_tag(). > > First machine: > > Copyright (c) 1992-2024 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 15.0-CURRENT #61 komquats-n272062-79eba754bec3: Wed Sep 4 17:46:55 P > DT 2024 > root@slippy:/export/obj/opt/src/git-src/amd64.amd64/sys/BREAK amd64 > FreeBSD clang version 18.1.6 (https://github.com/llvm/llvm-project.git llvmor > g-18.1.6-0-g1118c2e05e67) > VT(vga): text 80x25 > CPU: AMD Phenom(tm) II X4 945 Processor (3013.95-MHz K8-class CPU) > Origin="AuthenticAMD" Id=0x100f43 Family=0x10 Model=0x4 Stepping=3 > Features=0x178bfbff A,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT> > Features2=0x802009 > AMD Features=0xee500800 ow!> > AMD Features2=0x37ff BS,SKINIT,WDT> > SVM: NP,NRIP,NAsids=64 > TSC: P-state invariant > real memory = 8589934592 (8192 MB) > avail memory = 8264794112 (7881 MB) > Event timer "LAPIC" quality 100 > ACPI APIC Table: > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > FreeBSD/SMP: 1 package(s) x 4 core(s) > random: unblocking device. > Firmware Warning (ACPI): 32/64X length mismatch in FADT/Pm1aEventBlock: 32/8 > (20230628/tbfadt-748) > Firmware Warning (ACPI): 32/64X length mismatch in FADT/Pm1aControlBlock: 16/ > 8 (20230628/tbfadt-748) > Firmware Warning (ACPI): 32/64X length mismatch in FADT/PmTimerBlock: 32/8 (2 > 0230628/tbfadt-748) > Firmware Warning (ACPI): 32/64X length mismatch in FADT/Gpe0Block: 64/8 (2023 > 0628/tbfadt-748) > Firmware Warning (ACPI): 32/64X length mismatch in FADT/Gpe1Block: 128/8 (202 > 30628/tbfadt-748) > Firmware Warning (ACPI): Invalid length for FADT/Pm1aEventBlock: 8, using def > ault 32 (20230628/tbfadt-850) > Firmware Warning (ACPI): Invalid length for FADT/Pm1aControlBlock: 8, using d > efault 16 (20230628/tbfadt-850) > Firmware Warning (ACPI): Invalid length for FADT/PmTimerBlock: 8, using defau > lt 32 (20230628/tbfadt-850) > ioapic0: MADT APIC ID 4 != hw id 0 > ioapic0 irqs 0-23 > Launching APs: 1 2 3 > random: entropy device external interface > kbd1 at kbdmux0 > vtvga0: > aesni0: No AES or SHA support. > acpi0: > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > \_PR_.CPU0 (20230628/dspkginit-605) > acpi0: Power Button (fixed) > cpu0: on acpi0 > attimer0: port 0x40-0x43 on acpi0 > Timecounter "i8254" frequency 1193182 Hz quality 0 > Event timer "i8254" frequency 1193182 Hz quality 100 > hpet0: iomem 0xfefff000-0xfefff3ff irq 0,8 on ac > pi0 > Timecounter "HPET" frequency 25000000 Hz quality 950 > atrtc0: port 0x70-0x73 on acpi0 > atrtc0: registered as a time-of-day clock, resolution 1.000000s > Event timer "RTC" frequency 32768 Hz quality 0 > Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 > acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 > acpi_button0: on acpi0 > pcib0: port 0xcf8-0xcff on acpi0 > pci0: on pcib0 > pci0: at device 0.0 (no driver attached) > isab0: at device 1.0 on pci0 > isa0: on isab0 > ohci0: mem 0xfe02f000-0xfe02ffff irq 21 > at device 2.0 on pci0 > > > Fatal trap 12: page fault while in kernel mode > cpuid = 2; apic id = 02 > fault virtual address = 0x0 > fault code = supervisor read instruction, page not present > instruction pointer = 0x20:0x0 > stack pointer = 0x28:0xffffffff81f2caa8 > frame pointer = 0x28:0xffffffff81f2cac0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 0 (swapper) > rdi: fffff80005808500 rsi: 0000000000000000 rdx: ffffffff80e54eb8 > rcx: ffffffff80e54eb8 r8: 0000001473a90040 r9: ffffffff810f5ce0 > rax: 0000000000000000 rbx: fffff80005808500 rbp: ffffffff81f2cac0 > r10: ffffffff81f2c9f0 r11: fffffffffffffff5 r12: fffffe00113fc320 > r13: fffff800057ec0a0 r14: fffff80005808800 r15: fffff80005808800 > trap number = 12 > panic: page fault > cpuid = 2 > time = 1 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff81f2c79 > 0 > vpanic() at vpanic+0x13f/frame 0xffffffff81f2c8c0 > panic() at panic+0x43/frame 0xffffffff81f2c920 > trap_fatal() at trap_fatal+0x40b/frame 0xffffffff81f2c980 > trap_pfault() at trap_pfault+0x46/frame 0xffffffff81f2c9d0 > calltrap() at calltrap+0x8/frame 0xffffffff81f2c9d0 > --- trap 0xc, rip = 0, rsp = 0xffffffff81f2caa8, rbp = 0xffffffff81f2cac0 --- > ??() at 0/frame 0xffffffff81f2cac0 > acpi_pci_get_dma_tag() at acpi_pci_get_dma_tag+0x34/frame 0xffffffff81f2cae0 > ohci_pci_attach() at ohci_pci_attach+0x4f/frame 0xffffffff81f2cb30 > device_attach() at device_attach+0x3ac/frame 0xffffffff81f2cb80 > bus_generic_attach() at bus_generic_attach+0x4b/frame 0xffffffff81f2cbb0 > pci_attach() at pci_attach+0xc7/frame 0xffffffff81f2cbe0 > acpi_pci_attach() at acpi_pci_attach+0x15/frame 0xffffffff81f2cc20 > device_attach() at device_attach+0x3ac/frame 0xffffffff81f2cc70 > bus_generic_attach() at bus_generic_attach+0x4b/frame 0xffffffff81f2cca0 > acpi_pcib_acpi_attach() at acpi_pcib_acpi_attach+0x424/frame 0xffffffff81f2cd > 00 > device_attach() at device_attach+0x3ac/frame 0xffffffff81f2cd50 > bus_generic_attach() at bus_generic_attach+0x4b/frame 0xffffffff81f2cd80 > acpi_probe_children() at acpi_probe_children+0x6f/frame 0xffffffff81f2cde0 > acpi_attach() at acpi_attach+0x9dc/frame 0xffffffff81f2ce70 > device_attach() at device_attach+0x3ac/frame 0xffffffff81f2cec0 > bus_generic_attach() at bus_generic_attach+0x4b/frame 0xffffffff81f2cef0 > device_attach() at device_attach+0x3ac/frame 0xffffffff81f2cf40 > bus_generic_new_pass() at bus_generic_new_pass+0x127/frame 0xffffffff81f2cf70 > root_bus_configure() at root_bus_configure+0x26/frame 0xffffffff81f2cf90 > configure() at configure+0x9/frame 0xffffffff81f2cfa0 > mi_startup() at mi_startup+0x1c8/frame 0xffffffff81f2cff0 > Uptime: 1s > Automatic reboot in 15 seconds - press a key on the console to abort > --> Press a key on the console to reboot, > --> or switch off the system now. > acpi0: reset failed - timeout > Rebooting... > cpu_reset: Restarting BSP > cpu_reset_proxy: Stopped CPU 2 > > > Second machine: > > Copyright (c) 1992-2024 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 15.0-CURRENT #61 komquats-n272062-79eba754bec3: Wed Sep 4 17:46:55 P > DT 2024 > root@slippy:/export/obj/opt/src/git-src/amd64.amd64/sys/BREAK amd64 > FreeBSD clang version 18.1.6 (https://github.com/llvm/llvm-project.git llvmor > g-18.1.6-0-g1118c2e05e67) > VT(vga): text 80x25 > CPU: AMD Processor model unknown (3000.02-MHz K8-class CPU) > Origin="AuthenticAMD" Id=0x100f43 Family=0x10 Model=0x4 Stepping=3 > Features=0x178bfbff A,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT> > Features2=0x802009 > AMD Features=0xee500800 ow!> > AMD Features2=0x37ff BS,SKINIT,WDT> > SVM: NP,NRIP,NAsids=64 > TSC: P-state invariant > real memory = 8589934592 (8192 MB) > avail memory = 8145883136 (7768 MB) > Event timer "LAPIC" quality 100 > ACPI APIC Table: > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > FreeBSD/SMP: 1 package(s) x 4 core(s) > random: unblocking device. > Firmware Warning (ACPI): 32/64X length mismatch in FADT/Pm1aEventBlock: 32/8 > (20230628/tbfadt-748) > Firmware Warning (ACPI): 32/64X length mismatch in FADT/Pm1aControlBlock: 16/ > 8 (20230628/tbfadt-748) > Firmware Warning (ACPI): 32/64X length mismatch in FADT/PmTimerBlock: 32/8 (2 > 0230628/tbfadt-748) > Firmware Warning (ACPI): 32/64X length mismatch in FADT/Gpe0Block: 64/8 (2023 > 0628/tbfadt-748) > Firmware Warning (ACPI): Invalid length for FADT/Pm1aEventBlock: 8, using def > ault 32 (20230628/tbfadt-850) > Firmware Warning (ACPI): Invalid length for FADT/Pm1aControlBlock: 8, using d > efault 16 (20230628/tbfadt-850) > Firmware Warning (ACPI): Invalid length for FADT/PmTimerBlock: 8, using defau > lt 32 (20230628/tbfadt-850) > ioapic0: MADT APIC ID 4 != hw id 0 > ioapic0 irqs 0-23 > Launching APs: 1 3 2 > random: entropy device external interface > vtvga0: > aesni0: No AES or SHA support. > acpi0: > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKC (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKD (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKA (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKB (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKD (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKA (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKB (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKC (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKA (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKB (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKC (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKD (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKB (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKC (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKD (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKA (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKC (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKD (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKA (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKB (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKD (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKA (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKB (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKC (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKA (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKB (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKC (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > LNKD (20230628/dspkginit-605) > ACPI Error: AE_NOT_FOUND, While resolving a named reference package element - > \_PR_.CPU0 (20230628/dspkginit-605) > acpi0: Power Button (fixed) > cpu0: on acpi0 > attimer0: port 0x40-0x43 on acpi0 > Timecounter "i8254" frequency 1193182 Hz quality 0 > Event timer "i8254" frequency 1193182 Hz quality 100 > hpet0: iomem 0xfed00000-0xfed003ff irq 0,8 on ac > pi0 > device_attach: hpet0 attach returned 12 > atrtc0: port 0x70-0x73 on acpi0 > atrtc0: registered as a time-of-day clock, resolution 1.000000s > Event timer "RTC" frequency 32768 Hz quality 0 > Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 > acpi_timer0: <32-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 > acpi_button0: on acpi0 > pcib0: port 0xcf8-0xcff on acpi0 > pci0: on pcib0 > pcib1: at device 1.0 on pci0 > pci1: on pcib1 > vgapci0: port 0xcc00-0xccff mem 0xf0000000-0xf7fffff > f,0xfdbf0000-0xfdbfffff,0xfda00000-0xfdafffff irq 18 at device 5.0 on pci1 > vgapci0: Boot video device > pcib2: at device 7.0 on pci0 > pci2: on pcib2 > re0: port 0xdc00- > 0xdcff mem 0xfdfff000-0xfdffffff irq 19 at device 0.0 on pci2 > re0: Using 1 MSI message > re0: Chip rev. 0x38000000 > re0: MAC rev. 0x00000000 > > > Fatal trap 12: page fault while in kernel mode > cpuid = 2; apic id = 02 > fault virtual address = 0x0 > fault code = supervisor read instruction, page not present > instruction pointer = 0x20:0x0 > stack pointer = 0x28:0xffffffff81f088c8 > frame pointer = 0x28:0xffffffff81f088e0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 0 (swapper) > rdi: fffff800057d4d00 rsi: 0000000000000000 rdx: 000000000000004a > rcx: fffff80005704000 r8: 0000001670cdcfc6 r9: ffffffff810f5ce0 > rax: 0000000000000000 rbx: fffff800057d4d00 rbp: ffffffff81f088e0 > r10: ffffffff81f08860 r11: fffffffffffffff5 r12: 0000000038000000 > r13: ffffffffffffffff r14: fffff800057d4e00 r15: 0000000000000100 > trap number = 12 > panic: page fault > cpuid = 2 > time = 1 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff81f085b > 0 > vpanic() at vpanic+0x13f/frame 0xffffffff81f086e0 > panic() at panic+0x43/frame 0xffffffff81f08740 > trap_fatal() at trap_fatal+0x40b/frame 0xffffffff81f087a0 > trap_pfault() at trap_pfault+0x46/frame 0xffffffff81f087f0 > calltrap() at calltrap+0x8/frame 0xffffffff81f087f0 > --- trap 0xc, rip = 0, rsp = 0xffffffff81f088c8, rbp = 0xffffffff81f088e0 --- > ??() at 0/frame 0xffffffff81f088e0 > acpi_pci_get_dma_tag() at acpi_pci_get_dma_tag+0x34/frame 0xffffffff81f08900 > re_attach() at re_attach+0x100b/frame 0xffffffff81f08990 > device_attach() at device_attach+0x3ac/frame 0xffffffff81f089e0 > bus_generic_attach() at bus_generic_attach+0x4b/frame 0xffffffff81f08a10 > pci_attach() at pci_attach+0xc7/frame 0xffffffff81f08a40 > acpi_pci_attach() at acpi_pci_attach+0x15/frame 0xffffffff81f08a80 > device_attach() at device_attach+0x3ac/frame 0xffffffff81f08ad0 > bus_generic_attach() at bus_generic_attach+0x4b/frame 0xffffffff81f08b00 > acpi_pcib_pci_attach() at acpi_pcib_pci_attach+0x95/frame 0xffffffff81f08b30 > device_attach() at device_attach+0x3ac/frame 0xffffffff81f08b80 > bus_generic_attach() at bus_generic_attach+0x4b/frame 0xffffffff81f08bb0 > pci_attach() at pci_attach+0xc7/frame 0xffffffff81f08be0 > acpi_pci_attach() at acpi_pci_attach+0x15/frame 0xffffffff81f08c20 > device_attach() at device_attach+0x3ac/frame 0xffffffff81f08c70 > bus_generic_attach() at bus_generic_attach+0x4b/frame 0xffffffff81f08ca0 > acpi_pcib_acpi_attach() at acpi_pcib_acpi_attach+0x424/frame 0xffffffff81f08d > 00 > device_attach() at device_attach+0x3ac/frame 0xffffffff81f08d50 > bus_generic_attach() at bus_generic_attach+0x4b/frame 0xffffffff81f08d80 > acpi_probe_children() at acpi_probe_children+0x6f/frame 0xffffffff81f08de0 > acpi_attach() at acpi_attach+0x9dc/frame 0xffffffff81f08e70 > device_attach() at device_attach+0x3ac/frame 0xffffffff81f08ec0 > bus_generic_attach() at bus_generic_attach+0x4b/frame 0xffffffff81f08ef0 > device_attach() at device_attach+0x3ac/frame 0xffffffff81f08f40 > bus_generic_new_pass() at bus_generic_new_pass+0x127/frame 0xffffffff81f08f70 > root_bus_configure() at root_bus_configure+0x26/frame 0xffffffff81f08f90 > configure() at configure+0x9/frame 0xffffffff81f08fa0 > mi_startup() at mi_startup+0x1c8/frame 0xffffffff81f08ff0 > Uptime: 1s > Automatic reboot in 15 seconds - press a key on the console to abort > --> Press a key on the console to reboot, > --> or switch off the system now. > Rebooting... > cpu_reset: Restarting BSP > cpu_reset_proxy: Stopped CPU 2 > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=0 > > > In message , Konstantin Belousov writes: > > On Wed, Sep 04, 2024 at 06:06:00PM -0700, Cy Schubert wrote: > > > ??() at 0/frame 0xffffffff81f058e0 > > > acpi_pci_get_dma_tag() at acpi_pci_get_dma_tag+0x34/frame 0xffffffff81f05 > 90 > > 0 > > > > One more method is needed. Updated patch is below. > > > > commit 99e3d96fc1a2b1d5cac5a635608ec3044ec4fa13 > > Author: Konstantin Belousov > > Date: Thu Sep 5 03:33:34 2024 +0300 > > > > x86: always provide dummy x86_iommu virtual methods > > > > to make configurations where vendor-specific IOMMU not yet implemented > > but IOMMU is enabled in config, work when calling into MSI/IOAPIC > > interrupt remapping. > > > > Reported by: cy > > Sponsored by: Advanced Micro Devices (AMD) > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > > > diff --git a/sys/x86/iommu/iommu_utils.c b/sys/x86/iommu/iommu_utils.c > > index 2c647fd21c67..2011c632f770 100644 > > --- a/sys/x86/iommu/iommu_utils.c > > +++ b/sys/x86/iommu/iommu_utils.c > > @@ -190,12 +190,60 @@ SYSCTL_INT(_hw_iommu, OID_AUTO, batch_coalesce, CTLFL > AG > > _RWTUN, > > &iommu_qi_batch_coalesce, 0, > > "Number of qi batches between interrupt"); > > > > -static struct x86_iommu *x86_iommu; > > +static struct iommu_unit * > > +x86_no_iommu_find(device_t dev, bool verbose) > > +{ > > + return (NULL); > > +} > > + > > +static int > > +x86_no_iommu_alloc_msi_intr(device_t src, u_int *cookies, u_int count) > > +{ > > + return (EOPNOTSUPP); > > +} > > + > > +static int > > +x86_no_iommu_map_msi_intr(device_t src, u_int cpu, u_int vector, > > + u_int cookie, uint64_t *addr, uint32_t *data) > > +{ > > + return (EOPNOTSUPP); > > +} > > + > > +static int > > +x86_no_iommu_unmap_msi_intr(device_t src, u_int cookie) > > +{ > > + return (0); > > +} > > + > > +static int > > +x86_no_iommu_map_ioapic_intr(u_int ioapic_id, u_int cpu, u_int vector, > > + bool edge, bool activehi, int irq, u_int *cookie, uint32_t *hi, > > + uint32_t *lo) > > +{ > > + return (EOPNOTSUPP); > > +} > > + > > +static int > > +x86_no_iommu_unmap_ioapic_intr(u_int ioapic_id, u_int *cookie) > > +{ > > + return (0); > > +} > > + > > +static struct x86_iommu x86_no_iommu = { > > + .find = x86_no_iommu_find, > > + .alloc_msi_intr = x86_no_iommu_alloc_msi_intr, > > + .map_msi_intr = x86_no_iommu_map_msi_intr, > > + .unmap_msi_intr = x86_no_iommu_unmap_msi_intr, > > + .map_ioapic_intr = x86_no_iommu_map_ioapic_intr, > > + .unmap_ioapic_intr = x86_no_iommu_unmap_ioapic_intr, > > +}; > > + > > +static struct x86_iommu *x86_iommu = &x86_no_iommu; > > > > void > > set_x86_iommu(struct x86_iommu *x) > > { > > - MPASS(x86_iommu == NULL); > > + MPASS(x86_iommu == &x86_no_iommu); > > x86_iommu = x; > > } > >