[nvmewin] Implementing a debug purpose Read/Write using IOCTL_SCSI_MINIPORT

Sagi Bar Sagi.Bar at sandisk.com
Sun Jul 27 03:44:53 PDT 2014


Hello Mike,

Thank you for the pointer.

I am currently designing a driver for device production/integration phase.

So my goal is to bypass all OS designed functionality and actually run the command "as is".

In any case, I see that the community driver is very well designed modularity wise.

Namely, the driver already has all routines I need in order to issue Read/Write using PASSTHROUGH - I just need to "glue" them.

Once I am done, if this will be of interest to the community, I will gladly  share my debugging version of the driver.

Sagi Bar
Test & Tools Staff FW Engineer
[cid:image001.png at 01CEA3CD.FE1957E0]

sagi.bar at SanDisk.com<mailto:sagi.bar at SanDisk.com>

From: Mike Berhan [mailto:mikeb at bustrace.com]
Sent: Thursday, July 24, 2014 8:42 PM
To: Sagi Bar; nvmewin at lists.openfabrics.org
Cc: Roman Goldshtein
Subject: RE: [nvmewin] Implementing a debug purpose Read/Write using IOCTL_SCSI_MINIPORT

Sagi,

The disk class driver is the one that divides reads and writes into smaller requests.  It determines how to divide the request by querying the STORAGE_ADAPTER_DESCRIPTOR.  STORPORT gets the information for this structure from the miniport's PORT_CONFIGURATION_INFORMATION structure (MaximumTransferLength and NumberOfPhysicalBreaks).

In reviewing the NVMe source code, it sets these values to max 128K with a registry override available.  The INF file sets the override but it too defaults to 128K:

HKR, Parameters\Device, MaxTXSize, %REG_DWORD%, 0x00020000 ; max trasnfer size

Mike Berhan
busTRACE Technologies
1-208-629-4773 (Office)

From: nvmewin-bounces at lists.openfabrics.org<mailto:nvmewin-bounces at lists.openfabrics.org> [mailto:nvmewin-bounces at lists.openfabrics.org] On Behalf Of Sagi Bar
Sent: Thursday, July 24, 2014 4:23 AM
To: Alex Chang; nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>
Cc: Roman Goldshtein
Subject: Re: [nvmewin] Implementing a debug purpose Read/Write using IOCTL_SCSI_MINIPORT

Hello Alex,

Thank you for your answer.
I see that the driver has a readily implemented NVMePreparePRPs(...) so adding an extra command shouldn't be an issue.

I might need this feature in order to prevent the StorPort driver from dividing the request into smaller SRBs (debug purposes).

Thank you,


Sagi Bar
Test & Tools Staff FW Engineer
[cid:image001.png at 01CEA3CD.FE1957E0]
7 Atir Yeda St, Kfar - Saba 44425, Israel
sagi.bar at SanDisk.com<mailto:sagi.bar at SanDisk.com>

From: Alex Chang [mailto:Alex.Chang at pmcs.com]
Sent: Wednesday, July 23, 2014 2:35 AM
To: Sagi Bar; nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>
Cc: Roman Goldshtein
Subject: RE: [nvmewin] Implementing a debug purpose Read/Write using IOCTL_SCSI_MINIPORT

Hi Sagi,

Yes, you're right that it's due to security reasons and, in addition, you may access the associated storage as a physical or formatted drive with Windows supported APIs for your debugging purposes, like IOMeter does.

Thanks,
Alex

From: nvmewin-bounces at lists.openfabrics.org<mailto:nvmewin-bounces at lists.openfabrics.org> [mailto:nvmewin-bounces at lists.openfabrics.org] On Behalf Of Sagi Bar
Sent: Tuesday, July 22, 2014 5:21 AM
To: nvmewin at lists.openfabrics.org<mailto:nvmewin at lists.openfabrics.org>
Cc: Roman Goldshtein
Subject: [nvmewin] Implementing a debug purpose Read/Write using IOCTL_SCSI_MINIPORT


Hello Guys,

I would like to implement a debug purpose flow of performing NVME disk IO bypassing the StorPort under Windows 8.1.

I thought about implementing it using "IOCTL_SCSI_MINIPORT" on host side and adding code under "NVM_WRITE/ NVM_READ" on the target side.

I wonder whether anyone here has done it before and can share insights.

Moreover, Is there any particular reason why NVME READ/WRITE commands are not implanted via IOCTL interface, except security ?

Thank you,

Sagi Bar
Test & Tools Staff FW Engineer
[cid:image001.png at 01CEA3CD.FE1957E0]
7 Atir Yeda St, Kfar - Saba 44425, Israel
sagi.bar at SanDisk.com<mailto:sagi.bar at SanDisk.com>


________________________________

PLEASE NOTE: The information contained in this electronic mail message is intended only for the use of the designated recipient(s) named above. If the reader of this message is not the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify the sender by telephone or e-mail (as shown above) immediately and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20140727/a2d1cc91/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 2139 bytes
Desc: image001.png
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20140727/a2d1cc91/attachment.png>


More information about the nvmewin mailing list