From nobody Wed Aug 10 04:18:41 2022 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 4M2cBT6fgyz4Y2JH for ; Wed, 10 Aug 2022 04:18:41 +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 4M2cBT3D7qz3MyB for ; Wed, 10 Aug 2022 04:18:41 +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) 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 4M2cBT2G5TzyKY for ; Wed, 10 Aug 2022 04:18:41 +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 27A4If66092469 for ; Wed, 10 Aug 2022 04:18:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 27A4If1j092468 for virtualization@FreeBSD.org; Wed, 10 Aug 2022 04:18:41 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 265749] bhyve NVMe emulation after LLVM 14 import to CURRENT Date: Wed, 10 Aug 2022 04:18:41 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: editor@callfortesting.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: 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 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660105121; 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=iMGsSupC0H1mcGH97YN3pC6cTUCPUnKCj1pcdhvL7gA=; b=FyYzSK+fV3n9StAhYDz0nijuiBs9OBJbw78bul8kT7jw1o+jazYiNE+l//5alLOaq3WB0k 2noIYTfaTo6KRysgnA81at5yL4tTc4mFp+M13vREijcCdayPL/JvUy/1jWtQZfPgEwWO2H 7lrGxnTYlHvwaVPI10685ttzOgyeWLn+JmkhuZyl79+kmlUxCybBzsrFxJ1w01JxbZR911 AnKMmhq1mMeFXlN/yZaRU+ECc0yJHfj5eXKShwB0FH6XyjoCJJlUUzBjwXPJ0YhLFzMN7d jWv5dPKqlKjIQInG0QQP2BCLuAjhwSNTNaU1pMIekoYGxo1HdXGtTQAkiot3Qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660105121; a=rsa-sha256; cv=none; b=JleoIWerPv28s0rg/6GYN28pOlDUlXkzDHGr10YS9SQLqVEdFM+dTiRFyltePtdsmD/a6h ddRCxEm7IpeXQ/e2uULxuWW5+oIcN8Jla/ROqbx0oh5ZRdQcnANfSo55kZaD0Lo9PHfjfo XcAWaYQ9wEjh0Wc/4fLtd9m8M1N9l/1yc9OcGQ53hcVhowQI0x+p/ye2hC+PQuTw7JwCxo pcwlQVlBBvXJ9+G9A5KhuAoDvYkAKTgKuRjnUQgFXy5Y3f3MbxzOXYdcM5chexB2W9FM8d d47c47fH+a39EQ7GQjjFl9sSDIvUXio1Y+BAsKW8pUrltbh7wGmCizRxpiTWbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265749 Bug ID: 265749 Summary: bhyve NVMe emulation after LLVM 14 import to CURRENT Product: Base System Version: CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: bhyve Assignee: virtualization@FreeBSD.org Reporter: editor@callfortesting.org The bhyve NVMe emulation has long passed the NVMe compliance test suite but that is no longer the case as of the import of LLVM 14 into FreeBSD CURRENT. To reproduce: 13.0R and 13.1 behavior: Attach a 1GB disk image with backing store type "nvme" which should appear = as "nvd0/nvme0", run this command: nvmecontrol io-passthru -o 0x2 -l 4096 -4 0x2ffff0 -r nvme0ns1 Result: nvme_opc_write_read command would exceed LBA range(slba=3D0x2ffff0 nblocks= =3D0x1) nvme0: READ sqid:2 cid:127 nsid:1 lba:3145712 len:1 nvme0: LBA OUT OF RANGE (00/80) sqid:2 cid:127 cdw0:0 On 14-CURRENT after the LLVM 14 import, the bhyve process panics without a = core dump, and attaching lldb results in (bhyve PID 9800): Process 9800 stopped * thread #52, name =3D 'vcpu 0', stop reason =3D signal SIGSEGV: invalid ad= dress (fault address: 0xb8) frame #0: 0x0000396779935c8b bhyve`pci_nvme_read(ctx=3D0x000039710c91a5= 00, vcpu=3D0, pi=3D0x0000000000000000, baridx=3D-1985581039, offset=3D0, size= =3D0) at pci_nvme.c:3035:34 3032 pci_nvme_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, = int baridx, 3033 uint64_t offset, int size) 3034 { -> 3035 struct pci_nvme_softc* sc =3D pi->pi_arg; 3036 3037 if (baridx =3D=3D pci_msix_table_bar(pi) || 3038 baridx =3D=3D pci_msix_pba_bar(pi)) { (lldb) bt * thread #52, name =3D 'vcpu 0', stop reason =3D signal SIGSEGV: invalid ad= dress (fault address: 0xb8) * frame #0: 0x0000396779935c8b bhyve`pci_nvme_read(ctx=3D0x000039710c91a5= 00, vcpu=3D0, pi=3D0x0000000000000000, baridx=3D-1985581039, offset=3D0, size= =3D0) at pci_nvme.c:3035:34 frame #1: 0x5ae6c31489a67011 frame #2: 0x000039677992eaca bhyve`pci_emul_mem_handler(ctx=3D, vcpu=3D, dir=3D, addr=3D, size=3D, val=3D, arg1=3D0x0000396fa69aa800, arg2=3D0) at pci_emul.c:498= :4 frame #3: 0x000039677991f8a9 bhyve`mem_write(ctx=3D0x0000396fa6978800, vcpu=3D, gpa=3D3221229576, wval=3D1, size=3D4, arg=3D) at mem.c:165:10 frame #4: 0x000039677994d30f bhyve`vmm_emulate_instruction [inlined] emulate_mov(vm=3D0x0000396fa6978800, vcpuid=3D0, gpa=3D3221229576, vie=3D, memread=3D, memwrite=3D(bhyve`mem_write at mem.c:161), arg=3D) at vmm_instruction_emul.c:0:10 frame #5: 0x000039677994d1e5 bhyve`vmm_emulate_instruction(vm=3D0x0000396fa6978800, vcpuid=3D0, gpa=3D32= 21229576, vie=3D, paging=3D, memread=3D, memwrite=3D(bhyve`mem_write at mem.c:161), memarg=3D0x0000396fa696f878) at vmm_instruction_emul.c:1790:11 frame #6: 0x000039677991f364 bhyve`emulate_mem_cb(ctx=3D, vcpu=3D, paddr=3D, mr=3D, arg=3D) at mem.c:241:10 frame #7: 0x000039677991f264 bhyve`access_memory(ctx=3D0x0000396fa69788= 00, vcpu=3D0, paddr=3D3221229576, cb=3D(bhyve`emulate_mem_cb at mem.c:237), arg=3D0x000039712d3f0eb0) at mem.c:218:8 frame #8: 0x000039677991f17f bhyve`emulate_mem(ctx=3D0x0000396fa6978800, vcpu=3D, paddr=3D, vie=3D0x000039710c935188, paging=3D0x000039710c935170) at mem.c:254:10 frame #9: 0x0000396779912fd3 bhyve`vmexit_inst_emul(ctx=3D0x0000396fa69= 78800, vmexit=3D0x000039710c935140, pvcpu=3D0x000039712d3f0f2c) at bhyverun.c:852:8 frame #10: 0x00003967799129b3 bhyve`vm_loop(ctx=3D0x0000396fa6978800, v= cpu=3D0, startrip=3D) at bhyverun.c:987:8 frame #11: 0x0000396779911374 bhyve`fbsdrun_start_thread(param=3D0x0000396fa69841b0) at bhyverun.c:542:2 frame #12: 0x0000396fa3db296a libthr.so.3`thread_start(curthread=3D0x000039710c91a500) at thr_create.c:29= 2:16 --=20 You are receiving this mail because: You are the assignee for the bug.=