File indexing completed on 2025-01-30 10:25:34
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef __VKI_XEN_HVM_H
0027 #define __VKI_XEN_HVM_H
0028
0029
0030 #define VKI_XEN_HVMOP_set_param 0
0031 #define VKI_XEN_HVMOP_get_param 1
0032 struct vki_xen_hvm_param {
0033 vki_xen_domid_t domid;
0034 vki_uint32_t index;
0035 vki_uint64_t value;
0036 };
0037
0038 #define VKI_XEN_HVMOP_set_pci_intx_level 2
0039 struct vki_xen_hvm_set_pci_intx_level {
0040 vki_xen_domid_t domid;
0041 vki_uint8_t domain, bus, device, intx;
0042 vki_uint8_t level;
0043 };
0044 typedef struct vki_xen_hvm_set_pci_intx_level vki_xen_hvm_set_pci_intx_level_t;
0045
0046 #define VKI_XEN_HVMOP_set_isa_irq_level 3
0047 struct vki_xen_hvm_set_isa_irq_level {
0048 vki_xen_domid_t domid;
0049 vki_uint8_t isa_irq;
0050 vki_uint8_t level;
0051 };
0052 typedef struct vki_xen_hvm_set_isa_irq_level vki_xen_hvm_set_isa_irq_level_t;
0053
0054 #define VKI_XEN_HVMOP_set_pci_link_route 4
0055 struct vki_xen_hvm_set_pci_link_route {
0056 vki_xen_domid_t domid;
0057 vki_uint8_t link;
0058 vki_uint8_t isa_irq;
0059 };
0060 typedef struct vki_xen_hvm_set_pci_link_route vki_xen_hvm_set_pci_link_route_t;
0061
0062 #define VKI_XEN_HVMOP_track_dirty_vram 6
0063 struct vki_xen_hvm_track_dirty_vram {
0064 vki_xen_domid_t domid;
0065 vki_xen_uint64_aligned_t first_pfn;
0066 vki_xen_uint64_aligned_t nr;
0067 VKI_XEN_GUEST_HANDLE_64(vki_uint8) dirty_bitmap;
0068 };
0069 typedef struct vki_xen_hvm_track_dirty_vram vki_xen_hvm_track_dirty_vram_t;
0070
0071 #define VKI_XEN_HVMOP_set_mem_type 8
0072 struct vki_xen_hvm_set_mem_type {
0073 vki_xen_domid_t domid;
0074 vki_uint16_t hvmmem_type;
0075 vki_uint32_t nr;
0076 vki_uint64_t first_pfn;
0077 };
0078 typedef struct vki_xen_hvm_set_mem_type vki_xen_hvm_set_mem_type_t;
0079
0080 #define VKI_XEN_HVMOP_set_mem_access 12
0081 struct vki_xen_hvm_set_mem_access {
0082 vki_xen_domid_t domid;
0083 vki_uint16_t hvmmem_access;
0084 vki_uint32_t nr;
0085 vki_uint64_t first_pfn;
0086 };
0087 typedef struct vki_xen_hvm_set_mem_access vki_xen_hvm_set_mem_access_t;
0088
0089 #define VKI_XEN_HVMOP_get_mem_access 13
0090 struct vki_xen_hvm_get_mem_access {
0091 vki_xen_domid_t domid;
0092 vki_uint16_t hvmmem_access;
0093 vki_uint64_t pfn;
0094 };
0095 typedef struct vki_xen_hvm_get_mem_access vki_xen_hvm_get_mem_access_t;
0096
0097 #define VKI_XEN_HVMOP_inject_trap 14
0098 struct vki_xen_hvm_inject_trap {
0099 vki_xen_domid_t domid;
0100 vki_uint32_t vcpuid;
0101 vki_uint32_t vector;
0102 vki_uint32_t type;
0103 vki_uint32_t error_code;
0104 vki_uint32_t insn_len;
0105 vki_uint64_t cr2;
0106 };
0107 typedef struct vki_xen_hvm_inject_trap vki_xen_hvm_inject_trap_t;
0108
0109 #define VKI_XEN_HVMOP_altp2m 25
0110 #define VKI_XEN_HVMOP_altp2m_get_domain_state 1
0111 #define VKI_XEN_HVMOP_altp2m_set_domain_state 2
0112 #define VKI_XEN_HVMOP_altp2m_vcpu_enable_notify 3
0113 #define VKI_XEN_HVMOP_altp2m_create_p2m 4
0114 #define VKI_XEN_HVMOP_altp2m_destroy_p2m 5
0115 #define VKI_XEN_HVMOP_altp2m_switch_p2m 6
0116 #define VKI_XEN_HVMOP_altp2m_set_mem_access 7
0117 #define VKI_XEN_HVMOP_altp2m_change_gfn 8
0118 struct vki_xen_hvm_altp2m_domain_state {
0119
0120 vki_uint8_t state;
0121 };
0122 typedef struct vki_xen_hvm_altp2m_domain_state vki_xen_hvm_altp2m_domain_state_t;
0123 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_hvm_altp2m_domain_state_t);
0124
0125 struct vki_xen_hvm_altp2m_vcpu_enable_notify {
0126 vki_uint32_t vcpu_id;
0127 vki_uint32_t pad;
0128
0129 vki_uint64_t gfn;
0130 };
0131 typedef struct vki_xen_hvm_altp2m_vcpu_enable_notify vki_xen_hvm_altp2m_vcpu_enable_notify_t;
0132 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_hvm_altp2m_vcpu_enable_notify_t);
0133
0134 struct vki_xen_hvm_altp2m_view {
0135
0136 vki_uint16_t view;
0137
0138
0139 vki_uint16_t hvmmem_default_access;
0140 };
0141 typedef struct vki_xen_hvm_altp2m_view vki_xen_hvm_altp2m_view_t;
0142 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_hvm_altp2m_view_t);
0143
0144 struct vki_xen_hvm_altp2m_set_mem_access {
0145
0146 vki_uint16_t view;
0147
0148 vki_uint16_t hvmmem_access;
0149 vki_uint32_t pad;
0150
0151 vki_uint64_t gfn;
0152 };
0153 typedef struct vki_xen_hvm_altp2m_set_mem_access vki_xen_hvm_altp2m_set_mem_access_t;
0154 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_hvm_altp2m_set_mem_access_t);
0155
0156 struct vki_xen_hvm_altp2m_change_gfn {
0157
0158 vki_uint16_t view;
0159 vki_uint16_t pad1;
0160 vki_uint32_t pad2;
0161
0162 vki_uint64_t old_gfn;
0163
0164 vki_uint64_t new_gfn;
0165 };
0166 typedef struct vki_xen_hvm_altp2m_change_gfn vki_xen_hvm_altp2m_change_gfn_t;
0167 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_hvm_altp2m_change_gfn_t);
0168
0169 struct vki_xen_hvm_altp2m_op {
0170 vki_uint32_t version;
0171 vki_uint32_t cmd;
0172 vki_xen_domid_t domain;
0173 vki_uint16_t pad1;
0174 vki_uint32_t pad2;
0175 union {
0176 struct vki_xen_hvm_altp2m_domain_state domain_state;
0177 struct vki_xen_hvm_altp2m_vcpu_enable_notify enable_notify;
0178 struct vki_xen_hvm_altp2m_view view;
0179 struct vki_xen_hvm_altp2m_set_mem_access set_mem_access;
0180 struct vki_xen_hvm_altp2m_change_gfn change_gfn;
0181 vki_uint8_t pad[64];
0182 } u;
0183 };
0184 typedef struct vki_xen_hvm_altp2m_op vki_xen_hvm_altp2m_op_t;
0185 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_hvm_altp2m_op_t);
0186
0187 #endif
0188
0189
0190
0191