Lines Matching +full:os +full:- +full:code +full:- +full:offset
17 code sufficient to write user or kernel applications that use DAX
25 the accompanying document, dax-hv-api.txt, which is a plain text
27 Specification" version 3.0.20+15, dated 2017-09-25.
38 requests to the available coprocessor execution units. A status code
86 made accessible via mmap(), and are read-only for the application.
109 equal to the number of bytes given in the call. Otherwise -1 is
113 -----------
122 --------
129 --------
138 ---------------------------------------------
141 submit operation. The file offset is treated as the index of the
143 pwrite() system call. If -1 is returned then errno is set to indicate
155 ----
184 - open dax device
185 - call mmap() to get the completion area address
186 - allocate a CCB and fill in the opcode, flags, parameters, addresses, etc.
187 - submit CCB via write() or pwrite()
188 - go into a loop executing monitored load + monitored wait and
191 - perform a CCB_DEQUEUE
192 - call munmap() for completion area
193 - close the dax device
233 -------------
234 A CCB is an array of 8 64-bit words. Several of these words provide
250 each of these fields, and see dax-hv-api.txt for a complete description
251 of the Hypervisor API available to the guest OS (ie, Linux kernel).
254 - CCB version, which must be consistent with hardware version
255 - Opcode, which must be one of the documented allowable commands
256 - Address types, which must be set to "virtual" for all the addresses
261 Example Code
264 The DAX is accessible to both user and kernel code. The kernel code
265 can make hypercalls directly while the user code must use wrappers
268 example of user code is given now, with kernel code afterwards.
290 64-byte aligned and its size must be a multiple of 64 bytes because
307 ccb->control = /* Table 36.1, CCB Header Format */
318 ccb->completion = 0; /* Completion area address, to be filled in by driver */
320 ccb->input0 = (unsigned long) input; /* primary input address */
322 ccb->access = /* Section 36.2.1.2, Data Access Control */
324 | (nbits - 1); /* number of bits in primary input stream, minus 1 */
326 ccb->input1 = 0; /* secondary input address, unused */
328 ccb->op_data = 0; /* scan criteria (value to be matched) */
330 ccb->output = (unsigned long) output; /* output address */
332 ccb->table = 0; /* table address, unused */
364 All other non-zero values indicate error conditions which are
369 /* completion_area[1] contains an error code, see 36.2.2 */
386 --------------
388 The only difference in using the DAX in kernel code is the treatment
390 completion area allocated by the driver, kernel code must allocate its
394 ccb->control |= /* Table 36.1, CCB Header Format */
397 ccb->completion = (unsigned long) completion_area; /* Completion area address */
413 /* hv_rv is an error code, status_data contains */
417 After the submission, the completion area polling code is identical to
435 /* completion_area[1] contains an error code, see 36.2.2 */
444 .. include:: dax-hv-api.txt