hypfs.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Structures for hypfs interface
  3. *
  4. * Copyright IBM Corp. 2013
  5. *
  6. * Author: Martin Schwidefsky <schwidefsky@de.ibm.com>
  7. */
  8. #ifndef _ASM_HYPFS_H
  9. #define _ASM_HYPFS_H
  10. #include <linux/types.h>
  11. /*
  12. * IOCTL for binary interface /sys/kernel/debug/diag_304
  13. */
  14. struct hypfs_diag304 {
  15. __u32 args[2];
  16. __u64 data;
  17. __u64 rc;
  18. } __attribute__((packed));
  19. #define HYPFS_IOCTL_MAGIC 0x10
  20. #define HYPFS_DIAG304 \
  21. _IOWR(HYPFS_IOCTL_MAGIC, 0x20, struct hypfs_diag304)
  22. /*
  23. * Structures for binary interface /sys/kernel/debug/diag_0c
  24. */
  25. struct hypfs_diag0c_hdr {
  26. __u64 len; /* Length of diag0c buffer without header */
  27. __u16 version; /* Version of header */
  28. char reserved1[6]; /* Reserved */
  29. char tod_ext[16]; /* TOD clock for diag0c */
  30. __u64 count; /* Number of entries (CPUs) in diag0c array */
  31. char reserved2[24]; /* Reserved */
  32. };
  33. struct hypfs_diag0c_entry {
  34. char date[8]; /* MM/DD/YY in EBCDIC */
  35. char time[8]; /* HH:MM:SS in EBCDIC */
  36. __u64 virtcpu; /* Virtual time consumed by the virt CPU (us) */
  37. __u64 totalproc; /* Total of virtual and simulation time (us) */
  38. __u32 cpu; /* Linux logical CPU number */
  39. __u32 reserved; /* Align to 8 byte */
  40. };
  41. struct hypfs_diag0c_data {
  42. struct hypfs_diag0c_hdr hdr; /* 64 byte header */
  43. struct hypfs_diag0c_entry entry[]; /* diag0c entry array */
  44. };
  45. #endif