Lines Matching +full:- +full:a +full:-

10     on Power 8 systems. CAPI can be thought of as a special tunneling
12 purpose co-processors which can read or write an application's
13 memory and generate page faults. As a result, the host interface to
19 devices as a PCI device by implementing a virtual PCI host bridge.
24 CXL provides a mechanism by which user space applications can
25 directly talk to a device (network or storage) bypassing the typical
26 kernel/device driver stack. The CXL Flash Adapter Driver enables a
29 The CXL Flash Adapter Driver is a kernel module that sits in the
30 SCSI stack as a low level device driver (below the SCSI disk and
40 - Any flash device (LUN) can be configured to be accessed as a
43 - Any flash device (LUN) can be configured to be accessed from
44 user space with a special block library. This mode further
47 or physical LUN access) or access to a kernel/AFU-mediated
49 segmentation of a disk device into virtual LUNs is assisted
55 The Coherent Accelerator Interface Architecture (CAIA) introduces a
56 concept of a master context. A master typically has special privileges
63 The CXL Flash Adapter Driver establishes a master context with the
67 +-------------------------------+
71 +-------------------------------+
75 +-------------------------------+
78 +-------------------------------+
81 adapter driver. The driver is the only entity that is considered a
89 written to a specification provided by the block library may get
90 access to the Flash from user space (without requiring a system call).
92 This master context driver also provides a series of ioctls for this
96 The first mode is called a virtual mode. In this mode a single scsi
99 the sizes of all the virtual LUNs, along with the meta-data associated
102 The second mode is called the physical mode. In this mode a single
119 The block library can be thought of as a 'user' of services,
122 mode. While it is not a requirement that applications understand
124 a high-level overview of each supported service (IOCTL) is provided
128 http://github.com/open-power/capiflash
134 Users, such as the block library, that wish to interface with a flash
137 a file descriptor handle must first be obtained in order to establish
138 the communication channel between a user and the kernel. This file
143 driver. Upon successful open, the user receives a file descriptor
151 ------------------
153 This ioctl obtains, initializes, and starts a context using the CXL
154 kernel services. These services specify a context id (u16) by which
156 services additionally provide a second file descriptor (herein
161 notification and access in the event of a non-user-initiated close(),
162 such as a killed process. This design point is described in further
165 There are a few important aspects regarding the "tokens" (context id
168 - These tokens are only valid for the process under which they
169 were created. The child of a forked process cannot continue
173 - These tokens are only valid for the lifetime of the context and
178 - A valid adapter file descriptor (fd2 >= 0) is only returned on
179 the initial attach for a context. Subsequent attaches to an
184 - When a context is no longer needed, the user shall detach from
186 returns with a valid adapter file descriptor and the return flag
188 close the adapter file descriptor following a successful detach.
190 - When this ioctl returns with a valid fd2 and the return flag
194 + Following a successful detach of the last user of the context
195 + Following a successful recovery on the context's original fd2
196 + In the child process of a fork(), following a clone ioctl,
199 - At any time, a close on fd2 will invalidate the tokens. Applications
204 -----------------------
207 user space on a per-context basis. Additionally, the block size and
212 at a time and if one mode is active (outstanding references exist),
213 requests to use the LUN in a different mode are denied.
217 treated as a resource handle that is returned to the user. The user
221 ------------------------
224 on a per-context basis. Additionally, the block size and last logical
229 at a time and if one mode is active (outstanding references exist),
230 requests to use the LUN in a different mode are denied.
234 is treated as a resource handle that is returned to the user. The
237 By default, the virtual LUN is created with a size of 0. The user
239 the virtual LUN to a desired size. To avoid having to perform this
241 option of specifying a size as part of the DK_CXLFLASH_USER_VIRTUAL
244 storage. This is reflected by the last LBA being a non-zero value.
246 When a LUN is accessible from more than one port, this ioctl will
248 provides the user with a hint that I/O can be retried in the event
252 -----------------------
253 This ioctl is responsible for resizing a previously created virtual
254 LUN and will fail if invoked upon a LUN that is not in virtual
261 operating in the virtual mode and used to program a LUN translation
262 table that the AFU references when provided with a resource handle.
264 This ioctl can return -EAGAIN if an AFU sync operation takes too long.
265 In addition to returning a failure to user, cxlflash will also schedule
267 it is expected to succeed. If this ioctl fails with -EAGAIN, the user
268 can either retry the operation or treat it as a failure.
271 -------------------
272 This ioctl is responsible for releasing a previously obtained
273 reference to either a physical or virtual LUN. This can be
284 ------------------
285 This ioctl is responsible for unregistering a context with the
291 When the DK_CXLFLASH_APP_CLOSE_ADAP_FD flag was returned on a successful
296 ----------------------
297 This ioctl is responsible for cloning a previously created
298 context to a more recently created context. It exists solely to
299 support maintaining user space access to storage after a process
302 as the parent, but under a different context.
305 therefore each fork must be met with establishing a new context
307 and playback required by a user in such a scenario. When a process
309 a context (via DK_CXLFLASH_ATTACH) and then using this ioctl to
316 When the DK_CXLFLASH_APP_CLOSE_ADAP_FD flag was returned on a successful
319 clone. This is to avoid a stale entry in the file descriptor table of the
322 This ioctl can return -EAGAIN if an AFU sync operation takes too long.
323 In addition to returning a failure to user, cxlflash will also schedule
325 it is expected to succeed. If this ioctl fails with -EAGAIN, the user
326 can either retry the operation or treat it as a failure.
329 ------------------
332 where the changes affect the application (such as a LUN resize), the
335 The user calls in when they want to validate that a LUN hasn't been
336 changed in response to a check condition. As the user is operating out
341 verifying a LUN change (ie: size different) with sense data is
345 -----------------------
347 of a specified user context. Any state associated with the user context
348 is re-established upon successful recovery.
353 architected behavior for a user is to call into this ioctl to recover
354 their context. A user may also call into this ioctl at any time to
355 check if the device is operating normally. If a failure is returned
362 When the DK_CXLFLASH_APP_CLOSE_ADAP_FD flag was returned on a successful
368 ----------------------
369 This ioctl is used to switch a LUN from a mode where it is available
370 for file-system access (legacy), to a mode where it is set aside for
371 exclusive user space access (superpipe). In case a LUN is visible
380 has a special character device associated with it to enable a set of
381 host management function. These character devices are hosted in a
391 -------------------------
397 the target port to host the LUN and a desired size in 4K blocks. Upon
400 that partial allocations are not supported. Should a creation fail due
401 to a space issue, the target port can be queried for its current LUN
404 To remove a LUN, the device must first be disassociated from the Linux
405 SCSI subsystem. The LUN deletion can then be initiated by specifying a
410 To query the LUN geometry of a port, the target port is specified and
413 - Maximum number of provisioned LUNs allowed for the port
414 - Current number of provisioned LUNs for the port
415 - Maximum total capacity of provisioned LUNs for the port (4K blocks)
416 - Current total capacity of provisioned LUNs for the port (4K blocks)
422 ---------------------
423 This ioctl is used to debug AFUs by supporting a command pass-through
428 cxlflash and treated as pass-through. For debug commands that do require
430 specify the data transfer direction with respect to the host. There is a
432 are not supported - when errors are experienced with a host read data