From nobody Sun Mar 20 17:13:36 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 903151A1373E for ; Sun, 20 Mar 2022 17:14:13 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) (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 4KM49J6kVlz4TD0 for ; Sun, 20 Mar 2022 17:14:12 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-2e612af95e3so23221407b3.9 for ; Sun, 20 Mar 2022 10:14:12 -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=cRreEdnRRdsIVWrDp2LLGRwmjzXtk9a1GrQLU4NUNbc=; b=aTcbJYvDVOCybNODMAsgDF4COx1gfg27lH80LeK+eAkBftvhuyeTbg6eXEfzNbs8GO 9Bt6rGKJToPYViTe/9x/gCXQ9CSexamApepokd/clACZj769BsjoWuCjBKJa+MtI0mM0 NlbgmjNSCptKcOJOY4vd4bSzMhpzyiOmhYc8m0jJ4+VN6TFYWPU7dVnM1STp5wVSotgh Rc9Nlt05/kHcdCVjo1MOpPqRB07sz4dl3sszwcHCGGaA6bCqOXBOzDFUE/NVZjWW83Ho 6u7X0x9dEqSjjrrcC9Er/ioA6xG+OiIEO3keDgTJKQHMjgKp0/JRKBRKpDli0wNRHU5C b1rw== 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=cRreEdnRRdsIVWrDp2LLGRwmjzXtk9a1GrQLU4NUNbc=; b=X/qr0GwQKQj8YAldd46rn2jVhT11ZRSspWaiBibzqHpOJiMpn3lQ1RgjyvudcSDzzc 64k4rZHFuQl2MYH856mfjR5IHuSBo/STkmAgGY8bfaWjABQEfkiVjYu7FkbYgp4tA0lK 8bXdhBtKD3C07vVg4Ev0y3HW3Sy6n8fGmv4zPT/CdXskr5aTxMK5p92Ksgxfnd1mz/HR u39FBhx9U5BhyJ176hx3HifE9H98GoNXPsMPBkwNL8SqGjtF2NoNvuygu8ucpn6Flkb/ z7rOMOa4JLsAZhIFJnDKxPXq8b99/YSLvHYNT6/H17QeNXVjxjofY9aC0KB3ohaXYXEb 3vLw== X-Gm-Message-State: AOAM533b79rDXCS+tpsnG3E7ya+2mO80lMVpTcS0UkuT9Ac2jutSjHqD hC7J7sKv1yOHGyGx8AY+fCf+/xjtM5Rwpt4ipcM= X-Google-Smtp-Source: ABdhPJxdL0JN7UVgfqfu6A/o/WUwjyLBU9BICcobzZKTfN1JgiPtkKBs27BX6SpqsEg4Cioz/LaZJxUeC3Dkd3MTMgk= X-Received: by 2002:a81:bf54:0:b0:2e5:c117:83cf with SMTP id s20-20020a81bf54000000b002e5c11783cfmr17150355ywk.25.1647796452305; Sun, 20 Mar 2022 10:14:12 -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 18:13:36 +0100 Message-ID: Subject: Re: bhyve NVMe 1.4 support To: Chuck Tuffli Cc: jason@tubnor.net, FreeBSD virtualization Content-Type: multipart/alternative; boundary="00000000000033afdd05daa98201" X-Rspamd-Queue-Id: 4KM49J6kVlz4TD0 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=aTcbJYvD; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2607:f8b0:4864:20::112f as permitted sender) smtp.mailfrom=marietto2008@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; 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)[-1.000]; 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)[]; 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.999]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::112f: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 --00000000000033afdd05daa98201 Content-Type: text/plain; charset="UTF-8" How can I mount the whole disk ? like this ? (on freebsd) : 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/nvd0 \ -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 On Linux : mario@marietto-BHYVE:/home/marietto# mount -t auto /dev/nvme0n1 /mnt/nvme0n1 mount: /mnt/nvme0n1: wrong fs type, bad option, bad superblock on /dev/nvme0n1, missing codepage or helper program, or other error. does not work. I don't see which partitions there are inside the disk,I'm not able to understand which kind of file system should I mount. Il giorno dom 20 mar 2022 alle ore 16:12 Mario Marietto < marietto2008@gmail.com> ha scritto: > ----> 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. > -- Mario. --00000000000033afdd05daa98201 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
How can I mount the whole disk ?

like this ? (on freebsd) :

bhyve -S -c sockets=3D2,cor=
es=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-nvidia-495.img \
-s 2,nvme,/dev/nvd0 \
-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

On Linux :

=09 =09
mario@marietto-BHYVE:/h=
ome/marietto# mount -t auto /dev/nvme0n1 /mnt/nvme0n1

mount: /mnt/nvme0n1: wrong fs type, bad option, bad superblock on /dev/nvme=
0n1, missing codepage or helper program, or other error.

does not work. I don't see which partitions there are inside the disk,I'm not able to understand which kind of file system= =20 should I mount.

Il giorno dom 20 mar 2022 alle ore 16:12 Mario Marietto <= ;marietto2008@gmail.com> h= a scritto:
----> 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.
=


--
Mario.
--00000000000033afdd05daa98201--