From nobody Sat Apr 20 20:48:40 2024 X-Original-To: freebsd-virtualization@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 4VMNsL70k7z5JR6R for ; Sat, 20 Apr 2024 20:48:54 +0000 (UTC) (envelope-from feurry@gmail.com) Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VMNsJ6Frwz4XCQ for ; Sat, 20 Apr 2024 20:48:52 +0000 (UTC) (envelope-from feurry@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=XNjw6Wnu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of feurry@gmail.com designates 2607:f8b0:4864:20::d36 as permitted sender) smtp.mailfrom=feurry@gmail.com Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-7da3ec3e044so104693239f.2 for ; Sat, 20 Apr 2024 13:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713646131; x=1714250931; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Kx4GJplSnLs3TqFQjuEqonxoTyJW82y7PpkF3Ab5eHQ=; b=XNjw6WnuSFDoPnBZVz2wDkflfPtG92RmQCP8bOAZn74B93b7FBKg/5V7jLcNKn80HB OX3IM+0i0Q/mzsUEjUq+HGavSU/KOPQJjA4jfa6zGpRjtZkbO9DPFpokrjndq6LYAmnc BKjAQuzxKr6XnN0Q9a+co4Ue2MK8ZUinyQV1tPVsQcgzYYd1G1bcd9vGv4xrfUIl08ST YZHfuO/1iJ/ZGRt3bHtv+xNsCLVMP/G62dtB45k0NbxJSQtN3grBJ94kauuhfbo/EX0W MpvvsGDcZY3/RCHa3nxssSzzRmMBFDtEnZcPpbsT1wJwbaBxQiRY15ycIFVd8ZnLND6L lNaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713646131; x=1714250931; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Kx4GJplSnLs3TqFQjuEqonxoTyJW82y7PpkF3Ab5eHQ=; b=PngyEUXzjavxZ9yRalaVfnU+BGcmmxHgcF10w8UfLTKTGVcPEZ90cFgtof1nRjje+9 89TrdwgB5wUsYMqeoMgLSej2MaLodiOxRZ2KxRL/PXOktvLO0VUJrtj+TuUpF09+veKN gs8m170++Z/JrSxEcQlsRJvtg0buZuhpyJOLp6LwC1OHZAq1DyDvD3bvXG+VR/umkv3L oShMcDL/tViNRpvzRNqvjNkb45KFMgT0U8Aw1Y3bX6FKgoBXCfOznC2jUleLbVyrN7cx Mxt48Ile4MNHC60S9GB7kx2xANDRLniiddViyxrXru1DCBm/TShs7AeyakHstJ+6v3l4 mU8Q== X-Gm-Message-State: AOJu0YzSsnkLZ/q+fhN4RazwzEZPWWZCuvMIO3VE/IqhvWV3s7Fcn+xo 74WCfdUP11sGgbjNrwezY18kXYguzTj8g2BFJjMjWu1TB3LD+Ai7AazSlkVxfOZTB6mWnYsbT6T X6qVTx86TRNHzzaDYQTfduff+rjCNZEg6 X-Google-Smtp-Source: AGHT+IG4iPowNu6gQa3hZMKRcr0FR/enWwD8pSxg6jDNslnE2wK5VlG76pN6bSykHLibxl71r1obJ4ZQtzDOoNMR9v4= X-Received: by 2002:a05:6602:3347:b0:7da:2150:6aaf with SMTP id c7-20020a056602334700b007da21506aafmr6737192ioz.15.1713646131013; Sat, 20 Apr 2024 13:48:51 -0700 (PDT) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Peter Miller Date: Sat, 20 Apr 2024 15:48:40 -0500 Message-ID: Subject: Re: pci passthrough Mediatek MT7922 doesn't work To: freebsd-virtualization@freebsd.org Cc: Bakul Shah Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(0.03)[0.031]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MLMMJ_DEST(0.00)[freebsd-virtualization@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d36:from] X-Rspamd-Queue-Id: 4VMNsJ6Frwz4XCQ doas sh -x /usr/share/examples/bhyve/vmrun.sh -p 1/0/0 -d FreeBSD-14.0-STABLE-amd64.raw vm0 Loading kernel... /boot/kernel/kernel text=0x17be70 text=0xd75798 text=0x4254ec data=0x180 data=0x1866b0+0x478950 0x8+0x1894e0+0x8+0x1acde2\ Loading configured modules... /etc/hostid size=0x25 /boot/entropy size=0x1000 + bhyve_exit=0 + [ 0 -ne 0 ] + nextslot=2 + devargs='' + i=0 + [ 0 -lt 1 ] + eval 'tapname=$tap_dev0' + tapname=tap0 + devargs=' -s 2:0,virtio-net,tap0 ' + nextslot=3 + i=1 + [ 1 -lt 1 ] + i=0 + [ 0 -lt 1 ] + eval 'disk=$disk_dev0' + disk=FreeBSD-14.0-STABLE-amd64.raw + eval 'opts=$disk_opts0' + opts='' + make_and_check_diskdev FreeBSD-14.0-STABLE-amd64.raw + local 'virtio_diskdev=FreeBSD-14.0-STABLE-amd64.raw' + [ ! -e FreeBSD-14.0-STABLE-amd64.raw ] + [ ! -r FreeBSD-14.0-STABLE-amd64.raw ] + [ ! -w FreeBSD-14.0-STABLE-amd64.raw ] + devargs=' -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,FreeBSD-14.0-STABLE-amd64.raw ' + nextslot=4 + i=1 + [ 1 -lt 1 ] + i=0 + [ 0 -lt 1 ] + eval 'pass=$pass_dev0' + pass=1/0/0 + echo 1/0/0 + grep '^[0-9]\+/[0-9]\+/[0-9]\+$' + bsfform=1/0/0 + [ -z 1/0/0 ] + bsf=1/0/0 + devargs=' -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,FreeBSD-14.0-STABLE-amd64.raw -s 4:0,passthru,1/0/0 ' + nextslot=5 + i=1 + [ 1 -lt 1 ] + efiargs='' + [ 0 -gt 0 ] + /usr/sbin/bhyve -c 2 -m 512M -H -A -P -S -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,FreeBSD-14.0-STABLE-amd64.raw -s 4:0,passthru,1/0/0 -l com1,stdio vm0 ---<>--- Copyright (c) 1992-2023 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 14.0-STABLE #0 stable/14-n267376-ca8e2e4c91cc: Thu Apr 18 05:55:35 UTC 2024 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 FreeBSD clang version 17.0.6 (https://github.com/llvm/llvm-project.git llvmorg-17.0.6-0-g6009708b4367) VT: init without driver. CPU: AMD Ryzen 5 7540U w/ Radeon(TM) 740M Graphics (3194.09-MHz K8-class CPU) Origin="AuthenticAMD" Id=0xa70f41 Family=0x19 Model=0x74 Stepping=1 Features=0x1783fbff Features2=0xfed83203 AMD Features=0x26500800 AMD Features2=0x444231fb Structured Extended Features=0xf01703a9 Structured Extended Features2=0x600 XSAVE Features=0x1 AMD Extended Feature Extensions ID EBX=0x7 TSC: P-state invariant Hypervisor: Origin = "bhyve bhyve " real memory = 536870912 (512 MB) avail memory = 482742272 (460 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs FreeBSD/SMP: 2 package(s) x 1 core(s) random: registering fast source Intel Secure Key RNG random: fast provider: "Intel Secure Key RNG" random: unblocking device. ioapic0 irqs 0-31 Launching APs: 1 random: entropy device external interface kbd1 at kbdmux0 smbios0: at iomem 0xf1000-0xf101e smbios0: Version: 2.6, BCD Revision: 2.6 aesni0: acpi0: acpi0: Power Button (fixed) atrtc0: port 0x70-0x71 irq 8 on acpi0 atrtc0: registered as a time-of-day clock, resolution 1.000000s Event timer "RTC" frequency 32768 Hz quality 0 attimer0: port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 16777216 Hz quality 950 Event timer "HPET" frequency 16777216 Hz quality 550 Event timer "HPET1" frequency 16777216 Hz quality 450 Event timer "HPET2" frequency 16777216 Hz quality 450 Event timer "HPET3" frequency 16777216 Hz quality 450 Event timer "HPET4" frequency 16777216 Hz quality 450 Event timer "HPET5" frequency 16777216 Hz quality 450 Event timer "HPET6" frequency 16777216 Hz quality 450 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 isab0: at device 1.0 on pci0 isa0: on isab0 virtio_pci0: port 0x2080-0x20bf mem 0xc0108000-0xc0109fff irq 16 at device 2.0 on pci0 vtnet0: on virtio_pci0 vtnet0: Ethernet address: 00:a0:98:f0:55:05 vtnet0: netmap queues/slots: TX 1/1024, RX 1/512 000.000148 [ 452] vtnet_netmap_attach vtnet attached txq=1, txd=1024 rxq=1, rxd=512 virtio_pci1: port 0x2000-0x207f mem 0xc010a000-0xc010bfff irq 17 at device 3.0 on pci0 vtblk0: on virtio_pci1 vtblk0: 6176MB (12649685 512 byte sectors) vmgenc0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] driver bug: Unable to set devclass (class: atkbdc devname: (unknown)) Unhandled ps2 mouse command 0xe1 psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] WARNING: Device "psm" is Giant locked and may be deleted before FreeBSD 15.0. psm0: model Generic PS/2 mouse, device ID 0 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: console (115200,n,8,1) uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0 uart2: <16550 or compatible> port 0x3e8-0x3ef irq 4 on acpi0 uart3: <16550 or compatible> port 0x2e8-0x2ef irq 3 on acpi0 vga0: at port 0x3b0-0x3bb iomem 0xb0000-0xb7fff pnpid PNP0900 on isa0 Timecounter "TSC-low" frequency 1596990008 Hz quality 1000 Timecounters tick every 10.000 msec usb_needs_explore_all: no devclass Trying to mount root from ufs:/dev/gpt/rootfs [rw]... Setting hostuuid: 60235bf5-9aa4-4048-a911-ef52282ae663. Setting hostid: 0x0e7c51ad. Starting file system checks: /dev/gpt/rootfs: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/gpt/rootfs: clean, 375808 free (16 frags, 46974 blocks, 0.0% fragmentation) /dev/gpt/efiesp: FILESYSTEM CLEAN; SKIPPING CHECKS Mounting local filesystems:. ELF ldconfig path: /lib /usr/lib /usr/lib/compat 32-bit compatibility ldconfig path: /usr/lib32 /usr/lib32 Setting hostname: freebsd. Setting up harvesting: PURE_VMGENID,PURE_RDRAND,[CALLOUT],[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,[NET_ETHER],NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED Feeding entropy: . lo0: link state changed to UP vtnet0: link state changed to UP Starting Network: lo0 vtnet0. lo0: flags=1008049 metric 0 mtu 16384 options=680003 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 groups: lo nd6 options=23 vtnet0: flags=1008843 metric 0 mtu 1500 options=80028 ether 00:a0:98:f0:55:05 inet6 fe80::2a0:98ff:fef0:5505%vtnet0 prefixlen 64 scopeid 0x1 media: Ethernet autoselect (10Gbase-T ) status: active nd6 options=23 Starting devd. Starting dhclient. DHCPDISCOVER on vtnet0 to 255.255.255.255 port 67 interval 8 DHCPDISCOVER on vtnet0 to 255.255.255.255 port 67 interval 18 DHCPDISCOVER on vtnet0 to 255.255.255.255 port 67 interval 21 DHCPDISCOVER on vtnet0 to 255.255.255.255 port 67 interval 14 No DHCPOFFERS received. No working leases in persistent database - sleeping. Waiting 30s for the default route interface: ............................. add host 127.0.0.1: gateway lo0 fib 0: route already in table add host ::1: gateway lo0 fib 0: route already in table add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 Updating /var/run/os-release done. Clearing /tmp (X related). Updating motd:. Creating and/or trimming log files. Starting syslogd. Mounting late filesystems:. Starting cron. Starting background file system checks in 60 seconds. Sat Apr 20 15:41:33 UTC 2024 FreeBSD/amd64 (freebsd) (ttyu0) login: