ia64/xen-unstable

view xen/include/public/domctl.h @ 16475:1de4e5056394

[IA64] Create XEN_DOMCTL_set_opt_feature

Intended for domain builder code to be able to set architecture
specific optimization features for a domain.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Acked-by: Keir Fraser <keir.fraser@citrix.com>
author Alex Williamson <alex.williamson@hp.com>
date Thu Nov 29 11:57:23 2007 -0700 (2007-11-29)
parents 168beb9a27a5
children dad243d08849
line source
1 /******************************************************************************
2 * domctl.h
3 *
4 * Domain management operations. For use by node control stack.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 *
24 * Copyright (c) 2002-2003, B Dragovic
25 * Copyright (c) 2002-2006, K Fraser
26 */
28 #ifndef __XEN_PUBLIC_DOMCTL_H__
29 #define __XEN_PUBLIC_DOMCTL_H__
31 #if !defined(__XEN__) && !defined(__XEN_TOOLS__)
32 #error "domctl operations are intended for use by node control tools only"
33 #endif
35 #include "xen.h"
37 #define XEN_DOMCTL_INTERFACE_VERSION 0x00000005
39 struct xenctl_cpumap {
40 XEN_GUEST_HANDLE_64(uint8_t) bitmap;
41 uint32_t nr_cpus;
42 };
44 /*
45 * NB. xen_domctl.domain is an IN/OUT parameter for this operation.
46 * If it is specified as zero, an id is auto-allocated and returned.
47 */
48 #define XEN_DOMCTL_createdomain 1
49 struct xen_domctl_createdomain {
50 /* IN parameters */
51 uint32_t ssidref;
52 xen_domain_handle_t handle;
53 /* Is this an HVM guest (as opposed to a PV guest)? */
54 #define _XEN_DOMCTL_CDF_hvm_guest 0
55 #define XEN_DOMCTL_CDF_hvm_guest (1U<<_XEN_DOMCTL_CDF_hvm_guest)
56 uint32_t flags;
57 };
58 typedef struct xen_domctl_createdomain xen_domctl_createdomain_t;
59 DEFINE_XEN_GUEST_HANDLE(xen_domctl_createdomain_t);
61 #define XEN_DOMCTL_destroydomain 2
62 #define XEN_DOMCTL_pausedomain 3
63 #define XEN_DOMCTL_unpausedomain 4
64 #define XEN_DOMCTL_resumedomain 27
66 #define XEN_DOMCTL_getdomaininfo 5
67 struct xen_domctl_getdomaininfo {
68 /* OUT variables. */
69 domid_t domain; /* Also echoed in domctl.domain */
70 /* Domain is scheduled to die. */
71 #define _XEN_DOMINF_dying 0
72 #define XEN_DOMINF_dying (1U<<_XEN_DOMINF_dying)
73 /* Domain is an HVM guest (as opposed to a PV guest). */
74 #define _XEN_DOMINF_hvm_guest 1
75 #define XEN_DOMINF_hvm_guest (1U<<_XEN_DOMINF_hvm_guest)
76 /* The guest OS has shut down. */
77 #define _XEN_DOMINF_shutdown 2
78 #define XEN_DOMINF_shutdown (1U<<_XEN_DOMINF_shutdown)
79 /* Currently paused by control software. */
80 #define _XEN_DOMINF_paused 3
81 #define XEN_DOMINF_paused (1U<<_XEN_DOMINF_paused)
82 /* Currently blocked pending an event. */
83 #define _XEN_DOMINF_blocked 4
84 #define XEN_DOMINF_blocked (1U<<_XEN_DOMINF_blocked)
85 /* Domain is currently running. */
86 #define _XEN_DOMINF_running 5
87 #define XEN_DOMINF_running (1U<<_XEN_DOMINF_running)
88 /* Being debugged. */
89 #define _XEN_DOMINF_debugged 6
90 #define XEN_DOMINF_debugged (1U<<_XEN_DOMINF_debugged)
91 /* CPU to which this domain is bound. */
92 #define XEN_DOMINF_cpumask 255
93 #define XEN_DOMINF_cpushift 8
94 /* XEN_DOMINF_shutdown guest-supplied code. */
95 #define XEN_DOMINF_shutdownmask 255
96 #define XEN_DOMINF_shutdownshift 16
97 uint32_t flags; /* XEN_DOMINF_* */
98 uint64_aligned_t tot_pages;
99 uint64_aligned_t max_pages;
100 uint64_aligned_t shared_info_frame; /* GMFN of shared_info struct */
101 uint64_aligned_t cpu_time;
102 uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */
103 uint32_t max_vcpu_id; /* Maximum VCPUID in use by this domain. */
104 uint32_t ssidref;
105 xen_domain_handle_t handle;
106 };
107 typedef struct xen_domctl_getdomaininfo xen_domctl_getdomaininfo_t;
108 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getdomaininfo_t);
111 #define XEN_DOMCTL_getmemlist 6
112 struct xen_domctl_getmemlist {
113 /* IN variables. */
114 /* Max entries to write to output buffer. */
115 uint64_aligned_t max_pfns;
116 /* Start index in guest's page list. */
117 uint64_aligned_t start_pfn;
118 XEN_GUEST_HANDLE_64(uint64_t) buffer;
119 /* OUT variables. */
120 uint64_aligned_t num_pfns;
121 };
122 typedef struct xen_domctl_getmemlist xen_domctl_getmemlist_t;
123 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getmemlist_t);
126 #define XEN_DOMCTL_getpageframeinfo 7
128 #define XEN_DOMCTL_PFINFO_LTAB_SHIFT 28
129 #define XEN_DOMCTL_PFINFO_NOTAB (0x0U<<28)
130 #define XEN_DOMCTL_PFINFO_L1TAB (0x1U<<28)
131 #define XEN_DOMCTL_PFINFO_L2TAB (0x2U<<28)
132 #define XEN_DOMCTL_PFINFO_L3TAB (0x3U<<28)
133 #define XEN_DOMCTL_PFINFO_L4TAB (0x4U<<28)
134 #define XEN_DOMCTL_PFINFO_LTABTYPE_MASK (0x7U<<28)
135 #define XEN_DOMCTL_PFINFO_LPINTAB (0x1U<<31)
136 #define XEN_DOMCTL_PFINFO_XTAB (0xfU<<28) /* invalid page */
137 #define XEN_DOMCTL_PFINFO_LTAB_MASK (0xfU<<28)
139 struct xen_domctl_getpageframeinfo {
140 /* IN variables. */
141 uint64_aligned_t gmfn; /* GMFN to query */
142 /* OUT variables. */
143 /* Is the page PINNED to a type? */
144 uint32_t type; /* see above type defs */
145 };
146 typedef struct xen_domctl_getpageframeinfo xen_domctl_getpageframeinfo_t;
147 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getpageframeinfo_t);
150 #define XEN_DOMCTL_getpageframeinfo2 8
151 struct xen_domctl_getpageframeinfo2 {
152 /* IN variables. */
153 uint64_aligned_t num;
154 /* IN/OUT variables. */
155 XEN_GUEST_HANDLE_64(uint32_t) array;
156 };
157 typedef struct xen_domctl_getpageframeinfo2 xen_domctl_getpageframeinfo2_t;
158 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getpageframeinfo2_t);
161 /*
162 * Control shadow pagetables operation
163 */
164 #define XEN_DOMCTL_shadow_op 10
166 /* Disable shadow mode. */
167 #define XEN_DOMCTL_SHADOW_OP_OFF 0
169 /* Enable shadow mode (mode contains ORed XEN_DOMCTL_SHADOW_ENABLE_* flags). */
170 #define XEN_DOMCTL_SHADOW_OP_ENABLE 32
172 /* Log-dirty bitmap operations. */
173 /* Return the bitmap and clean internal copy for next round. */
174 #define XEN_DOMCTL_SHADOW_OP_CLEAN 11
175 /* Return the bitmap but do not modify internal copy. */
176 #define XEN_DOMCTL_SHADOW_OP_PEEK 12
178 /* Memory allocation accessors. */
179 #define XEN_DOMCTL_SHADOW_OP_GET_ALLOCATION 30
180 #define XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION 31
182 /* Legacy enable operations. */
183 /* Equiv. to ENABLE with no mode flags. */
184 #define XEN_DOMCTL_SHADOW_OP_ENABLE_TEST 1
185 /* Equiv. to ENABLE with mode flag ENABLE_LOG_DIRTY. */
186 #define XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY 2
187 /* Equiv. to ENABLE with mode flags ENABLE_REFCOUNT and ENABLE_TRANSLATE. */
188 #define XEN_DOMCTL_SHADOW_OP_ENABLE_TRANSLATE 3
190 /* Mode flags for XEN_DOMCTL_SHADOW_OP_ENABLE. */
191 /*
192 * Shadow pagetables are refcounted: guest does not use explicit mmu
193 * operations nor write-protect its pagetables.
194 */
195 #define XEN_DOMCTL_SHADOW_ENABLE_REFCOUNT (1 << 1)
196 /*
197 * Log pages in a bitmap as they are dirtied.
198 * Used for live relocation to determine which pages must be re-sent.
199 */
200 #define XEN_DOMCTL_SHADOW_ENABLE_LOG_DIRTY (1 << 2)
201 /*
202 * Automatically translate GPFNs into MFNs.
203 */
204 #define XEN_DOMCTL_SHADOW_ENABLE_TRANSLATE (1 << 3)
205 /*
206 * Xen does not steal virtual address space from the guest.
207 * Requires HVM support.
208 */
209 #define XEN_DOMCTL_SHADOW_ENABLE_EXTERNAL (1 << 4)
211 struct xen_domctl_shadow_op_stats {
212 uint32_t fault_count;
213 uint32_t dirty_count;
214 };
215 typedef struct xen_domctl_shadow_op_stats xen_domctl_shadow_op_stats_t;
216 DEFINE_XEN_GUEST_HANDLE(xen_domctl_shadow_op_stats_t);
218 struct xen_domctl_shadow_op {
219 /* IN variables. */
220 uint32_t op; /* XEN_DOMCTL_SHADOW_OP_* */
222 /* OP_ENABLE */
223 uint32_t mode; /* XEN_DOMCTL_SHADOW_ENABLE_* */
225 /* OP_GET_ALLOCATION / OP_SET_ALLOCATION */
226 uint32_t mb; /* Shadow memory allocation in MB */
228 /* OP_PEEK / OP_CLEAN */
229 XEN_GUEST_HANDLE_64(uint8_t) dirty_bitmap;
230 uint64_aligned_t pages; /* Size of buffer. Updated with actual size. */
231 struct xen_domctl_shadow_op_stats stats;
232 };
233 typedef struct xen_domctl_shadow_op xen_domctl_shadow_op_t;
234 DEFINE_XEN_GUEST_HANDLE(xen_domctl_shadow_op_t);
237 #define XEN_DOMCTL_max_mem 11
238 struct xen_domctl_max_mem {
239 /* IN variables. */
240 uint64_aligned_t max_memkb;
241 };
242 typedef struct xen_domctl_max_mem xen_domctl_max_mem_t;
243 DEFINE_XEN_GUEST_HANDLE(xen_domctl_max_mem_t);
246 #define XEN_DOMCTL_setvcpucontext 12
247 #define XEN_DOMCTL_getvcpucontext 13
248 struct xen_domctl_vcpucontext {
249 uint32_t vcpu; /* IN */
250 XEN_GUEST_HANDLE_64(vcpu_guest_context_t) ctxt; /* IN/OUT */
251 };
252 typedef struct xen_domctl_vcpucontext xen_domctl_vcpucontext_t;
253 DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpucontext_t);
256 #define XEN_DOMCTL_getvcpuinfo 14
257 struct xen_domctl_getvcpuinfo {
258 /* IN variables. */
259 uint32_t vcpu;
260 /* OUT variables. */
261 uint8_t online; /* currently online (not hotplugged)? */
262 uint8_t blocked; /* blocked waiting for an event? */
263 uint8_t running; /* currently scheduled on its CPU? */
264 uint64_aligned_t cpu_time; /* total cpu time consumed (ns) */
265 uint32_t cpu; /* current mapping */
266 };
267 typedef struct xen_domctl_getvcpuinfo xen_domctl_getvcpuinfo_t;
268 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getvcpuinfo_t);
271 /* Get/set which physical cpus a vcpu can execute on. */
272 #define XEN_DOMCTL_setvcpuaffinity 9
273 #define XEN_DOMCTL_getvcpuaffinity 25
274 struct xen_domctl_vcpuaffinity {
275 uint32_t vcpu; /* IN */
276 struct xenctl_cpumap cpumap; /* IN/OUT */
277 };
278 typedef struct xen_domctl_vcpuaffinity xen_domctl_vcpuaffinity_t;
279 DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpuaffinity_t);
282 #define XEN_DOMCTL_max_vcpus 15
283 struct xen_domctl_max_vcpus {
284 uint32_t max; /* maximum number of vcpus */
285 };
286 typedef struct xen_domctl_max_vcpus xen_domctl_max_vcpus_t;
287 DEFINE_XEN_GUEST_HANDLE(xen_domctl_max_vcpus_t);
290 #define XEN_DOMCTL_scheduler_op 16
291 /* Scheduler types. */
292 #define XEN_SCHEDULER_SEDF 4
293 #define XEN_SCHEDULER_CREDIT 5
294 /* Set or get info? */
295 #define XEN_DOMCTL_SCHEDOP_putinfo 0
296 #define XEN_DOMCTL_SCHEDOP_getinfo 1
297 struct xen_domctl_scheduler_op {
298 uint32_t sched_id; /* XEN_SCHEDULER_* */
299 uint32_t cmd; /* XEN_DOMCTL_SCHEDOP_* */
300 union {
301 struct xen_domctl_sched_sedf {
302 uint64_aligned_t period;
303 uint64_aligned_t slice;
304 uint64_aligned_t latency;
305 uint32_t extratime;
306 uint32_t weight;
307 } sedf;
308 struct xen_domctl_sched_credit {
309 uint16_t weight;
310 uint16_t cap;
311 } credit;
312 } u;
313 };
314 typedef struct xen_domctl_scheduler_op xen_domctl_scheduler_op_t;
315 DEFINE_XEN_GUEST_HANDLE(xen_domctl_scheduler_op_t);
318 #define XEN_DOMCTL_setdomainhandle 17
319 struct xen_domctl_setdomainhandle {
320 xen_domain_handle_t handle;
321 };
322 typedef struct xen_domctl_setdomainhandle xen_domctl_setdomainhandle_t;
323 DEFINE_XEN_GUEST_HANDLE(xen_domctl_setdomainhandle_t);
326 #define XEN_DOMCTL_setdebugging 18
327 struct xen_domctl_setdebugging {
328 uint8_t enable;
329 };
330 typedef struct xen_domctl_setdebugging xen_domctl_setdebugging_t;
331 DEFINE_XEN_GUEST_HANDLE(xen_domctl_setdebugging_t);
334 #define XEN_DOMCTL_irq_permission 19
335 struct xen_domctl_irq_permission {
336 uint8_t pirq;
337 uint8_t allow_access; /* flag to specify enable/disable of IRQ access */
338 };
339 typedef struct xen_domctl_irq_permission xen_domctl_irq_permission_t;
340 DEFINE_XEN_GUEST_HANDLE(xen_domctl_irq_permission_t);
343 #define XEN_DOMCTL_iomem_permission 20
344 struct xen_domctl_iomem_permission {
345 uint64_aligned_t first_mfn;/* first page (physical page number) in range */
346 uint64_aligned_t nr_mfns; /* number of pages in range (>0) */
347 uint8_t allow_access; /* allow (!0) or deny (0) access to range? */
348 };
349 typedef struct xen_domctl_iomem_permission xen_domctl_iomem_permission_t;
350 DEFINE_XEN_GUEST_HANDLE(xen_domctl_iomem_permission_t);
353 #define XEN_DOMCTL_ioport_permission 21
354 struct xen_domctl_ioport_permission {
355 uint32_t first_port; /* first port int range */
356 uint32_t nr_ports; /* size of port range */
357 uint8_t allow_access; /* allow or deny access to range? */
358 };
359 typedef struct xen_domctl_ioport_permission xen_domctl_ioport_permission_t;
360 DEFINE_XEN_GUEST_HANDLE(xen_domctl_ioport_permission_t);
363 #define XEN_DOMCTL_hypercall_init 22
364 struct xen_domctl_hypercall_init {
365 uint64_aligned_t gmfn; /* GMFN to be initialised */
366 };
367 typedef struct xen_domctl_hypercall_init xen_domctl_hypercall_init_t;
368 DEFINE_XEN_GUEST_HANDLE(xen_domctl_hypercall_init_t);
371 #define XEN_DOMCTL_arch_setup 23
372 #define _XEN_DOMAINSETUP_hvm_guest 0
373 #define XEN_DOMAINSETUP_hvm_guest (1UL<<_XEN_DOMAINSETUP_hvm_guest)
374 #define _XEN_DOMAINSETUP_query 1 /* Get parameters (for save) */
375 #define XEN_DOMAINSETUP_query (1UL<<_XEN_DOMAINSETUP_query)
376 typedef struct xen_domctl_arch_setup {
377 uint64_aligned_t flags; /* XEN_DOMAINSETUP_* */
378 #ifdef __ia64__
379 uint64_aligned_t bp; /* mpaddr of boot param area */
380 uint64_aligned_t maxmem; /* Highest memory address for MDT. */
381 uint64_aligned_t xsi_va; /* Xen shared_info area virtual address. */
382 uint32_t hypercall_imm; /* Break imm for Xen hypercalls. */
383 int8_t vhpt_size_log2; /* Log2 of VHPT size. */
384 #endif
385 } xen_domctl_arch_setup_t;
386 DEFINE_XEN_GUEST_HANDLE(xen_domctl_arch_setup_t);
389 #define XEN_DOMCTL_settimeoffset 24
390 struct xen_domctl_settimeoffset {
391 int32_t time_offset_seconds; /* applied to domain wallclock time */
392 };
393 typedef struct xen_domctl_settimeoffset xen_domctl_settimeoffset_t;
394 DEFINE_XEN_GUEST_HANDLE(xen_domctl_settimeoffset_t);
397 #define XEN_DOMCTL_gethvmcontext 33
398 #define XEN_DOMCTL_sethvmcontext 34
399 typedef struct xen_domctl_hvmcontext {
400 uint32_t size; /* IN/OUT: size of buffer / bytes filled */
401 XEN_GUEST_HANDLE_64(uint8_t) buffer; /* IN/OUT: data, or call
402 * gethvmcontext with NULL
403 * buffer to get size
404 * req'd */
405 } xen_domctl_hvmcontext_t;
406 DEFINE_XEN_GUEST_HANDLE(xen_domctl_hvmcontext_t);
409 #define XEN_DOMCTL_set_address_size 35
410 #define XEN_DOMCTL_get_address_size 36
411 typedef struct xen_domctl_address_size {
412 uint32_t size;
413 } xen_domctl_address_size_t;
414 DEFINE_XEN_GUEST_HANDLE(xen_domctl_address_size_t);
417 #define XEN_DOMCTL_real_mode_area 26
418 struct xen_domctl_real_mode_area {
419 uint32_t log; /* log2 of Real Mode Area size */
420 };
421 typedef struct xen_domctl_real_mode_area xen_domctl_real_mode_area_t;
422 DEFINE_XEN_GUEST_HANDLE(xen_domctl_real_mode_area_t);
425 #define XEN_DOMCTL_sendtrigger 28
426 #define XEN_DOMCTL_SENDTRIGGER_NMI 0
427 #define XEN_DOMCTL_SENDTRIGGER_RESET 1
428 #define XEN_DOMCTL_SENDTRIGGER_INIT 2
429 struct xen_domctl_sendtrigger {
430 uint32_t trigger; /* IN */
431 uint32_t vcpu; /* IN */
432 };
433 typedef struct xen_domctl_sendtrigger xen_domctl_sendtrigger_t;
434 DEFINE_XEN_GUEST_HANDLE(xen_domctl_sendtrigger_t);
437 /* Assign PCI device to HVM guest. Sets up IOMMU structures. */
438 #define XEN_DOMCTL_assign_device 37
439 #define DPCI_ADD_MAPPING 1
440 #define DPCI_REMOVE_MAPPING 0
441 struct xen_domctl_assign_device {
442 uint32_t machine_bdf; /* machine PCI ID of assigned device */
443 };
444 typedef struct xen_domctl_assign_device xen_domctl_assign_device_t;
445 DEFINE_XEN_GUEST_HANDLE(xen_domctl_assign_device_t);
448 /* Pass-through interrupts: bind real irq -> hvm devfn. */
449 #define XEN_DOMCTL_bind_pt_irq 38
450 typedef enum pt_irq_type_e {
451 PT_IRQ_TYPE_PCI,
452 PT_IRQ_TYPE_ISA
453 } pt_irq_type_t;
454 struct xen_domctl_bind_pt_irq {
455 uint32_t machine_irq;
456 pt_irq_type_t irq_type;
457 uint32_t hvm_domid;
459 union {
460 struct {
461 uint8_t isa_irq;
462 } isa;
463 struct {
464 uint8_t bus;
465 uint8_t device;
466 uint8_t intx;
467 } pci;
468 } u;
469 };
470 typedef struct xen_domctl_bind_pt_irq xen_domctl_bind_pt_irq_t;
471 DEFINE_XEN_GUEST_HANDLE(xen_domctl_bind_pt_irq_t);
474 /* Bind machine I/O address range -> HVM address range. */
475 #define XEN_DOMCTL_memory_mapping 39
476 struct xen_domctl_memory_mapping {
477 uint64_aligned_t first_gfn; /* first page (hvm guest phys page) in range */
478 uint64_aligned_t first_mfn; /* first page (machine page) in range */
479 uint64_aligned_t nr_mfns; /* number of pages in range (>0) */
480 uint32_t add_mapping; /* add or remove mapping */
481 uint32_t padding; /* padding for 64-bit aligned structure */
482 };
483 typedef struct xen_domctl_memory_mapping xen_domctl_memory_mapping_t;
484 DEFINE_XEN_GUEST_HANDLE(xen_domctl_memory_mapping_t);
487 /* Bind machine I/O port range -> HVM I/O port range. */
488 #define XEN_DOMCTL_ioport_mapping 40
489 struct xen_domctl_ioport_mapping {
490 uint32_t first_gport; /* first guest IO port*/
491 uint32_t first_mport; /* first machine IO port */
492 uint32_t nr_ports; /* size of port range */
493 uint32_t add_mapping; /* add or remove mapping */
494 };
495 typedef struct xen_domctl_ioport_mapping xen_domctl_ioport_mapping_t;
496 DEFINE_XEN_GUEST_HANDLE(xen_domctl_ioport_mapping_t);
499 /*
500 * Pin caching type of RAM space for x86 HVM domU.
501 */
502 #define XEN_DOMCTL_pin_mem_cacheattr 41
503 /* Caching types: these happen to be the same as x86 MTRR/PAT type codes. */
504 #define XEN_DOMCTL_MEM_CACHEATTR_UC 0
505 #define XEN_DOMCTL_MEM_CACHEATTR_WC 1
506 #define XEN_DOMCTL_MEM_CACHEATTR_WT 4
507 #define XEN_DOMCTL_MEM_CACHEATTR_WP 5
508 #define XEN_DOMCTL_MEM_CACHEATTR_WB 6
509 #define XEN_DOMCTL_MEM_CACHEATTR_UCM 7
510 struct xen_domctl_pin_mem_cacheattr {
511 uint64_aligned_t start, end;
512 unsigned int type; /* XEN_DOMCTL_MEM_CACHEATTR_* */
513 };
514 typedef struct xen_domctl_pin_mem_cacheattr xen_domctl_pin_mem_cacheattr_t;
515 DEFINE_XEN_GUEST_HANDLE(xen_domctl_pin_mem_cacheattr_t);
518 #define XEN_DOMCTL_set_ext_vcpucontext 42
519 #define XEN_DOMCTL_get_ext_vcpucontext 43
520 struct xen_domctl_ext_vcpucontext {
521 /* IN: VCPU that this call applies to. */
522 uint32_t vcpu;
523 /*
524 * SET: Size of struct (IN)
525 * GET: Size of struct (OUT)
526 */
527 uint32_t size;
528 #if defined(__i386__) || defined(__x86_64__)
529 /* SYSCALL from 32-bit mode and SYSENTER callback information. */
530 /* NB. SYSCALL from 64-bit mode is contained in vcpu_guest_context_t */
531 uint64_aligned_t syscall32_callback_eip;
532 uint64_aligned_t sysenter_callback_eip;
533 uint16_t syscall32_callback_cs;
534 uint16_t sysenter_callback_cs;
535 uint8_t syscall32_disables_events;
536 uint8_t sysenter_disables_events;
537 #endif
538 };
539 typedef struct xen_domctl_ext_vcpucontext xen_domctl_ext_vcpucontext_t;
540 DEFINE_XEN_GUEST_HANDLE(xen_domctl_ext_vcpucontext_t);
542 /*
543 * Set optimizaton features for a domain
544 */
545 #define XEN_DOMCTL_set_opt_feature 44
546 struct xen_domctl_set_opt_feature {
547 #ifdef __ia64__
548 struct xen_ia64_opt_feature optf;
549 #endif
550 };
551 typedef struct xen_domctl_set_opt_feature xen_domctl_set_opt_feature_t;
552 DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_opt_feature_t);
554 struct xen_domctl {
555 uint32_t cmd;
556 uint32_t interface_version; /* XEN_DOMCTL_INTERFACE_VERSION */
557 domid_t domain;
558 union {
559 struct xen_domctl_createdomain createdomain;
560 struct xen_domctl_getdomaininfo getdomaininfo;
561 struct xen_domctl_getmemlist getmemlist;
562 struct xen_domctl_getpageframeinfo getpageframeinfo;
563 struct xen_domctl_getpageframeinfo2 getpageframeinfo2;
564 struct xen_domctl_vcpuaffinity vcpuaffinity;
565 struct xen_domctl_shadow_op shadow_op;
566 struct xen_domctl_max_mem max_mem;
567 struct xen_domctl_vcpucontext vcpucontext;
568 struct xen_domctl_getvcpuinfo getvcpuinfo;
569 struct xen_domctl_max_vcpus max_vcpus;
570 struct xen_domctl_scheduler_op scheduler_op;
571 struct xen_domctl_setdomainhandle setdomainhandle;
572 struct xen_domctl_setdebugging setdebugging;
573 struct xen_domctl_irq_permission irq_permission;
574 struct xen_domctl_iomem_permission iomem_permission;
575 struct xen_domctl_ioport_permission ioport_permission;
576 struct xen_domctl_hypercall_init hypercall_init;
577 struct xen_domctl_arch_setup arch_setup;
578 struct xen_domctl_settimeoffset settimeoffset;
579 struct xen_domctl_real_mode_area real_mode_area;
580 struct xen_domctl_hvmcontext hvmcontext;
581 struct xen_domctl_address_size address_size;
582 struct xen_domctl_sendtrigger sendtrigger;
583 struct xen_domctl_assign_device assign_device;
584 struct xen_domctl_bind_pt_irq bind_pt_irq;
585 struct xen_domctl_memory_mapping memory_mapping;
586 struct xen_domctl_ioport_mapping ioport_mapping;
587 struct xen_domctl_pin_mem_cacheattr pin_mem_cacheattr;
588 struct xen_domctl_ext_vcpucontext ext_vcpucontext;
589 struct xen_domctl_set_opt_feature set_opt_feature;
590 uint8_t pad[128];
591 } u;
592 };
593 typedef struct xen_domctl xen_domctl_t;
594 DEFINE_XEN_GUEST_HANDLE(xen_domctl_t);
596 #endif /* __XEN_PUBLIC_DOMCTL_H__ */
598 /*
599 * Local variables:
600 * mode: C
601 * c-set-style: "BSD"
602 * c-basic-offset: 4
603 * tab-width: 4
604 * indent-tabs-mode: nil
605 * End:
606 */