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

Mike Berhan mikeb at bustrace.com
Thu Jul 24 10:41:30 PDT 2014


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] On Behalf Of Sagi Bar
Sent: Thursday, July 24, 2014 4:23 AM
To: Alex Chang; 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

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

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/20140724/6c7313f7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 2139 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20140724/6c7313f7/attachment.png>


More information about the nvmewin mailing list