From nobody Tue Jul 02 20:40:20 2024 X-Original-To: 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 4WDFCm1yS1z5PJnZ for ; Tue, 02 Jul 2024 20:40:20 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WDFCm00W0z4pn7 for ; Tue, 2 Jul 2024 20:40:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719952820; a=rsa-sha256; cv=none; b=OXwe+gtse91CR/NMFRNfiHVavYHDyzuBp3VpA0jBA0j1wVkrC/CjV0CJ1NDC4Cc7THX1dx XPBI34ACIcQAk8VKB8QqexDJJaN4rkVzqdweA8iox8TC6JC3OVRZsp/2WK+F3FyZQrlS2s mbqKn6MhId62o8DbFoHpVg9X1knJ5/yV6BdLxPlF+zmDD2FOjkYLmmi3W5Fpnt4epjfEWU ItMVfI66DHphSjIEExZfJrtb7SzLXxMyDTisEnqfuiWPcwdlN/wdihUAsIjjBbBJBglojK 3gB/ckexD7G1HrnpapUZVFn/7R2NtNZ5r1gw5pmEqO2nLe7w2IgrlRyIH4L/uQ== 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=1719952820; 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: in-reply-to:in-reply-to:references:references; bh=3VSkkkdzRxMau0fg6XAnqtnI4K63qDZ8j/pQ27pl82I=; b=FpifHMeqvUBTTp0G1463pIKVKdyF6Q5reEoIZHCLPsMA8qfr3cNkU28bjvINj/wCJe/SMa mMZlu/79gi+OQKLRROdDnSC0y+dB3QhxP2I0/cjxx0/VD5qBsx780J7h/np0CvZKxFK6Am 2nEphQSVtk5JKGM5sIbqQDRki1bELkBvQldF6GwkxY79ifbtIZjd6eVWLx0bu9k16jrZyH kISBdv4AfT5+91JTdas5MZTi95NLJUoM7CCUSXJv/XbyW31FtIn1PVjXK23NFeYdH3LlT+ ZQxi/snoF5yaWQSjlIA2jEvYBc4LELZFSNBSHWK/H5tILs00ZRsF/BNGLYGMyg== 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 4WDFCl6bxQz1338 for ; Tue, 2 Jul 2024 20:40:19 +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 462KeJLC021672 for ; Tue, 2 Jul 2024 20:40:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 462KeJdA021670 for virtualization@FreeBSD.org; Tue, 2 Jul 2024 20:40:19 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 280098] 9pfs panics on qemu+kvm Date: Tue, 02 Jul 2024 20:40:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: danilo@FreeBSD.org 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 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280098 --- Comment #2 from Danilo Egea Gondolfo --- Ok, I think I get it (kind of). This patch will do the trick. But I'm not very familiar with the virtio infrastructure yet so I'd like some feedback: --- diff --git a/sys/dev/virtio/p9fs/virtio_p9fs.c b/sys/dev/virtio/p9fs/virtio_p9fs.c index aa174d3bd5b..3b849e26246 100644 --- a/sys/dev/virtio/p9fs/virtio_p9fs.c +++ b/sys/dev/virtio/p9fs/virtio_p9fs.c @@ -320,6 +320,7 @@ vt9p_attach(device_t dev) struct sysctl_oid *tree; struct vt9p_softc *chan; char *mount_tag; + char *mount_tag_p; int error; uint16_t mount_tag_len; @@ -352,9 +353,12 @@ vt9p_attach(device_t dev) mount_tag =3D malloc(mount_tag_len + 1, M_P9FS_MNTTAG, M_WAITOK | M_ZERO); - virtio_read_device_config(dev, - offsetof(struct virtio_9pnet_config, mount_tag), - mount_tag, mount_tag_len); + mount_tag_p =3D mount_tag; + for (int i =3D 0; i < mount_tag_len; i++, mount_tag_p++) { + virtio_read_device_config(dev, + offsetof(struct virtio_9pnet_config, mount_tag) + i, + mount_tag_p, 1); + } device_printf(dev, "Mount tag: %s\n", mount_tag); --- With this patch I get virtio_p9fs0: on virtio_pci7 virtio_p9fs0: Mount tag: config root@freebsd:~ # mount -t p9fs config /mnt root@freebsd:~ # ls /mnt/ agent-mounts.json agent.crt files=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 lxd-agent server.crt udev agent.conf agent.key install.sh nic= s=20=20=20 systemd root@freebsd:~ # mount /dev/da0p2 on / (ufs, local, synchronous, soft-updates, journaled soft-upda= tes) devfs on /dev (devfs) /dev/da0p1 on /boot/efi (msdosfs, local) config on /mnt (p9fs, local) --=20 You are receiving this mail because: You are the assignee for the bug.=