Documentation/arch/s390/vfio-ccw.rst

Source file repositories/reference/linux-study-clean/Documentation/arch/s390/vfio-ccw.rst

File Facts

System
Linux kernel
Corpus path
Documentation/arch/s390/vfio-ccw.rst
Extension
.rst
Size
16405 bytes
Lines
446
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ccw_io_region {
  #define ORB_AREA_SIZE 12
	  __u8    orb_area[ORB_AREA_SIZE];
  #define SCSW_AREA_SIZE 12
	  __u8    scsw_area[SCSW_AREA_SIZE];
  #define IRB_AREA_SIZE 96
	  __u8    irb_area[IRB_AREA_SIZE];
	  __u32   ret_code;
  } __packed;

This region is always available.

While starting an I/O request, orb_area should be filled with the
guest ORB, and scsw_area should be filled with the SCSW of the Virtual
Subchannel.

irb_area stores the I/O result.

ret_code stores a return code for each access of the region. The following
values may occur:

``0``
  The operation was successful.

``-EOPNOTSUPP``
  The ORB specified transport mode or the
  SCSW specified a function other than the start function.

``-EIO``
  A request was issued while the device was not in a state ready to accept
  requests, or an internal error occurred.

``-EBUSY``
  The subchannel was status pending or busy, or a request is already active.

``-EAGAIN``
  A request was being processed, and the caller should retry.

``-EACCES``
  The channel path(s) used for the I/O were found to be not operational.

``-ENODEV``
  The device was found to be not operational.

``-EINVAL``
  The orb specified a chain longer than 255 ccws, or an internal error
  occurred.


vfio-ccw cmd region
-------------------

The vfio-ccw cmd region is used to accept asynchronous instructions
from userspace::

  #define VFIO_CCW_ASYNC_CMD_HSCH (1 << 0)
  #define VFIO_CCW_ASYNC_CMD_CSCH (1 << 1)
  struct ccw_cmd_region {
         __u32 command;
         __u32 ret_code;
  } __packed;

This region is exposed via region type VFIO_REGION_SUBTYPE_CCW_ASYNC_CMD.

Currently, CLEAR SUBCHANNEL and HALT SUBCHANNEL use this region.

command specifies the command to be issued; ret_code stores a return code
for each access of the region. The following values may occur:

``0``

Annotation

Implementation Notes