From owner-freebsd-virtualization@freebsd.org Sat Aug 17 14:25:29 2019 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FC0CC8B98 for ; Sat, 17 Aug 2019 14:25:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 469jCF3qF1z4QPf for ; Sat, 17 Aug 2019 14:25:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 83125C8B97; Sat, 17 Aug 2019 14:25:29 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82D4FC8B96 for ; Sat, 17 Aug 2019 14:25:29 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 469jCF2vlFz4QPd for ; Sat, 17 Aug 2019 14:25:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45CBC1AFF3 for ; Sat, 17 Aug 2019 14:25:29 +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 x7HEPT4p049558 for ; Sat, 17 Aug 2019 14:25:29 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x7HEPTkj049557 for virtualization@FreeBSD.org; Sat, 17 Aug 2019 14:25:29 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: virtualization@FreeBSD.org Subject: [Bug 222996] FreeBSD 11.1-12 on Hyper-V with PCI Express Pass Through Date: Sat, 17 Aug 2019 14:25:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 12.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: michael.adm@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Aug 2019 14:25:29 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222996 --- Comment #23 from Michael --- Passthrough Intel X710 in Windows 2019 Gen2 Hyper-V guest Freebsd-CURRENT works, but not as we would like. Action roadmap: 1. disable the necessary adapter in the Device Manager 2. Add adapter to R03 VM $MyEth =3D Get-PnpDevice -PresentOnly | Where-Object {$_.Class -eq "Net"} | Where-Object {$_.Status -eq "Error"} $DataOfNetToDDismount =3D Get-PnpDeviceProperty DEVPKEY_Device_LocationPaths -InstanceId $MyEth[0].InstanceId $locationpath =3D ($DataOfNetToDDismount).data[0] Dismount-VmHostAssignableDevice -locationpath $locationpath -force Get-VMHostAssignableDevice Add-VMAssignableDevice -LocationPath $locationpath -VMName R03 R03 dmesg: pcib0: on vmbus0 pci0: on pcib0 ixl0: at device 0.0 on pci0 ixl0: fw 5.40.47690 api 1.5 nvm 5.40 etid 80002d35 oem 1.264.0 ixl0: PF-ID[1]: VFs 64, MSI-X 129, VF MSI-X 5, QPs 768, I2C ixl0: Using 1024 TX descriptors and 1024 RX descriptors ixl0: queue equality override not set, capping rx_queues at 4 and tx_queues= at 4 ixl0: Using 4 RX queues 4 TX queues ixl0: Using MSI-X interrupts with 5 vectors ixl0: Ethernet address: 3c:fd:fe:21:02:e2 ixl0: Allocating 4 queues for PF LAN VSI; 4 queues active ixl0: PCI Express Bus: Speed 8.0GT/s Width x8 ixl0: Failed to initialize SR-IOV (error=3D2) ixl0: netmap queues/slots: TX 4/1024, RX 4/1024 ixl0: Link is up, 10 Gbps Full Duplex, Requested FEC: None, Negotiated FEC: None, Autoneg: False, Flow Control: Full ixl0: link state changed to UP 3. Add vlan to ixl0 root@r03:~ # ifconfig vlan48 create root@r03:~ # ifconfig vlan48 vlan 48 vlandev ixl0 root@r03:~ # ifconfig vlan48 inet 10.10.221.51/24 root@r03:~ # ping 10.10.221.1 PING 10.10.221.1 (10.10.221.1): 56 data bytes ping: sendto: Network is down ping: sendto: Network is down ^C --- 10.10.221.1 ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss root@r03:~ # ifconfig ixl0 up root@r03:~ # ping 10.10.221.1 PING 10.10.221.1 (10.10.221.1): 56 data bytes 64 bytes from 10.10.221.1: icmp_seq=3D0 ttl=3D64 time=3D0.965 ms 64 bytes from 10.10.221.1: icmp_seq=3D1 ttl=3D64 time=3D0.381 ms 64 bytes from 10.10.221.1: icmp_seq=3D2 ttl=3D64 time=3D0.526 ms ^C --- 10.10.221.1 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev =3D 0.381/0.624/0.965/0.248 ms 4. Remove X710 adapter from R03 VM for "neutered" live migration $locationpath =3D (Get-VmHostAssignableDevice).LocationPath Remove-VMAssignableDevice -LocationPath $locationpath -VMName R03 Mount-VmHostAssignableDevice -locationpath $locationpath R03 dmesg: ixl0: Vlan in use, detach first ixl0: Vlan in use, detach first pcib0: detached ixl0: Vlan in use, detach first 5. Adding again the adapter to the migrated R03 VM (#1 and #2) root@r03:~ # ifconfig ... ixl0: flags=3D8843 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3De507bb ether 3c:fd:fe:21:02:e2 media: Ethernet autoselect (10GBase-AOC ) status: active nd6 options=3D29 vlan48: flags=3D8843 metric 0 mtu 1= 500 options=3D600703 ether 3c:fd:fe:21:02:e2 inet 10.10.221.51 netmask 0xffffff00 broadcast 10.10.221.255 groups: vlan vlan: 48 vlanpcp: 0 parent interface: ixl0 media: Ethernet autoselect (10GBase-AOC ) status: active nd6 options=3D29 ixl1: flags=3D8802 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3De507bb ether 3c:fd:fe:21:02:e2 media: Ethernet autoselect (10GBase-AOC ) status: active nd6 options=3D29 root@r03:~ # ping 10.10.221.1 PING 10.10.221.1 (10.10.221.1): 56 data bytes ^C --- 10.10.221.1 ping statistics --- 5 packets transmitted, 0 packets received, 100.0% packet loss How to make the adapter return to its place, rather than "double" in ixl1. = Live migration is one of the cornerstones of virtualization. And what threatens, for normal functioning, an error message: ixl0: Failed to initialize SR-IOV (error=3D2) --=20 You are receiving this mail because: You are the assignee for the bug.=