2 This file is part of Valgrind, a dynamic binary instrumentation
5 Copyright (C) 2012-2017 Citrix
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22 The GNU General Public License is contained in the file COPYING.
25 /* Contributed by Andrew Cooper <andrew.cooper3@citrix.com>
26 and Ian Campbell <ian.campbell@citrix.com> */
28 #ifndef __VKI_XEN_DOMCTL_H
29 #define __VKI_XEN_DOMCTL_H
32 * The domctl interface is versioned via the interface_version
33 * field. This structures in this header supports domctl interfaces:
35 * - 0x00000007: Xen 4.1
36 * - 0x00000008: Xen 4.2
37 * - 0x00000009: Xen 4.3 & 4.4
38 * - 0x0000000a: Xen 4.5
39 * - 0x0000000b: Xen 4.6
40 * - 0x0000000c: Xen 4.7
42 * When adding a new subop be sure to include the variants used by all
43 * of the above, both here and in syswrap-xen.c
45 * Structs which are identical in all supported versions have no
46 * version suffix. Structs which do differ are defined multiple times
47 * and use the suffix of the latest version to contain that particular
51 #define VKI_XEN_DOMCTL_createdomain 1
52 #define VKI_XEN_DOMCTL_destroydomain 2
53 #define VKI_XEN_DOMCTL_pausedomain 3
54 #define VKI_XEN_DOMCTL_unpausedomain 4
55 #define VKI_XEN_DOMCTL_getdomaininfo 5
56 #define VKI_XEN_DOMCTL_getmemlist 6
57 #define VKI_XEN_DOMCTL_getpageframeinfo 7
58 #define VKI_XEN_DOMCTL_getpageframeinfo2 8
59 #define VKI_XEN_DOMCTL_setvcpuaffinity 9
60 #define VKI_XEN_DOMCTL_shadow_op 10
61 #define VKI_XEN_DOMCTL_max_mem 11
62 #define VKI_XEN_DOMCTL_setvcpucontext 12
63 #define VKI_XEN_DOMCTL_getvcpucontext 13
64 #define VKI_XEN_DOMCTL_getvcpuinfo 14
65 #define VKI_XEN_DOMCTL_max_vcpus 15
66 #define VKI_XEN_DOMCTL_scheduler_op 16
67 #define VKI_XEN_DOMCTL_setdomainhandle 17
68 #define VKI_XEN_DOMCTL_setdebugging 18
69 #define VKI_XEN_DOMCTL_irq_permission 19
70 #define VKI_XEN_DOMCTL_iomem_permission 20
71 #define VKI_XEN_DOMCTL_ioport_permission 21
72 #define VKI_XEN_DOMCTL_hypercall_init 22
73 #define VKI_XEN_DOMCTL_arch_setup 23
74 #define VKI_XEN_DOMCTL_settimeoffset 24
75 #define VKI_XEN_DOMCTL_getvcpuaffinity 25
76 #define VKI_XEN_DOMCTL_real_mode_area 26
77 #define VKI_XEN_DOMCTL_resumedomain 27
78 #define VKI_XEN_DOMCTL_sendtrigger 28
79 #define VKI_XEN_DOMCTL_subscribe 29
80 #define VKI_XEN_DOMCTL_gethvmcontext 33
81 #define VKI_XEN_DOMCTL_sethvmcontext 34
82 #define VKI_XEN_DOMCTL_set_address_size 35
83 #define VKI_XEN_DOMCTL_get_address_size 36
84 #define VKI_XEN_DOMCTL_assign_device 37
85 #define VKI_XEN_DOMCTL_bind_pt_irq 38
86 #define VKI_XEN_DOMCTL_memory_mapping 39
87 #define VKI_XEN_DOMCTL_ioport_mapping 40
88 #define VKI_XEN_DOMCTL_pin_mem_cacheattr 41
89 #define VKI_XEN_DOMCTL_set_ext_vcpucontext 42
90 #define VKI_XEN_DOMCTL_get_ext_vcpucontext 43
91 #define VKI_XEN_DOMCTL_set_opt_feature 44 /*Obsolete IA64 only */
92 #define VKI_XEN_DOMCTL_test_assign_device 45
93 #define VKI_XEN_DOMCTL_set_target 46
94 #define VKI_XEN_DOMCTL_deassign_device 47
95 #define VKI_XEN_DOMCTL_unbind_pt_irq 48
96 #define VKI_XEN_DOMCTL_set_cpuid 49
97 #define VKI_XEN_DOMCTL_get_device_group 50
98 #define VKI_XEN_DOMCTL_set_machine_address_size 51
99 #define VKI_XEN_DOMCTL_get_machine_address_size 52
100 #define VKI_XEN_DOMCTL_suppress_spurious_page_faults 53
101 #define VKI_XEN_DOMCTL_debug_op 54
102 #define VKI_XEN_DOMCTL_gethvmcontext_partial 55
103 #define VKI_XEN_DOMCTL_mem_event_op 56
104 #define VKI_XEN_DOMCTL_vm_event_op 56 /* name change in 4.6 */
105 #define VKI_XEN_DOMCTL_mem_sharing_op 57
106 #define VKI_XEN_DOMCTL_disable_migrate 58
107 #define VKI_XEN_DOMCTL_gettscinfo 59
108 #define VKI_XEN_DOMCTL_settscinfo 60
109 #define VKI_XEN_DOMCTL_getpageframeinfo3 61
110 #define VKI_XEN_DOMCTL_setvcpuextstate 62
111 #define VKI_XEN_DOMCTL_getvcpuextstate 63
112 #define VKI_XEN_DOMCTL_set_access_required 64
113 #define VKI_XEN_DOMCTL_audit_p2m 65
114 #define VKI_XEN_DOMCTL_set_virq_handler 66
115 #define VKI_XEN_DOMCTL_set_broken_page_p2m 67
116 #define VKI_XEN_DOMCTL_setnodeaffinity 68
117 #define VKI_XEN_DOMCTL_getnodeaffinity 69
118 #define VKI_XEN_DOMCTL_set_max_evtchn 70
119 #define VKI_XEN_DOMCTL_cacheflush 71
120 #define VKI_XEN_DOMCTL_get_vcpu_msrs 72
121 #define VKI_XEN_DOMCTL_set_vcpu_msrs 73
122 #define VKI_XEN_DOMCTL_monitor_op 77 /* new in 4.6 */
123 #define VKI_XEN_DOMCTL_gdbsx_guestmemio 1000
124 #define VKI_XEN_DOMCTL_gdbsx_pausevcpu 1001
125 #define VKI_XEN_DOMCTL_gdbsx_unpausevcpu 1002
126 #define VKI_XEN_DOMCTL_gdbsx_domstatus 1003
128 struct vki_xen_domctl_createdomain
{
130 vki_uint32_t ssidref
;
131 vki_xen_domain_handle_t handle
;
135 struct vki_xen_domctl_getdomaininfo_00000007
{
137 vki_xen_domid_t domain
;
139 vki_xen_uint64_aligned_t tot_pages
;
140 vki_xen_uint64_aligned_t max_pages
;
141 vki_xen_uint64_aligned_t shr_pages
;
142 vki_xen_uint64_aligned_t paged_pages
;
143 vki_xen_uint64_aligned_t shared_info_frame
;
144 vki_xen_uint64_aligned_t cpu_time
;
145 vki_uint32_t nr_online_vcpus
;
146 vki_uint32_t max_vcpu_id
;
147 vki_uint32_t ssidref
;
148 vki_xen_domain_handle_t handle
;
149 vki_uint32_t cpupool
;
151 typedef struct vki_xen_domctl_getdomaininfo_00000007 vki_xen_domctl_getdomaininfo_00000007_t
;
152 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_domctl_getdomaininfo_00000007_t
);
154 struct vki_xen_domctl_getdomaininfo_00000008
{
156 vki_xen_domid_t domain
;
158 vki_xen_uint64_aligned_t tot_pages
;
159 vki_xen_uint64_aligned_t max_pages
;
160 vki_xen_uint64_aligned_t shr_pages
;
161 vki_xen_uint64_aligned_t paged_pages
;
162 vki_xen_uint64_aligned_t shared_info_frame
;
163 vki_xen_uint64_aligned_t cpu_time
;
164 vki_uint32_t nr_online_vcpus
;
165 vki_uint32_t max_vcpu_id
;
166 vki_uint32_t ssidref
;
167 vki_xen_domain_handle_t handle
;
168 vki_uint32_t cpupool
;
170 typedef struct vki_xen_domctl_getdomaininfo_00000008 vki_xen_domctl_getdomaininfo_00000008_t
;
171 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_domctl_getdomaininfo_00000008_t
);
173 struct vki_xen_domctl_getdomaininfo_00000009
{
175 vki_xen_domid_t domain
;
177 vki_xen_uint64_aligned_t tot_pages
;
178 vki_xen_uint64_aligned_t max_pages
;
179 vki_xen_uint64_aligned_t outstanding_pages
;
180 vki_xen_uint64_aligned_t shr_pages
;
181 vki_xen_uint64_aligned_t paged_pages
;
182 vki_xen_uint64_aligned_t shared_info_frame
;
183 vki_xen_uint64_aligned_t cpu_time
;
184 vki_uint32_t nr_online_vcpus
;
185 vki_uint32_t max_vcpu_id
;
186 vki_uint32_t ssidref
;
187 vki_xen_domain_handle_t handle
;
188 vki_uint32_t cpupool
;
190 typedef struct vki_xen_domctl_getdomaininfo_00000009 vki_xen_domctl_getdomaininfo_00000009_t
;
191 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_domctl_getdomaininfo_00000009_t
);
193 /* vki_xen_domctl_getdomaininfo_0000000a is the same as 00000009 */
195 /* Get/set the NUMA node(s) with which the guest has affinity with. */
196 /* XEN_DOMCTL_setnodeaffinity */
197 /* XEN_DOMCTL_getnodeaffinity */
198 struct vki_xen_domctl_nodeaffinity
{
199 struct vki_xenctl_bitmap nodemap
;/* IN */
201 typedef struct vki_xen_domctl_nodeaffinity vki_xen_domctl_nodeaffinity_t
;
202 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_domctl_nodeaffinity_t
);
204 struct vki_xen_domctl_getpageframeinfo3
{
205 vki_xen_uint64_aligned_t num
; /* IN */
206 VKI_XEN_GUEST_HANDLE_64(vki_xen_pfn_t
) array
; /* IN/OUT */
209 struct vki_xen_domctl_vcpuaffinity_00000009
{
210 vki_uint32_t vcpu
; /* IN */
211 struct vki_xenctl_bitmap cpumap
; /* IN/OUT */
214 struct vki_xen_domctl_vcpuaffinity_0000000a
{
215 vki_uint32_t vcpu
; /* IN */
216 #define VKI_XEN_VCPUAFFINITY_HARD (1U<<0)
217 #define VKI_XEN_VCPUAFFINITY_SOFT (1U<<1)
218 vki_uint32_t flags
; /* IN */
219 struct vki_xenctl_bitmap cpumap_hard
; /* IN/OUT */
220 struct vki_xenctl_bitmap cpumap_soft
; /* IN/OUT */
223 struct vki_xen_domctl_shadow_op_stats
{
224 vki_uint32_t fault_count
;
225 vki_uint32_t dirty_count
;
228 /* vki_xen_domctl_shadow_op.op is an utter mess for compatibily reasons. */
230 struct vki_xen_domctl_shadow_op
{
231 vki_uint32_t op
; /* IN */
233 #define VKI_XEN_DOMCTL_SHADOW_OP_OFF 0
234 #define VKI_XEN_DOMCTL_SHADOW_OP_ENABLE 32
235 #define VKI_XEN_DOMCTL_SHADOW_OP_CLEAN 11
236 #define VKI_XEN_DOMCTL_SHADOW_OP_PEEK 12
237 #define VKI_XEN_DOMCTL_SHADOW_OP_GET_ALLOCATION 30
238 #define VKI_XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION 31
240 #define VKI_XEN_DOMCTL_SHADOW_OP_ENABLE_TEST 1
241 #define VKI_XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY 2
242 #define VKI_XEN_DOMCTL_SHADOW_OP_ENABLE_TRANSLATE 3
246 #define XEN_DOMCTL_SHADOW_ENABLE_REFCOUNT (1 << 1)
247 #define XEN_DOMCTL_SHADOW_ENABLE_LOG_DIRTY (1 << 2)
248 #define XEN_DOMCTL_SHADOW_ENABLE_TRANSLATE (1 << 3)
249 #define XEN_DOMCTL_SHADOW_ENABLE_EXTERNAL (1 << 4)
252 VKI_XEN_GUEST_HANDLE_64(vki_uint8
) dirty_bitmap
;
253 vki_xen_uint64_aligned_t pages
;
254 struct vki_xen_domctl_shadow_op_stats stats
;
257 struct vki_xen_domctl_max_mem
{
259 vki_xen_uint64_aligned_t max_memkb
;
262 struct vki_xen_domctl_vcpucontext
{
263 vki_uint32_t vcpu
; /* IN */
264 VKI_XEN_GUEST_HANDLE_64(vki_xen_vcpu_guest_context_t
) ctxt
; /* IN/OUT */
267 struct vki_xen_domctl_getvcpuinfo
{
271 vki_uint8_t online
; /* currently online (not hotplugged)? */
272 vki_uint8_t blocked
; /* blocked waiting for an event? */
273 vki_uint8_t running
; /* currently scheduled on its CPU? */
274 vki_xen_uint64_aligned_t cpu_time
;/* total cpu time consumed (ns) */
275 vki_uint32_t cpu
; /* current mapping */
278 struct vki_xen_domctl_scheduler_op
{
279 vki_uint32_t sched_id
; /* VKI_XEN_SCHEDULER_* */
280 #define VKI_XEN_SCHEDULER_SEDF 4
281 #define VKI_XEN_SCHEDULER_CREDIT 5
282 #define VKI_XEN_SCHEDULER_CREDIT2 6
283 #define VKI_XEN_SCHEDULER_ARINC653 7
284 #define VKI_XEN_SCHEDULER_RTDS 8
285 vki_uint32_t cmd
; /* VKI_XEN_DOMCTL_SCHEDOP_* */
286 #define VKI_XEN_DOMCTL_SCHEDOP_putinfo 0
287 #define VKI_XEN_DOMCTL_SCHEDOP_getinfo 1
289 struct xen_domctl_sched_sedf
{
290 vki_xen_uint64_aligned_t period
;
291 vki_xen_uint64_aligned_t slice
;
292 vki_xen_uint64_aligned_t latency
;
293 vki_uint32_t extratime
;
296 struct xen_domctl_sched_credit
{
300 struct xen_domctl_sched_credit2
{
303 struct xen_domctl_sched_rtds
{
310 struct vki_xen_domctl_max_vcpus
{
311 vki_uint32_t max
; /* maximum number of vcpus */
314 /* XEN_DOMCTL_irq_permission */
315 struct vki_xen_domctl_irq_permission
{
317 vki_uint8_t allow_access
; /* flag to specify enable/disable of IRQ access */
320 struct vki_xen_domctl_iomem_permission
{
321 vki_xen_uint64_aligned_t first_mfn
;/* first page (physical page number) in range */
322 vki_xen_uint64_aligned_t nr_mfns
; /* number of pages in range (>0) */
323 vki_uint8_t allow_access
; /* allow (!0) or deny (0) access to range? */
326 struct vki_xen_domctl_ioport_permission
{
327 vki_uint32_t first_port
; /* IN */
328 vki_uint32_t nr_ports
; /* IN */
329 vki_uint8_t allow_access
; /* IN */
332 struct vki_xen_domctl_hypercall_init
{
333 vki_xen_uint64_aligned_t gmfn
; /* GMFN to be initialised */
336 struct vki_xen_domctl_settimeoffset
{
337 vki_int32_t time_offset_seconds
;
340 struct vki_xen_domctl_cpuid
{
341 vki_uint32_t input
[2];
348 struct vki_xen_guest_tsc_info
{
349 vki_uint32_t tsc_mode
;
350 vki_uint32_t gtsc_khz
;
351 vki_uint32_t incarnation
;
353 vki_xen_uint64_aligned_t elapsed_nsec
;
355 typedef struct vki_xen_guest_tsc_info vki_xen_guest_tsc_info_t
;
356 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_guest_tsc_info_t
);
358 struct vki_xen_domctl_tsc_info_00000007
{
359 VKI_XEN_GUEST_HANDLE_64(vki_xen_guest_tsc_info_t
) out_info
; /* OUT */
360 vki_xen_guest_tsc_info_t info
; /* IN */
363 /* 4.6 removed the output pointer */
364 struct vki_xen_domctl_tsc_info_0000000b
{
366 vki_uint32_t tsc_mode
;
367 vki_uint32_t gtsc_khz
;
368 vki_uint32_t incarnation
;
370 vki_xen_uint64_aligned_t elapsed_nsec
;
374 struct vki_xen_domctl_hvmcontext
{
375 vki_uint32_t size
; /* IN/OUT size of buffer */
376 VKI_XEN_GUEST_HANDLE_64(vki_uint8
) buffer
; /* IN/OUT */
378 typedef struct vki_xen_domctl_hvmcontext vki_xen_domctl_hvmcontext_t
;
379 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_domctl_hvmcontext_t
);
381 struct vki_xen_domctl_hvmcontext_partial
{
382 vki_uint32_t type
; /* IN */
383 vki_uint32_t instance
; /* IN */
384 VKI_XEN_GUEST_HANDLE_64(vki_uint8
) buffer
; /* IN/OUT buffer */
386 typedef struct vki_xen_domctl_hvmcontext_partial vki_xen_domctl_hvmcontext_partial_t
;
387 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_domctl_hvmcontext_partial_t
);
390 struct vki_xen_domctl_pin_mem_cacheattr
{
391 vki_xen_uint64_aligned_t start
, end
; /* IN */
392 vki_uint32_t type
; /* IN */
395 struct vki_xen_domctl_ext_vcpucontext_00000008
{
396 vki_uint32_t vcpu
; /* IN */
398 /* IN for XEN_DOMCTL_set_ext_vcpucontext
399 * OUT for XEN_DOMCTL_get_ext_vcpucontext */
401 #if defined(__i386__) || defined(__x86_64__)
402 vki_xen_uint64_aligned_t syscall32_callback_eip
;
403 vki_xen_uint64_aligned_t sysenter_callback_eip
;
404 vki_uint16_t syscall32_callback_cs
;
405 vki_uint16_t sysenter_callback_cs
;
406 vki_uint8_t syscall32_disables_events
;
407 vki_uint8_t sysenter_disables_events
;
408 vki_xen_uint64_aligned_t mcg_cap
;
412 struct vki_xen_domctl_ext_vcpucontext_00000009
{
413 vki_uint32_t vcpu
; /* IN */
415 /* IN for XEN_DOMCTL_set_ext_vcpucontext
416 * OUT for XEN_DOMCTL_get_ext_vcpucontext */
418 #if defined(__i386__) || defined(__x86_64__)
419 vki_xen_uint64_aligned_t syscall32_callback_eip
;
420 vki_xen_uint64_aligned_t sysenter_callback_eip
;
421 vki_uint16_t syscall32_callback_cs
;
422 vki_uint16_t sysenter_callback_cs
;
423 vki_uint8_t syscall32_disables_events
;
424 vki_uint8_t sysenter_disables_events
;
426 vki_uint64_t mci_ctl2_bank0
;
427 vki_uint64_t mci_ctl2_bank1
;
431 /* vki_xen_domctl_ext_vcpucontext_0000000a is the same as 00000009 */
433 struct vki_xen_domctl_vcpuextstate
{
435 vki_xen_uint64_aligned_t xfeature_mask
;
436 vki_xen_uint64_aligned_t size
;
437 VKI_XEN_GUEST_HANDLE_64(vki_uint64
) buffer
;
440 struct vki_xen_domctl_address_size
{
444 /* vki_xen_domctl_assign_device_00000007 is the same up to version 0x0000000b */
445 struct vki_xen_domctl_assign_device_00000007
{
446 vki_uint32_t machine_sbdf
; /* machine PCI ID of assigned device */
449 #define VKI_XEN_DOMCTL_DEV_PCI 0
450 #define VKI_XEN_DOMCTL_DEV_DT 1
451 struct vki_xen_domctl_assign_device_0000000b
{
452 vki_uint32_t dev
; /* XEN_DOMCTL_DEV_* */
455 vki_uint32_t machine_sbdf
; /* machine PCI ID of assigned device */
458 vki_uint32_t size
; /* Length of the path */
459 VKI_XEN_GUEST_HANDLE_64(vki_uint8
) path
; /* path to the device tree node */
463 //#define XEN_DOMCTL_DEV_RDM_RELAXED 1
464 vki_uint32_t flag
; /* flag of assigned device */
467 struct vki_xen_domctl_debug_op
{
468 vki_uint32_t op
; /* IN */
469 vki_uint32_t vcpu
; /* IN */
471 typedef struct vki_xen_domctl_debug_op vki_xen_domctl_debug_op_t
;
473 struct vki_xen_domctl_mem_event_op_00000007
{
474 vki_uint32_t op
; /* IN */
475 vki_uint32_t mode
; /* IN */
476 vki_uint32_t port
; /* OUT */
479 /* only a name change in 4.6 */
480 typedef struct vki_xen_domctl_mem_event_op_00000007 vki_xen_domctl_vm_event_op_0000000b
;
482 struct vki_xen_domctl_set_access_required
{
483 vki_uint8_t access_required
; /* IN */
486 struct vki_xen_domctl_set_max_evtchn
{
487 vki_uint32_t max_port
;
490 struct vki_xen_domctl_cacheflush
{
491 /* IN: page range to flush. */
492 vki_xen_pfn_t start_pfn
, nr_pfns
;
495 struct vki_xen_domctl_vcpu_msr
{
497 vki_uint32_t reserved
;
498 vki_xen_uint64_aligned_t value
;
500 typedef struct vki_xen_domctl_vcpu_msr vki_xen_domctl_vcpu_msr_t
;
501 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_domctl_vcpu_msr_t
);
503 struct vki_xen_domctl_vcpu_msrs
{
505 vki_uint32_t msr_count
;
506 VKI_XEN_GUEST_HANDLE_64(vki_xen_domctl_vcpu_msr_t
) msrs
;
509 #define VKI_XEN_DOMCTL_MONITOR_OP_ENABLE 0
510 #define VKI_XEN_DOMCTL_MONITOR_OP_DISABLE 1
511 #define VKI_XEN_DOMCTL_MONITOR_OP_GET_CAPABILITIES 2
513 #define VKI_XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG 0
514 #define VKI_XEN_DOMCTL_MONITOR_EVENT_MOV_TO_MSR 1
515 #define VKI_XEN_DOMCTL_MONITOR_EVENT_SINGLESTEP 2
516 #define VKI_XEN_DOMCTL_MONITOR_EVENT_SOFTWARE_BREAKPOINT 3
517 #define VKI_XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST 4
519 struct vki_xen_domctl_monitor_op_0000000b
{
520 vki_uint32_t op
; /* vki_xen_DOMCTL_MONITOR_OP_* */
523 * When used with ENABLE/DISABLE this has to be set to
524 * the requested vki_xen_DOMCTL_MONITOR_EVENT_* value.
525 * With GET_CAPABILITIES this field returns a bitmap of
526 * events supported by the platform, in the format
527 * (1 << vki_xen_DOMCTL_MONITOR_EVENT_*).
532 * Further options when issuing vki_xen_DOMCTL_MONITOR_OP_ENABLE.
536 /* Which control register */
538 /* Pause vCPU until response */
540 /* Send event only on a change of value */
541 vki_uint8_t onchangeonly
;
545 /* Enable the capture of an extended set of MSRs */
546 vki_uint8_t extended_capture
;
550 /* Pause vCPU until response */
557 struct vki_xen_domctl_monitor_op
{
559 #define VKI_XEN_DOMCTL_MONITOR_OP_ENABLE 0
560 #define VKI_XEN_DOMCTL_MONITOR_OP_DISABLE 1
561 #define VKI_XEN_DOMCTL_MONITOR_OP_GET_CAPABILITIES 2
562 #define VKI_XEN_DOMCTL_MONITOR_OP_EMULATE_EACH_REP 3
568 vki_uint8_t onchangeonly
;
571 vki_uint8_t extended_capture
;
579 struct vki_xen_domctl
{
581 vki_uint32_t interface_version
; /* XEN_DOMCTL_INTERFACE_VERSION */
582 vki_xen_domid_t domain
;
584 struct vki_xen_domctl_createdomain createdomain
;
585 struct vki_xen_domctl_getdomaininfo_00000007 getdomaininfo_00000007
;
586 struct vki_xen_domctl_getdomaininfo_00000008 getdomaininfo_00000008
;
587 struct vki_xen_domctl_getdomaininfo_00000009 getdomaininfo_00000009
;
588 //struct vki_xen_domctl_getmemlist getmemlist;
589 //struct vki_xen_domctl_getpageframeinfo getpageframeinfo;
590 //struct vki_xen_domctl_getpageframeinfo2 getpageframeinfo2;
591 struct vki_xen_domctl_getpageframeinfo3 getpageframeinfo3
;
592 struct vki_xen_domctl_nodeaffinity nodeaffinity
;
593 struct vki_xen_domctl_vcpuaffinity_00000009 vcpuaffinity_00000009
;
594 struct vki_xen_domctl_vcpuaffinity_0000000a vcpuaffinity_0000000a
;
595 struct vki_xen_domctl_shadow_op shadow_op
;
596 struct vki_xen_domctl_max_mem max_mem
;
597 struct vki_xen_domctl_vcpucontext vcpucontext
;
598 struct vki_xen_domctl_getvcpuinfo getvcpuinfo
;
599 struct vki_xen_domctl_max_vcpus max_vcpus
;
600 struct vki_xen_domctl_scheduler_op scheduler_op
;
601 //struct vki_xen_domctl_setdomainhandle setdomainhandle;
602 //struct vki_xen_domctl_setdebugging setdebugging;
603 struct vki_xen_domctl_irq_permission irq_permission
;
604 struct vki_xen_domctl_iomem_permission iomem_permission
;
605 struct vki_xen_domctl_ioport_permission ioport_permission
;
606 struct vki_xen_domctl_hypercall_init hypercall_init
;
607 //struct vki_xen_domctl_arch_setup arch_setup;
608 struct vki_xen_domctl_settimeoffset settimeoffset
;
609 //struct vki_xen_domctl_disable_migrate disable_migrate;
610 struct vki_xen_domctl_tsc_info_00000007 tsc_info_00000007
;
611 struct vki_xen_domctl_tsc_info_0000000b tsc_info_0000000b
;
612 //struct vki_xen_domctl_real_mode_area real_mode_area;
613 struct vki_xen_domctl_hvmcontext hvmcontext
;
614 struct vki_xen_domctl_hvmcontext_partial hvmcontext_partial
;
615 struct vki_xen_domctl_address_size address_size
;
616 //struct vki_xen_domctl_sendtrigger sendtrigger;
617 //struct vki_xen_domctl_get_device_group get_device_group;
618 struct vki_xen_domctl_assign_device_00000007 assign_device_00000007
;
619 struct vki_xen_domctl_assign_device_0000000b assign_device_0000000b
;
620 //struct vki_xen_domctl_bind_pt_irq bind_pt_irq;
621 //struct vki_xen_domctl_memory_mapping memory_mapping;
622 //struct vki_xen_domctl_ioport_mapping ioport_mapping;
623 struct vki_xen_domctl_pin_mem_cacheattr pin_mem_cacheattr
;
624 struct vki_xen_domctl_ext_vcpucontext_00000008 ext_vcpucontext_00000008
;
625 struct vki_xen_domctl_ext_vcpucontext_00000009 ext_vcpucontext_00000009
;
626 //struct vki_xen_domctl_set_target set_target;
627 //struct vki_xen_domctl_subscribe subscribe;
628 struct vki_xen_domctl_debug_op debug_op
;
629 struct vki_xen_domctl_mem_event_op_00000007 mem_event_op_00000007
;
630 vki_xen_domctl_vm_event_op_0000000b vm_event_op_0000000b
;
631 //struct vki_xen_domctl_mem_sharing_op mem_sharing_op;
632 #if defined(__i386__) || defined(__x86_64__)
633 struct vki_xen_domctl_cpuid cpuid
;
634 struct vki_xen_domctl_vcpuextstate vcpuextstate
;
635 struct vki_xen_domctl_vcpu_msrs vcpu_msrs
;
637 struct vki_xen_domctl_set_access_required access_required
;
638 //struct vki_xen_domctl_audit_p2m audit_p2m;
639 //struct vki_xen_domctl_set_virq_handler set_virq_handler;
640 struct vki_xen_domctl_set_max_evtchn set_max_evtchn
;
641 //struct vki_xen_domctl_gdbsx_memio gdbsx_guest_memio;
642 //struct vki_xen_domctl_set_broken_page_p2m set_broken_page_p2m;
643 struct vki_xen_domctl_cacheflush cacheflush
;
644 //struct vki_xen_domctl_gdbsx_pauseunp_vcpu gdbsx_pauseunp_vcpu;
645 //struct vki_xen_domctl_gdbsx_domstatus gdbsx_domstatus;
646 struct vki_xen_domctl_monitor_op_0000000b monitor_op_0000000b
;
647 vki_uint8_t pad
[128];
651 #endif // __VKI_XEN_DOMCTL_H
653 /*--------------------------------------------------------------------*/
655 /*--------------------------------------------------------------------*/