mic_ioctl.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Intel MIC Platform Software Stack (MPSS)
  3. *
  4. * Copyright(c) 2013 Intel Corporation.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License, version 2, as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. *
  15. * The full GNU General Public License is included in this distribution in
  16. * the file called "COPYING".
  17. *
  18. * Intel MIC Host driver.
  19. *
  20. */
  21. #ifndef _MIC_IOCTL_H_
  22. #define _MIC_IOCTL_H_
  23. #include <linux/types.h>
  24. /*
  25. * mic_copy - MIC virtio descriptor copy.
  26. *
  27. * @iov: An array of IOVEC structures containing user space buffers.
  28. * @iovcnt: Number of IOVEC structures in iov.
  29. * @vr_idx: The vring index.
  30. * @update_used: A non zero value results in used index being updated.
  31. * @out_len: The aggregate of the total length written to or read from
  32. * the virtio device.
  33. */
  34. struct mic_copy_desc {
  35. struct iovec *iov;
  36. __u32 iovcnt;
  37. __u8 vr_idx;
  38. __u8 update_used;
  39. __u32 out_len;
  40. };
  41. /*
  42. * Add a new virtio device
  43. * The (struct mic_device_desc *) pointer points to a device page entry
  44. * for the virtio device consisting of:
  45. * - struct mic_device_desc
  46. * - struct mic_vqconfig (num_vq of these)
  47. * - host and guest features
  48. * - virtio device config space
  49. * The total size referenced by the pointer should equal the size returned
  50. * by desc_size() in mic_common.h
  51. */
  52. #define MIC_VIRTIO_ADD_DEVICE _IOWR('s', 1, struct mic_device_desc *)
  53. /*
  54. * Copy the number of entries in the iovec and update the used index
  55. * if requested by the user.
  56. */
  57. #define MIC_VIRTIO_COPY_DESC _IOWR('s', 2, struct mic_copy_desc *)
  58. /*
  59. * Notify virtio device of a config change
  60. * The (__u8 *) pointer points to config space values for the device
  61. * as they should be written into the device page. The total size
  62. * referenced by the pointer should equal the config_len field of struct
  63. * mic_device_desc.
  64. */
  65. #define MIC_VIRTIO_CONFIG_CHANGE _IOWR('s', 5, __u8 *)
  66. #endif