From nobody Sun Mar 20 15:12:23 2022 X-Original-To: freebsd-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 164B81A1B0F3 for ; Sun, 20 Mar 2022 15:13:01 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KM1TS0Zqwz3NVQ for ; Sun, 20 Mar 2022 15:13:00 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-2d07ae0b1c4so132575377b3.11 for ; Sun, 20 Mar 2022 08:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9H/xq4ETKCNu8KYnOcNdJgH9mkXDHTYRM8zm3f2gVgY=; b=Ha/BY3vo4iY3uIyrSLfg5nlRvFHKiMbMmCRbzpU5Mj59hvR7e85ur17gXYIyPknFbx BnRMOIanPnWg9u8TOA7MOXbfbC0TgKFvp5RxMfjyWHzVvSxQBV1tQevZFualpVBKcYpT 69AHj3MVcIZ4gxihkxHGS+Mp1DZqwMZufkpT44CMdWoaWNWveN6np26tAFQwL3jp/nkN 9DHH7y7cO7uWrI8wFBZbVB+JdOET8ewuz1XHaQz39a0SOHZcIO/m0uvucXKagY4O5LkC 4IVdnp+ghgcF8+1GrI+yzl4YEvWB4lim604DrqR3fHUV8+YFP2cKY3zaONS6ko08ONkq mHOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9H/xq4ETKCNu8KYnOcNdJgH9mkXDHTYRM8zm3f2gVgY=; b=EdZ7tMNk3Z0sLENIy/KvJPi81UP3tavbmzc/t69RbypO0awB5knx3NFSeN3BrOATQN CaiFSzOEq0+C1QHcRF6sXmZwuXM9ZrIr3g4QSaLTVeKdRElfuexaihyyZqNXNtzZVMpC 3s5TyztmYe6vLxt8MYHK98G8bmufD5oKcuEoki8JoiVrHaT94/73hy2j0mFRAI4H1OD3 NePwuYzxG/iEUHv1mm3hURKivOuU0NMWRA2TejQ5B7qx8cqpcpZwkMUA7z0MpmcfqI9U VVWemEUDDIOdRGR+Mv+nhAvDQyVNsuaEw8DjQlD+RUFejE+Ytv0MT29T37NX9WHYTBLk oylg== X-Gm-Message-State: AOAM53063+f9+I8MPZL9uyyjgJxit0AH6PM3ezAu928PKEwqZ8rN1FLp AXO7Do/ZL4nxlRYl9XyLCXSnyxF0a986l0zHIL6/QDH3fS8= X-Google-Smtp-Source: ABdhPJwJlTvuyydtpGixfg3HeTSMAqEDMNwee3XB9mOBAXDa8vk+sg0DenGQKBgFlE5kClTfWMTbeZr0YugR4bCvDb4= X-Received: by 2002:a81:bf54:0:b0:2e5:c117:83cf with SMTP id s20-20020a81bf54000000b002e5c11783cfmr16752458ywk.25.1647789179437; Sun, 20 Mar 2022 08:12:59 -0700 (PDT) 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 References: <00bf01d80104$e6ba5de0$b42f19a0$@tubnor.net> <082b01d80697$64e95030$2ebbf090$@tubnor.net> In-Reply-To: From: Mario Marietto Date: Sun, 20 Mar 2022 16:12:23 +0100 Message-ID: Subject: Re: bhyve NVMe 1.4 support To: Chuck Tuffli Cc: jason@tubnor.net, FreeBSD virtualization Content-Type: multipart/alternative; boundary="000000000000b4867c05daa7d079" X-Rspamd-Queue-Id: 4KM1TS0Zqwz3NVQ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b="Ha/BY3vo"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2607:f8b0:4864:20::1135 as permitted sender) smtp.mailfrom=marietto2008@gmail.com X-Spamd-Result: default: False [-1.99 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; URI_COUNT_ODD(1.00)[1]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-0.999]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-0.997]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1135:from]; HTTP_TO_IP(1.00)[]; MLMMJ_DEST(0.00)[freebsd-virtualization]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --000000000000b4867c05daa7d079 Content-Type: text/plain; charset="UTF-8" ----> Help me understand what "not recognized" means. The device nvme0n1 : I don't see the partitions that are stored inside the disk nvme. And I'm not able to mount the NTFS partition that's mapped as nvd0p2 under FreeBSD. For example : bhyve -S -c sockets=2,cores=2,threads=2 -m 8G -w -H -A \ -s 0,hostbridge \ -s 1,virtio-blk,/mnt/$vmdisk'p2'/bhyve/os/Linux/impish-cuda-11-5-nvidia-495.img \ -s 2,nvme,/dev/nvd0p2 \ -s 3,passthru,5/0/0 \ -s 4,passthru,1/0/0 \ -s 8,virtio-net,tap0 \ -s 9,virtio-9p,sharename=/ \ -s 29,fbuf,tcp=0.0.0.0:5900,w=1440,h=900 \ -s 30,xhci,tablet \ -s 31,lpc \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \ vm0 < /dev/null & sleep 2 && vncviewer 0:0 root@marietto-BHYVE:/home/marietto# ntfs-3g /dev/nvme0n1 /mnt/nvme ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 0: Argomento not valid Record 0 has no FILE magic (0x0) Failed to load $MFT: Errore di input/output Failed to mount '/dev/nvme0n1': Errore di input/output NTFS is either inconsistent, or there is a hardware fault, or it's a SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows then reboot into Windows twice. The usage of the /f parameter is very important! If the device is a SoftRAID/FakeRAID then first activate it and mount a different device under the /dev/mapper/ directory, (e.g. /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation for more details. Il giorno dom 20 mar 2022 alle ore 15:30 Chuck Tuffli ha scritto: > On Sun, Mar 20, 2022 at 3:44 AM Mario Marietto > wrote: > ... > > on the Ubuntu 21.10 guest os : > > > > mario@marietto-BHYVE:/home/marietto# fdisk -l > > > > Disk /dev/nvme0n1: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors > > Disk model: bhyve-NVMe > > Units: sectors of 1 * 512 = 512 bytes > > Sector size (logical/physical): 512 bytes / 512 bytes > > I/O size (minimum/optimal): 512 bytes / 512 bytes > > > > > > The nvme disk is not recognized. > > Help me understand what "not recognized" means. The device nvme0n1 > existing in the guest means that the Linux PCI driver found the > emulated device and the Linux NVMe driver claimed it. The "n1" at the > end of the device name implies the Linux NVMe driver successfully sent > a number of Admin commands to the emulated device and discovered the > Namespace. And the capacity looks correct. > > --chuck > -- Mario. --000000000000b4867c05daa7d079 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
----> Help me understand what "not recognized" means. The devi= ce nvme0n1 :

I don't see the partitions that a= re stored inside the disk nvme. And I'm not able to mount the NTFS part= ition that's mapped as nvd0p2 under FreeBSD.

For example :

bhyve -S -=
c sockets=3D2,cores=3D2,threads=3D2 -m 8G -w -H -A \
-s 0,hostbridge \
-s 1,virtio-blk,/mnt/$vmdisk'p2'/bhyve/os/Linux/impish-cuda-11-5-nv=
idia-495.img \
-s 2,nvme,/dev/nvd0p2 \
-s 3,passthru,5/0/0 \
-s 4,passthru,1/0/0 \
-s 8,virtio-net,tap0 \
-s 9,virtio-9p,sharename=3D/ \
-s 29,fbuf,tcp=3D0.0.0.0:=
5900,w=3D1440,h=3D900 \
-s 30,xhci,tablet \
-s 31,lpc \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
vm0 < /dev/null & sleep 2 && vncviewer 0:0

root@marietto-BHYVE:/home/marietto# ntfs-3g /dev/nvme0n1 /mnt= /nvme

ntfs_mst_post_read_fixup_warn: magic: 0x0000= 0000 =C2=A0size: 1024 =C2=A0 usa_ofs: 0 =C2=A0usa_count: 0: Argomento not v= alid
Record 0 has no FILE magic (0x0)
Failed to load $MFT: Errore di = input/output
Failed to mount '/dev/nvme0n1': Errore di input/out= put
NTFS is either inconsistent, or there is a hardware fault, or it'= ;s a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Wind= ows
then reboot into Windows twice. The usage of the /f parameter is ver= y
important! If the device is a SoftRAID/FakeRAID then first activateit and mount a different device under the /dev/mapper/ directory, (e.g./dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentati= on
for more details.

Il giorno dom 20 mar 2022 alle ore 15:30 C= huck Tuffli <chuck= @tuffli.net> ha scritto:
On Sun, Mar 20, 2022 at 3:44 AM Mario Marietto <marietto2008@gmail.com= > wrote:
...
> on the Ubuntu 21.10 guest os :
>
> mario@marietto-BHYVE:/home/marietto# fdisk -l
>
> Disk /dev/nvme0n1: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors=
> Disk model: bhyve-NVMe
> Units: sectors of 1 * 512 =3D 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
>
>
> The nvme disk is not recognized.

Help me understand what "not recognized" means. The device nvme0n= 1
existing in the guest means that the Linux PCI driver found the
emulated device and the Linux NVMe driver claimed it. The "n1" at= the
end of the device name implies the Linux NVMe driver successfully sent
a number of Admin commands to the emulated device and discovered the
Namespace. And the capacity looks correct.

--chuck


--
Mario.
=
--000000000000b4867c05daa7d079--