From owner-freebsd-virtualization@freebsd.org Wed Jan 29 04:11:17 2020 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 BCED81B69F7 for ; Wed, 29 Jan 2020 04:11:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 486qmP4fv9z44nC for ; Wed, 29 Jan 2020 04:11:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 9FEE81B69F6; Wed, 29 Jan 2020 04:11:17 +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 9FAFE1B69F5 for ; Wed, 29 Jan 2020 04:11:17 +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 486qmP3h59z44n8 for ; Wed, 29 Jan 2020 04:11:17 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79D2163F8 for ; Wed, 29 Jan 2020 04:11:17 +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 00T4BHTW090093 for ; Wed, 29 Jan 2020 04:11:17 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 00T4BH4t090092 for virtualization@FreeBSD.org; Wed, 29 Jan 2020 04:11:17 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 243692] file-backed VMs do not have LBA flag set in virtio-block Date: Wed, 29 Jan 2020 04:11:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: james.blachly@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: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter 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 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: Wed, 29 Jan 2020 04:11:17 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D243692 Bug ID: 243692 Summary: file-backed VMs do not have LBA flag set in virtio-block Product: Base System Version: 12.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: bhyve Assignee: virtualization@FreeBSD.org Reporter: james.blachly@gmail.com Summary: Briefly, file-backed virtio-block devices in bhyve are exposed differently = than zvol backed VMs. This causes ZFS in illumos to segfault when a file-backed virtio-block device is used. In illumos, the only difference in the block devices, as far as I can tell,= is that zvol-backed devices have the ":lba-access-ok" flag set. Possible cause: The virtio block driver has a set of flags that expose supposed capabilitie= s: https://github.com/freebsd/freebsd/blob/0f0a35a04846fc4f4bdb6caa2852336d7de= 9447d/usr.sbin/bhyve/pci_virtio_block.c#L70-L84 However, these differ between file-backed VMs and zvol-backed VMs, possibly here: https://github.com/freebsd/freebsd/blob/0f0a35a04846fc4f4bdb6caa2852336d7de= 9447d/usr.sbin/bhyve/pci_virtio_block.c#L366-L377 (if not specifically there, seems likely in that function, pci_vtblk_init) This manifests in illumos as a segmentation fault when the command `zpool create` is issued on a bhyve-exposed virtio block device that is backed by a file. I also filed an issue with illumos: https://www.illumos.org/issues/12237 Thanks in advance for help. --=20 You are receiving this mail because: You are the assignee for the bug.=