2
0

vfio_ccw.h 836 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * Interfaces for vfio-ccw
  4. *
  5. * Copyright IBM Corp. 2017
  6. *
  7. * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
  8. */
  9. #ifndef _VFIO_CCW_H_
  10. #define _VFIO_CCW_H_
  11. #include <linux/types.h>
  12. /* used for START SUBCHANNEL, always present */
  13. struct ccw_io_region {
  14. #define ORB_AREA_SIZE 12
  15. __u8 orb_area[ORB_AREA_SIZE];
  16. #define SCSW_AREA_SIZE 12
  17. __u8 scsw_area[SCSW_AREA_SIZE];
  18. #define IRB_AREA_SIZE 96
  19. __u8 irb_area[IRB_AREA_SIZE];
  20. __u32 ret_code;
  21. } __attribute__((packed));
  22. /*
  23. * used for processing commands that trigger asynchronous actions
  24. * Note: this is controlled by a capability
  25. */
  26. #define VFIO_CCW_ASYNC_CMD_HSCH (1 << 0)
  27. #define VFIO_CCW_ASYNC_CMD_CSCH (1 << 1)
  28. struct ccw_cmd_region {
  29. __u32 command;
  30. __u32 ret_code;
  31. } __attribute__((packed));
  32. #endif