From nobody Fri Jun 03 21:51:50 2022 X-Original-To: freebsd-xen@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 799591BE4FF8 for ; Fri, 3 Jun 2022 21:52:03 +0000 (UTC) (envelope-from buhrow@nfbcal.org) Received: from nfbcal.org (ns.NFBCAL.ORG [157.22.230.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "nfbcal.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LFGnG3VMmz511q for ; Fri, 3 Jun 2022 21:52:02 +0000 (UTC) (envelope-from buhrow@nfbcal.org) Received: from nfbcal.org (localhost [127.0.0.1]) by nfbcal.org (8.15.2/8.14.1-NFBNETBSD) with ESMTPS id 253LppST028555 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 Jun 2022 14:51:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at lothlorien.nfbcal.org Received: (from buhrow@localhost) by nfbcal.org (8.15.2/8.12.11) id 253Lpocq022622; Fri, 3 Jun 2022 14:51:50 -0700 (PDT) Message-Id: <202206032151.253Lpocq022622@nfbcal.org> From: Brian Buhrow Date: Fri, 3 Jun 2022 14:51:50 -0700 X-Mailer: Mail User's Shell (7.2.6 beta(4.pl1)+dynamic 20000103) To: freebsd-xen@freebsd.org Subject: PV network interfaces on NetBSD-99.77 domu guests fail to operate Cc: buhrow@nfbcal.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nfbcal.org [127.0.0.1]); Fri, 03 Jun 2022 14:51:51 -0700 (PDT) X-Rspamd-Queue-Id: 4LFGnG3VMmz511q X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of buhrow@nfbcal.org designates 157.22.230.125 as permitted sender) smtp.mailfrom=buhrow@nfbcal.org X-Spamd-Result: default: False [-3.29 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.993]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:ns.nfbcal.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[nfbcal.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.999]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-xen]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7091, ipnet:157.22.0.0/16, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-xen List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-xen@freebsd.org X-BeenThere: freebsd-xen@freebsd.org hello. As part of my update to xen-4.16 and FreeBSD-13.1 as dom0, I'm trying to get some guests running NetBSD-99.77 working. These guests have been working fine with xen-4.14 and FreeBSD-12.2, with the patch shown below applied. What happens when these guests boot is that the network interface attaches, but then netback.c decides something is wrong and it shuts the xnb interface down for that domain, detaching it from the domu's perspective. I can reproduce this behavior over and over again by using the xl network-detach and network-attach commands to reinitialize the xnb and xennet interfaces on host and guest respectively to show the behavior. I downloaded the the latest FreeBSD-13-stable sources to see if the patch shown below was applied. It is. I'm not sure if it made it into the 13.1 binary release, but it seems like it should be there. As a data point, FreeBSD guests seem to work fine, as do NetBSD-5.2 guests. Is this a casewhere the patch is in the current code, but not the binary release or is this a diferent problem with a similar symptom? -thanks -Brian (Output on the dom0 side when I attach a network interface to the relevant guest.) root@xen-lothlorien:/var/xen/nfbcal/loth_9 # xl network-attach 6 'mac=00:4e:46:42:42:cc' ifconfig: interface xenbr0 does not exist ifconfig: 'mtu' requires argument libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /usr/local/etc/xen/scripts/vif-bridge /local/domain/0/backend/vif/6/4 [5085] exited with error status 1 libxl: error: libxl_device.c:1412:device_addrm_aocomplete: Domain 6:Unable to add vif with id 4 libxl_device_nic_add failed. (Output from dom0/FreeBSD-13.1 kernel when above command is issued.) Jun 3 14:24:48 xen-lothlorien kernel: xnb(xnb_probe:1123): Claiming device 5, xnb Jun 3 14:24:48 xen-lothlorien kernel: xnb(xnb_attach:1267): Attaching to backend/vif/6/4 Jun 3 14:24:48 xen-lothlorien kernel: xnb(xnb_frontend_changed:1391): frontend_state=Initialising, xnb_state=InitWait Jun 3 14:24:48 xen-lothlorien kernel: xnb(xnb_frontend_changed:1391): frontend_state=Initialised, xnb_state=InitWait Jun 3 14:24:48 xen-lothlorien kernel: xnb5: Error 2 Unable to retrieve ring information from frontend /local/domain/6/device/vif/4. Unable to connect. Jun 3 14:24:48 xen-lothlorien kernel: xnb5: Fatal error. Transitioning to Closing State Jun 3 14:24:48 xen-lothlorien kernel: xnb(xnb_frontend_changed:1391): frontend_state=Closed, xnb_state=Closing (Output from domu host when network interface is attached.) Script started on Fri Jun 3 14:22:00 2022 [ 6810.3600640] xenbus0: can't get state for device/suspend/event-channel (2) [ 6810.3600640] xennet0 at xenbus0 id 4: Xen Virtual Network Interface [ 6810.3700593] xennet0: backend features 0x6 [ 6810.3700593] xennet0: MAC address 00:4e:46:42:42:cc [ 6810.3800626] xenbus0: can't get state for device/suspend/event-channel (2) [ 6810.3900596] xenbus0: can't get state for device/suspend/event-channel (2) [ 6810.3900596] xennet0: detached