Re: nda(4) does not work (reliably) in VMware Workstation

2018-12-13 Thread Chuck Tuffli
On Sun, Dec 9, 2018 at 3:50 PM Chuck Tuffli  wrote:

> On Sun, Dec 9, 2018 at 3:43 PM Yuri Pankov  wrote:
>
>> Chuck Tuffli wrote:
>> > On Sat, Dec 8, 2018 at 12:28 PM Yuri Pankov > > > wrote:
>> >
>> > Hi,
>> >
>> > Running -HEAD in VMware Workstation 15.0.2 VM.  Trying to use nda(4)
>> > instead of nvd(4) shows the following list of errors, and eventually
>> > panics:
>> >
>> > https://people.freebsd.org/~yuripv/nda1.png
>> > https://people.freebsd.org/~yuripv/nda2.png
>> >
>> > nvd(4) works without issues in this VM.  nda(4) works as well in
>> VMware
>> > ESXi VMs.  Is this a problem with WS NVMe emulation?
>> >
>> >
>> > Since I don't have access to ESXi, the attached is a speculative fix. If
>> > it works, I'll clean this up a bit and get it committed. If not, please
>> > post the output from:
>> > nvmecontrol identtify nvme0
>>
>> Thank you, it seems to help (was seeing the issue previously immediately
>> after boot).  BTW, the ESXi VM works fine with nda, it's only the
>> Workstation that had the problem.  Comparing `nvmecontrol identify`
>> output from both, the only difference is (first is WS, second is ESXi):
>>
>> -Dataset Management Command:  Not Supported
>> +Dataset Management Command:  Supported
>>
>
> OK, that makes sense given the error message and the patch working. I'll
> get this cleaned up and committed. Thanks for the report!
>

Committed r342046 to address this

--chuck
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: nda(4) does not work (reliably) in VMware Workstation

2018-12-09 Thread Chuck Tuffli
On Sun, Dec 9, 2018 at 3:43 PM Yuri Pankov  wrote:

> Chuck Tuffli wrote:
> > On Sat, Dec 8, 2018 at 12:28 PM Yuri Pankov  > > wrote:
> >
> > Hi,
> >
> > Running -HEAD in VMware Workstation 15.0.2 VM.  Trying to use nda(4)
> > instead of nvd(4) shows the following list of errors, and eventually
> > panics:
> >
> > https://people.freebsd.org/~yuripv/nda1.png
> > https://people.freebsd.org/~yuripv/nda2.png
> >
> > nvd(4) works without issues in this VM.  nda(4) works as well in
> VMware
> > ESXi VMs.  Is this a problem with WS NVMe emulation?
> >
> >
> > Since I don't have access to ESXi, the attached is a speculative fix. If
> > it works, I'll clean this up a bit and get it committed. If not, please
> > post the output from:
> > nvmecontrol identtify nvme0
>
> Thank you, it seems to help (was seeing the issue previously immediately
> after boot).  BTW, the ESXi VM works fine with nda, it's only the
> Workstation that had the problem.  Comparing `nvmecontrol identify`
> output from both, the only difference is (first is WS, second is ESXi):
>
> -Dataset Management Command:  Not Supported
> +Dataset Management Command:  Supported
>

OK, that makes sense given the error message and the patch working. I'll
get this cleaned up and committed. Thanks for the report!

--chuck
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: nda(4) does not work (reliably) in VMware Workstation

2018-12-09 Thread Chuck Tuffli
On Sat, Dec 8, 2018 at 12:28 PM Yuri Pankov  wrote:

> Hi,
>
> Running -HEAD in VMware Workstation 15.0.2 VM.  Trying to use nda(4)
> instead of nvd(4) shows the following list of errors, and eventually
> panics:
>
> https://people.freebsd.org/~yuripv/nda1.png
> https://people.freebsd.org/~yuripv/nda2.png
>
> nvd(4) works without issues in this VM.  nda(4) works as well in VMware
> ESXi VMs.  Is this a problem with WS NVMe emulation?
>

Since I don't have access to ESXi, the attached is a speculative fix. If it
works, I'll clean this up a bit and get it committed. If not, please post
the output from:
nvmecontrol identtify nvme0

--chuck
diff -r 1fbb2025b263 sys/cam/nvme/nvme_da.c
--- a/sys/cam/nvme/nvme_da.c	Sun Dec 09 21:53:45 2018 +
+++ b/sys/cam/nvme/nvme_da.c	Sun Dec 09 15:18:08 2018 -0800
@@ -798,7 +798,7 @@
 	disk->d_mediasize = (off_t)(disk->d_sectorsize * nsd->nsze);
 	disk->d_delmaxsize = disk->d_mediasize;
 	disk->d_flags = DISKFLAG_DIRECT_COMPLETION;
-//	if (cd->oncs.dsm) // XXX broken?
+	if ((cd->oncs >> NVME_CTRLR_DATA_ONCS_DSM_SHIFT) & NVME_CTRLR_DATA_ONCS_DSM_MASK)
 		disk->d_flags |= DISKFLAG_CANDELETE;
 	vwc_present = (cd->vwc >> NVME_CTRLR_DATA_VWC_PRESENT_SHIFT) &
 		NVME_CTRLR_DATA_VWC_PRESENT_MASK;
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: nda(4) does not work (reliably) in VMware Workstation

2018-12-09 Thread Yuri Pankov
Chuck Tuffli wrote:
> On Sat, Dec 8, 2018 at 12:28 PM Yuri Pankov  > wrote:
> 
> Hi,
> 
> Running -HEAD in VMware Workstation 15.0.2 VM.  Trying to use nda(4)
> instead of nvd(4) shows the following list of errors, and eventually
> panics:
> 
> https://people.freebsd.org/~yuripv/nda1.png
> https://people.freebsd.org/~yuripv/nda2.png
> 
> nvd(4) works without issues in this VM.  nda(4) works as well in VMware
> ESXi VMs.  Is this a problem with WS NVMe emulation?
> 
> 
> Since I don't have access to ESXi, the attached is a speculative fix. If
> it works, I'll clean this up a bit and get it committed. If not, please
> post the output from:
> nvmecontrol identtify nvme0

Thank you, it seems to help (was seeing the issue previously immediately
after boot).  BTW, the ESXi VM works fine with nda, it's only the
Workstation that had the problem.  Comparing `nvmecontrol identify`
output from both, the only difference is (first is WS, second is ESXi):

-Dataset Management Command:  Not Supported
+Dataset Management Command:  Supported





signature.asc
Description: OpenPGP digital signature


nda(4) does not work (reliably) in VMware Workstation

2018-12-08 Thread Yuri Pankov
Hi,

Running -HEAD in VMware Workstation 15.0.2 VM.  Trying to use nda(4)
instead of nvd(4) shows the following list of errors, and eventually panics:

https://people.freebsd.org/~yuripv/nda1.png
https://people.freebsd.org/~yuripv/nda2.png

nvd(4) works without issues in this VM.  nda(4) works as well in VMware
ESXi VMs.  Is this a problem with WS NVMe emulation?



signature.asc
Description: OpenPGP digital signature