From nobody Thu Apr 25 03:31:22 2024 X-Original-To: freebsd-arm@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 4VQ1bw4X98z5JmGc for ; Thu, 25 Apr 2024 03:31:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQ1bw2hJYz4HvP for ; Thu, 25 Apr 2024 03:31:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714015884; a=rsa-sha256; cv=none; b=TnZyNyQt/YeW/IfwaF94iXj7VLWfI+zuzhvAb4tFDujuiWParEgn5CO9GzDgR3T2fAMvHh QIZu4kh5lIW9WCVBGNQMMTlyJ62JKAaBwtDNWGbumpmOeWzh6026Sl3vuxYuIARSohGRAm dnmzlDRsBDqyMFgea/chbTFhCUHg1ykpClvluWNDdMhnSsEGmoK9p8zl89sYt+BWBaEeae q4usdVOzL+9IxMP1A8xG0P4mDchL6BZZIvAC1DDZencgeObPJeP+edxCDifWwhYW3MFYBR fd0BEbW0S9JNPGw/IbXjRiLgUkvhj/S115EaBtWEpkfxMfB7R7HLrSEoPgMnpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714015884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8WR+tO6JFIdzOFFJAx4iIjEGHg5sMSCQ+pBFjJz/2po=; b=CwkLYShedaLM87FvSwV+vKIqjsaAFRe4/fnk/fx+/po553+SpQLYtPzkgcMk+6p467NbCr rNyeQzIiCl8sRqBzPOJOIhRvwUTCzc6+3pbhWHUHioq86H6Lv1hdMwC/FWtnvl8MAHUR85 QcfDwc3Yu3HrEv55DNq6uK8KnxsqXeKpOzfKqCPga0gqk/GZtXamdcrewKusKnbMoKhVR4 HuaRL4wXNNBKpMbve02J2gUj6rVlQu3/vmWianxAP4SUq6rrzfn1OH0H0zaV5EeiG33D+F oxmUnRoWlZ79uQvwzQ6aUFCczS/htRazbkfL9yabTHud1T5inPQxEbY/sYWz0A== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VQ1bw2HxKzjY6 for ; Thu, 25 Apr 2024 03:31:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 43P3VOSv043312 for ; Thu, 25 Apr 2024 03:31:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43P3VOl8043271 for freebsd-arm@FreeBSD.org; Thu, 25 Apr 2024 03:31:24 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 278573] arm64: virtio-net-pci not work on qemu pcie.1 with gicv3 and its=on Date: Thu, 25 Apr 2024 03:31:22 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 14.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: none@tmpfs.dev X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278573 Bug ID: 278573 Summary: arm64: virtio-net-pci not work on qemu pcie.1 with gicv3 and its=3Don Product: Base System Version: 14.0-STABLE Hardware: arm64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: none@tmpfs.dev Created attachment 250217 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D250217&action= =3Dedit pciconf -lv outout The virtio-net-pci network interface (eg. vtnet1) placed on not-root pcie b= us is unusable on arm64 FreeBSD as a qemu guest with virt platform, gic-versio= n=3D3 and its=3Don. There are 3 requirements to produce this bug. 1. The GIC version must be 3, "gic-version=3D3"; (vtnet works fine with gic-version=3D2) 2. The ITS must be on, "its=3Don"; (vtnet works fine with its=3Doff). 3. The virtio-net-pci must be placed on a QEMU PCI-PCI bridge instead of the pcie.0 HOST-PCI root bus. virtio-net-pci works fine when it is placed at virtio_pci1@pci0:0:4:0 but it becomes unusable on virtio_pci2@pci0:1:5:0. This is an example command to produce this bug. sudo qemu-system-aarch64 \ -m 1024 \ -nographic \ -drive if=3Dpflash,format=3Draw,file=3Defi.img,readonly=3Don \ -drive if=3Dpflash,format=3Draw,file=3Dvarstore.img \ -device pci-bridge,id=3Dpcie.1,chassis_nr=3D1,bus=3Dpcie.0,addr=3D0xa \ -device qemu-xhci,id=3Dqemu-xhci,bus=3Dpcie.0,addr=3D3 \ -drive if=3Dnone,format=3Dqcow2,file=3DFreeBSD-14.0-RELEASE-arm64-aarch64.qcow2,id= =3Dhd0 \ -device virtio-blk-pci,bus=3Dpcie.0,addr=3D2,drive=3Dhd0 \ -netdev type=3Dtap,id=3Dnet0,ifname=3Dtap0,script=3Dno,downscript=3Dno \ -device virtio-net-pci,mac=3D02:01:07:00:00:10,netdev=3Dnet0,bus=3Dpcie.0,addr=3D4,= id=3Dnet0 \ -netdev type=3Dtap,id=3Dnet1,ifname=3Dtap1,script=3Dno,downscript=3Dno \ -device virtio-net-pci,mac=3D02:01:07:00:00:11,netdev=3Dnet1,bus=3Dpcie.1,addr=3D5,= id=3Dnet1 \ -cpu max -M virt,gic-version=3D3,its=3Don To use KVM, replace `-cpu max -M virt,gic-version=3D3,its=3Don` with `-cpu = host -M virt,gic-version=3D3,accel=3Dkvm,its=3Don`. KVM does not affect the result = (make sure your host is GICv3). Manually set up tap0 and tap1 and add them to a host bridge br0. (host) ifconfig br0 192.168.3.1/24 (vm) ifconfig vtnet0 up (vm) ifconfig vtnet0 192.168.3.10/24 (vm) ifconfig vtnet1 up (vm) ifconfig vtnet1 192.168.3.11/24 Actual result: There will be two network interfaces vtnet0 and vtnet1. vtnet0 on virtio_pci1@pci0:0:4:0 works fine, but vtnet1 on virtio_pci2@pci0:1:5:0 is usable. You can ping 192.168.3.10 and get replies, but ping 192.168.3.11 ge= ts no reply. This bug is reproducible on the following FreeBSD images: - FreeBSD-13.2-RELEASE-arm64-aarch64.qcow2 - FreeBSD-14.0-RELEASE-arm64-aarch64.qcow2 - FreeBSD-15.0-CURRENT-arm64-aarch64-20240404-112783ebbc31-269103-disc1.iso With the exactly same qemu configuration (except system image, of course), = all two network adapters works fine in Linux guest: Linux debian 6.1.0-20-arm64= #1 SMP Debian 6.1.85-1 (2024-04-11) aarch64 GNU/Linux. I have tested on the two host platforms: - qemu-system-aarch64 QEMU emulator version 8.2.2 on Linux ArchLinux 6.8.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 17 Apr 2024 15:20:28 +0000 x86_64 GNU/Linux - qemu-system-aarch64 QEMU emulator version 8.1.5 (pve-qemu-kvm_8.1.5-4) on Linux armbian 6.6.16-current-rockchip64 #1 SMP PREEMPT Fri Feb 23 08:25:28 = UTC 2024 aarch64 GNU/Linux About efi.img and varstore.img: efi image is from qemu-efi-aarch64_2024.02-2_all.deb (you can get it from https://packages.debian.org/sid/all/qemu-efi-aarch64/download), and expand = it to 64M, according to https://ubuntu.com/server/docs/boot-arm64-virtual-machines-on-qemu. varstore.img is 64M of zeros. The descriptions of "gic-version=3D3" and "its=3Don" are available at https://qemu-project.gitlab.io/qemu/system/arm/virt.html. --=20 You are receiving this mail because: You are the assignee for the bug.=