hv_kernel_structs_xnu_20_6.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #pragma once
  2. #include <Hypervisor/Hypervisor.h>
  3. // Headers extracted from
  4. // Kernel_Debug_Kit_11.6.5_build_20G527.dmg
  5. // type lookup hv_vcpu_t
  6. // type lookup arm_guest_context_t
  7. #import "hv_kernel_structs_xnu_20_4.h"
  8. typedef struct {
  9. uint64_t hcr_el2;
  10. uint64_t hacr_el2;
  11. uint64_t cptr_el2;
  12. uint64_t mdcr_el2;
  13. uint64_t vmpidr_el2;
  14. uint64_t vpidr_el2;
  15. uint64_t virtual_timer_offset;
  16. uint64_t ich_hcr_el2;
  17. uint64_t hfgrtr_el2;
  18. uint64_t hfgwtr_el2;
  19. uint64_t hfgitr_el2;
  20. uint64_t hdfgrtr_el2;
  21. uint64_t hdfgwtr_el2;
  22. uint64_t timer;
  23. uint64_t vmkeyhi_el2;
  24. uint64_t vmkeylo_el2;
  25. uint64_t apsts_el1;
  26. uint64_t host_debug;
  27. } arm_guest_controls_20_6_t;
  28. typedef union {
  29. struct {
  30. union {
  31. // arm_context_t guest_context;
  32. struct {
  33. uint64_t res1[1];
  34. struct {
  35. uint64_t x[29];
  36. uint64_t fp;
  37. uint64_t lr;
  38. uint64_t sp;
  39. uint64_t pc;
  40. uint32_t cpsr;
  41. uint32_t pad;
  42. } regs;
  43. uint64_t res2[4];
  44. struct {
  45. __uint128_t q[32];
  46. uint32_t fpsr;
  47. uint32_t fpcr;
  48. } neon;
  49. };
  50. };
  51. arm_guest_shared_sysregs_20_t shared_sysregs;
  52. arm_guest_banked_sysregs_20_t banked_sysregs;
  53. arm_guest_dbgregs_20_t dbgregs;
  54. volatile arm_guest_controls_20_6_t controls;
  55. volatile uint64_t state_dirty;
  56. uint64_t guest_tick_count;
  57. arm_guest_extregs_20_t extregs;
  58. arm_vncr_context_20_t vncr;
  59. apple_vncr_context_20_t avncr;
  60. };
  61. uint8_t page[16384];
  62. } arm_guest_rw_context_20_6_t;
  63. typedef union {
  64. struct {
  65. uint64_t ver;
  66. arm_guest_vmexit_20_t exit;
  67. arm_guest_controls_20_6_t controls;
  68. uint64_t state_valid;
  69. uint64_t state_dirty;
  70. };
  71. uint8_t page[16384];
  72. } arm_guest_ro_context_20_6_t;
  73. typedef struct {
  74. arm_guest_rw_context_20_6_t rw;
  75. arm_guest_ro_context_20_6_t ro;
  76. arm_host_context_20_t priv;
  77. } arm_guest_context_20_6_t;
  78. #define HV_XNU_20_6_MAGIC (HV_XNU_20_4_MAGIC)
  79. #define HV_VERSION_XNU_20_6 (206)