win-pvdrivers

annotate common/include/public/domctl.h @ 62:edd4a2ad5b44

Removed old inf files
author James Harper <james.harper@bendigoit.com.au>
date Wed Dec 19 10:22:50 2007 +1100 (2007-12-19)
parents 5712dede5a1b
children
rev   line source
andy@12 1 /******************************************************************************
andy@12 2 * domctl.h
andy@12 3 *
andy@12 4 * Domain management operations. For use by node control stack.
andy@12 5 *
andy@12 6 * Permission is hereby granted, free of charge, to any person obtaining a copy
andy@12 7 * of this software and associated documentation files (the "Software"), to
andy@12 8 * deal in the Software without restriction, including without limitation the
andy@12 9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
andy@12 10 * sell copies of the Software, and to permit persons to whom the Software is
andy@12 11 * furnished to do so, subject to the following conditions:
andy@12 12 *
andy@12 13 * The above copyright notice and this permission notice shall be included in
andy@12 14 * all copies or substantial portions of the Software.
andy@12 15 *
andy@12 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
andy@12 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
andy@12 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
andy@12 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
andy@12 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
andy@12 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
andy@12 22 * DEALINGS IN THE SOFTWARE.
andy@12 23 *
andy@12 24 * Copyright (c) 2002-2003, B Dragovic
andy@12 25 * Copyright (c) 2002-2006, K Fraser
andy@12 26 */
andy@12 27
andy@12 28 #ifndef __XEN_PUBLIC_DOMCTL_H__
andy@12 29 #define __XEN_PUBLIC_DOMCTL_H__
andy@12 30
andy@12 31 #if !defined(__XEN__) && !defined(__XEN_TOOLS__)
andy@12 32 #error "domctl operations are intended for use by node control tools only"
andy@12 33 #endif
andy@12 34
andy@12 35 #include "xen.h"
andy@12 36
andy@12 37 #define XEN_DOMCTL_INTERFACE_VERSION 0x00000005
andy@12 38
andy@12 39 struct xenctl_cpumap {
andy@12 40 XEN_GUEST_HANDLE_64(uint8_t) bitmap;
andy@12 41 uint32_t nr_cpus;
andy@12 42 };
andy@12 43
andy@12 44 /*
andy@12 45 * NB. xen_domctl.domain is an IN/OUT parameter for this operation.
andy@12 46 * If it is specified as zero, an id is auto-allocated and returned.
andy@12 47 */
andy@12 48 #define XEN_DOMCTL_createdomain 1
andy@12 49 struct xen_domctl_createdomain {
andy@12 50 /* IN parameters */
andy@12 51 uint32_t ssidref;
andy@12 52 xen_domain_handle_t handle;
andy@12 53 /* Is this an HVM guest (as opposed to a PV guest)? */
andy@12 54 #define _XEN_DOMCTL_CDF_hvm_guest 0
andy@12 55 #define XEN_DOMCTL_CDF_hvm_guest (1U<<_XEN_DOMCTL_CDF_hvm_guest)
andy@12 56 uint32_t flags;
andy@12 57 };
andy@12 58 typedef struct xen_domctl_createdomain xen_domctl_createdomain_t;
andy@12 59 DEFINE_XEN_GUEST_HANDLE(xen_domctl_createdomain_t);
andy@12 60
andy@12 61 #define XEN_DOMCTL_destroydomain 2
andy@12 62 #define XEN_DOMCTL_pausedomain 3
andy@12 63 #define XEN_DOMCTL_unpausedomain 4
andy@12 64 #define XEN_DOMCTL_resumedomain 27
andy@12 65
andy@12 66 #define XEN_DOMCTL_getdomaininfo 5
andy@12 67 struct xen_domctl_getdomaininfo {
andy@12 68 /* OUT variables. */
andy@12 69 domid_t domain; /* Also echoed in domctl.domain */
andy@12 70 /* Domain is scheduled to die. */
andy@12 71 #define _XEN_DOMINF_dying 0
andy@12 72 #define XEN_DOMINF_dying (1U<<_XEN_DOMINF_dying)
andy@12 73 /* Domain is an HVM guest (as opposed to a PV guest). */
andy@12 74 #define _XEN_DOMINF_hvm_guest 1
andy@12 75 #define XEN_DOMINF_hvm_guest (1U<<_XEN_DOMINF_hvm_guest)
andy@12 76 /* The guest OS has shut down. */
andy@12 77 #define _XEN_DOMINF_shutdown 2
andy@12 78 #define XEN_DOMINF_shutdown (1U<<_XEN_DOMINF_shutdown)
andy@12 79 /* Currently paused by control software. */
andy@12 80 #define _XEN_DOMINF_paused 3
andy@12 81 #define XEN_DOMINF_paused (1U<<_XEN_DOMINF_paused)
andy@12 82 /* Currently blocked pending an event. */
andy@12 83 #define _XEN_DOMINF_blocked 4
andy@12 84 #define XEN_DOMINF_blocked (1U<<_XEN_DOMINF_blocked)
andy@12 85 /* Domain is currently running. */
andy@12 86 #define _XEN_DOMINF_running 5
andy@12 87 #define XEN_DOMINF_running (1U<<_XEN_DOMINF_running)
andy@12 88 /* Being debugged. */
andy@12 89 #define _XEN_DOMINF_debugged 6
andy@12 90 #define XEN_DOMINF_debugged (1U<<_XEN_DOMINF_debugged)
andy@12 91 /* CPU to which this domain is bound. */
andy@12 92 #define XEN_DOMINF_cpumask 255
andy@12 93 #define XEN_DOMINF_cpushift 8
andy@12 94 /* XEN_DOMINF_shutdown guest-supplied code. */
andy@12 95 #define XEN_DOMINF_shutdownmask 255
andy@12 96 #define XEN_DOMINF_shutdownshift 16
andy@12 97 uint32_t flags; /* XEN_DOMINF_* */
andy@12 98 uint64_aligned_t tot_pages;
andy@12 99 uint64_aligned_t max_pages;
andy@12 100 uint64_aligned_t shared_info_frame; /* GMFN of shared_info struct */
andy@12 101 uint64_aligned_t cpu_time;
andy@12 102 uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */
andy@12 103 uint32_t max_vcpu_id; /* Maximum VCPUID in use by this domain. */
andy@12 104 uint32_t ssidref;
andy@12 105 xen_domain_handle_t handle;
andy@12 106 };
andy@12 107 typedef struct xen_domctl_getdomaininfo xen_domctl_getdomaininfo_t;
andy@12 108 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getdomaininfo_t);
andy@12 109
andy@12 110
andy@12 111 #define XEN_DOMCTL_getmemlist 6
andy@12 112 struct xen_domctl_getmemlist {
andy@12 113 /* IN variables. */
andy@12 114 /* Max entries to write to output buffer. */
andy@12 115 uint64_aligned_t max_pfns;
andy@12 116 /* Start index in guest's page list. */
andy@12 117 uint64_aligned_t start_pfn;
andy@12 118 XEN_GUEST_HANDLE_64(uint64_t) buffer;
andy@12 119 /* OUT variables. */
andy@12 120 uint64_aligned_t num_pfns;
andy@12 121 };
andy@12 122 typedef struct xen_domctl_getmemlist xen_domctl_getmemlist_t;
andy@12 123 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getmemlist_t);
andy@12 124
andy@12 125
andy@12 126 #define XEN_DOMCTL_getpageframeinfo 7
andy@12 127
andy@12 128 #define XEN_DOMCTL_PFINFO_LTAB_SHIFT 28
andy@12 129 #define XEN_DOMCTL_PFINFO_NOTAB (0x0U<<28)
andy@12 130 #define XEN_DOMCTL_PFINFO_L1TAB (0x1U<<28)
andy@12 131 #define XEN_DOMCTL_PFINFO_L2TAB (0x2U<<28)
andy@12 132 #define XEN_DOMCTL_PFINFO_L3TAB (0x3U<<28)
andy@12 133 #define XEN_DOMCTL_PFINFO_L4TAB (0x4U<<28)
andy@12 134 #define XEN_DOMCTL_PFINFO_LTABTYPE_MASK (0x7U<<28)
andy@12 135 #define XEN_DOMCTL_PFINFO_LPINTAB (0x1U<<31)
andy@12 136 #define XEN_DOMCTL_PFINFO_XTAB (0xfU<<28) /* invalid page */
andy@12 137 #define XEN_DOMCTL_PFINFO_LTAB_MASK (0xfU<<28)
andy@12 138
andy@12 139 struct xen_domctl_getpageframeinfo {
andy@12 140 /* IN variables. */
andy@12 141 uint64_aligned_t gmfn; /* GMFN to query */
andy@12 142 /* OUT variables. */
andy@12 143 /* Is the page PINNED to a type? */
andy@12 144 uint32_t type; /* see above type defs */
andy@12 145 };
andy@12 146 typedef struct xen_domctl_getpageframeinfo xen_domctl_getpageframeinfo_t;
andy@12 147 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getpageframeinfo_t);
andy@12 148
andy@12 149
andy@12 150 #define XEN_DOMCTL_getpageframeinfo2 8
andy@12 151 struct xen_domctl_getpageframeinfo2 {
andy@12 152 /* IN variables. */
andy@12 153 uint64_aligned_t num;
andy@12 154 /* IN/OUT variables. */
andy@12 155 XEN_GUEST_HANDLE_64(uint32_t) array;
andy@12 156 };
andy@12 157 typedef struct xen_domctl_getpageframeinfo2 xen_domctl_getpageframeinfo2_t;
andy@12 158 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getpageframeinfo2_t);
andy@12 159
andy@12 160
andy@12 161 /*
andy@12 162 * Control shadow pagetables operation
andy@12 163 */
andy@12 164 #define XEN_DOMCTL_shadow_op 10
andy@12 165
andy@12 166 /* Disable shadow mode. */
andy@12 167 #define XEN_DOMCTL_SHADOW_OP_OFF 0
andy@12 168
andy@12 169 /* Enable shadow mode (mode contains ORed XEN_DOMCTL_SHADOW_ENABLE_* flags). */
andy@12 170 #define XEN_DOMCTL_SHADOW_OP_ENABLE 32
andy@12 171
andy@12 172 /* Log-dirty bitmap operations. */
andy@12 173 /* Return the bitmap and clean internal copy for next round. */
andy@12 174 #define XEN_DOMCTL_SHADOW_OP_CLEAN 11
andy@12 175 /* Return the bitmap but do not modify internal copy. */
andy@12 176 #define XEN_DOMCTL_SHADOW_OP_PEEK 12
andy@12 177
andy@12 178 /* Memory allocation accessors. */
andy@12 179 #define XEN_DOMCTL_SHADOW_OP_GET_ALLOCATION 30
andy@12 180 #define XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION 31
andy@12 181
andy@12 182 /* Legacy enable operations. */
andy@12 183 /* Equiv. to ENABLE with no mode flags. */
andy@12 184 #define XEN_DOMCTL_SHADOW_OP_ENABLE_TEST 1
andy@12 185 /* Equiv. to ENABLE with mode flag ENABLE_LOG_DIRTY. */
andy@12 186 #define XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY 2
andy@12 187 /* Equiv. to ENABLE with mode flags ENABLE_REFCOUNT and ENABLE_TRANSLATE. */
andy@12 188 #define XEN_DOMCTL_SHADOW_OP_ENABLE_TRANSLATE 3
andy@12 189
andy@12 190 /* Mode flags for XEN_DOMCTL_SHADOW_OP_ENABLE. */
andy@12 191 /*
andy@12 192 * Shadow pagetables are refcounted: guest does not use explicit mmu
andy@12 193 * operations nor write-protect its pagetables.
andy@12 194 */
andy@12 195 #define XEN_DOMCTL_SHADOW_ENABLE_REFCOUNT (1 << 1)
andy@12 196 /*
andy@12 197 * Log pages in a bitmap as they are dirtied.
andy@12 198 * Used for live relocation to determine which pages must be re-sent.
andy@12 199 */
andy@12 200 #define XEN_DOMCTL_SHADOW_ENABLE_LOG_DIRTY (1 << 2)
andy@12 201 /*
andy@12 202 * Automatically translate GPFNs into MFNs.
andy@12 203 */
andy@12 204 #define XEN_DOMCTL_SHADOW_ENABLE_TRANSLATE (1 << 3)
andy@12 205 /*
andy@12 206 * Xen does not steal virtual address space from the guest.
andy@12 207 * Requires HVM support.
andy@12 208 */
andy@12 209 #define XEN_DOMCTL_SHADOW_ENABLE_EXTERNAL (1 << 4)
andy@12 210
andy@12 211 struct xen_domctl_shadow_op_stats {
andy@12 212 uint32_t fault_count;
andy@12 213 uint32_t dirty_count;
andy@12 214 };
andy@12 215 typedef struct xen_domctl_shadow_op_stats xen_domctl_shadow_op_stats_t;
andy@12 216 DEFINE_XEN_GUEST_HANDLE(xen_domctl_shadow_op_stats_t);
andy@12 217
andy@12 218 struct xen_domctl_shadow_op {
andy@12 219 /* IN variables. */
andy@12 220 uint32_t op; /* XEN_DOMCTL_SHADOW_OP_* */
andy@12 221
andy@12 222 /* OP_ENABLE */
andy@12 223 uint32_t mode; /* XEN_DOMCTL_SHADOW_ENABLE_* */
andy@12 224
andy@12 225 /* OP_GET_ALLOCATION / OP_SET_ALLOCATION */
andy@12 226 uint32_t mb; /* Shadow memory allocation in MB */
andy@12 227
andy@12 228 /* OP_PEEK / OP_CLEAN */
andy@12 229 XEN_GUEST_HANDLE_64(uint8_t) dirty_bitmap;
andy@12 230 uint64_aligned_t pages; /* Size of buffer. Updated with actual size. */
andy@12 231 struct xen_domctl_shadow_op_stats stats;
andy@12 232 };
andy@12 233 typedef struct xen_domctl_shadow_op xen_domctl_shadow_op_t;
andy@12 234 DEFINE_XEN_GUEST_HANDLE(xen_domctl_shadow_op_t);
andy@12 235
andy@12 236
andy@12 237 #define XEN_DOMCTL_max_mem 11
andy@12 238 struct xen_domctl_max_mem {
andy@12 239 /* IN variables. */
andy@12 240 uint64_aligned_t max_memkb;
andy@12 241 };
andy@12 242 typedef struct xen_domctl_max_mem xen_domctl_max_mem_t;
andy@12 243 DEFINE_XEN_GUEST_HANDLE(xen_domctl_max_mem_t);
andy@12 244
andy@12 245
andy@12 246 #define XEN_DOMCTL_setvcpucontext 12
andy@12 247 #define XEN_DOMCTL_getvcpucontext 13
andy@12 248 struct xen_domctl_vcpucontext {
andy@12 249 uint32_t vcpu; /* IN */
andy@12 250 XEN_GUEST_HANDLE_64(vcpu_guest_context_t) ctxt; /* IN/OUT */
andy@12 251 };
andy@12 252 typedef struct xen_domctl_vcpucontext xen_domctl_vcpucontext_t;
andy@12 253 DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpucontext_t);
andy@12 254
andy@12 255
andy@12 256 #define XEN_DOMCTL_getvcpuinfo 14
andy@12 257 struct xen_domctl_getvcpuinfo {
andy@12 258 /* IN variables. */
andy@12 259 uint32_t vcpu;
andy@12 260 /* OUT variables. */
andy@12 261 uint8_t online; /* currently online (not hotplugged)? */
andy@12 262 uint8_t blocked; /* blocked waiting for an event? */
andy@12 263 uint8_t running; /* currently scheduled on its CPU? */
andy@12 264 uint64_aligned_t cpu_time; /* total cpu time consumed (ns) */
andy@12 265 uint32_t cpu; /* current mapping */
andy@12 266 };
andy@12 267 typedef struct xen_domctl_getvcpuinfo xen_domctl_getvcpuinfo_t;
andy@12 268 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getvcpuinfo_t);
andy@12 269
andy@12 270
andy@12 271 /* Get/set which physical cpus a vcpu can execute on. */
andy@12 272 #define XEN_DOMCTL_setvcpuaffinity 9
andy@12 273 #define XEN_DOMCTL_getvcpuaffinity 25
andy@12 274 struct xen_domctl_vcpuaffinity {
andy@12 275 uint32_t vcpu; /* IN */
andy@12 276 struct xenctl_cpumap cpumap; /* IN/OUT */
andy@12 277 };
andy@12 278 typedef struct xen_domctl_vcpuaffinity xen_domctl_vcpuaffinity_t;
andy@12 279 DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpuaffinity_t);
andy@12 280
andy@12 281
andy@12 282 #define XEN_DOMCTL_max_vcpus 15
andy@12 283 struct xen_domctl_max_vcpus {
andy@12 284 uint32_t max; /* maximum number of vcpus */
andy@12 285 };
andy@12 286 typedef struct xen_domctl_max_vcpus xen_domctl_max_vcpus_t;
andy@12 287 DEFINE_XEN_GUEST_HANDLE(xen_domctl_max_vcpus_t);
andy@12 288
andy@12 289
andy@12 290 #define XEN_DOMCTL_scheduler_op 16
andy@12 291 /* Scheduler types. */
andy@12 292 #define XEN_SCHEDULER_SEDF 4
andy@12 293 #define XEN_SCHEDULER_CREDIT 5
andy@12 294 /* Set or get info? */
andy@12 295 #define XEN_DOMCTL_SCHEDOP_putinfo 0
andy@12 296 #define XEN_DOMCTL_SCHEDOP_getinfo 1
andy@12 297 struct xen_domctl_scheduler_op {
andy@12 298 uint32_t sched_id; /* XEN_SCHEDULER_* */
andy@12 299 uint32_t cmd; /* XEN_DOMCTL_SCHEDOP_* */
andy@12 300 union {
andy@12 301 struct xen_domctl_sched_sedf {
andy@12 302 uint64_aligned_t period;
andy@12 303 uint64_aligned_t slice;
andy@12 304 uint64_aligned_t latency;
andy@12 305 uint32_t extratime;
andy@12 306 uint32_t weight;
andy@12 307 } sedf;
andy@12 308 struct xen_domctl_sched_credit {
andy@12 309 uint16_t weight;
andy@12 310 uint16_t cap;
andy@12 311 } credit;
andy@12 312 } u;
andy@12 313 };
andy@12 314 typedef struct xen_domctl_scheduler_op xen_domctl_scheduler_op_t;
andy@12 315 DEFINE_XEN_GUEST_HANDLE(xen_domctl_scheduler_op_t);
andy@12 316
andy@12 317
andy@12 318 #define XEN_DOMCTL_setdomainhandle 17
andy@12 319 struct xen_domctl_setdomainhandle {
andy@12 320 xen_domain_handle_t handle;
andy@12 321 };
andy@12 322 typedef struct xen_domctl_setdomainhandle xen_domctl_setdomainhandle_t;
andy@12 323 DEFINE_XEN_GUEST_HANDLE(xen_domctl_setdomainhandle_t);
andy@12 324
andy@12 325
andy@12 326 #define XEN_DOMCTL_setdebugging 18
andy@12 327 struct xen_domctl_setdebugging {
andy@12 328 uint8_t enable;
andy@12 329 };
andy@12 330 typedef struct xen_domctl_setdebugging xen_domctl_setdebugging_t;
andy@12 331 DEFINE_XEN_GUEST_HANDLE(xen_domctl_setdebugging_t);
andy@12 332
andy@12 333
andy@12 334 #define XEN_DOMCTL_irq_permission 19
andy@12 335 struct xen_domctl_irq_permission {
andy@12 336 uint8_t pirq;
andy@12 337 uint8_t allow_access; /* flag to specify enable/disable of IRQ access */
andy@12 338 };
andy@12 339 typedef struct xen_domctl_irq_permission xen_domctl_irq_permission_t;
andy@12 340 DEFINE_XEN_GUEST_HANDLE(xen_domctl_irq_permission_t);
andy@12 341
andy@12 342
andy@12 343 #define XEN_DOMCTL_iomem_permission 20
andy@12 344 struct xen_domctl_iomem_permission {
andy@12 345 uint64_aligned_t first_mfn;/* first page (physical page number) in range */
andy@12 346 uint64_aligned_t nr_mfns; /* number of pages in range (>0) */
andy@12 347 uint8_t allow_access; /* allow (!0) or deny (0) access to range? */
andy@12 348 };
andy@12 349 typedef struct xen_domctl_iomem_permission xen_domctl_iomem_permission_t;
andy@12 350 DEFINE_XEN_GUEST_HANDLE(xen_domctl_iomem_permission_t);
andy@12 351
andy@12 352
andy@12 353 #define XEN_DOMCTL_ioport_permission 21
andy@12 354 struct xen_domctl_ioport_permission {
andy@12 355 uint32_t first_port; /* first port int range */
andy@12 356 uint32_t nr_ports; /* size of port range */
andy@12 357 uint8_t allow_access; /* allow or deny access to range? */
andy@12 358 };
andy@12 359 typedef struct xen_domctl_ioport_permission xen_domctl_ioport_permission_t;
andy@12 360 DEFINE_XEN_GUEST_HANDLE(xen_domctl_ioport_permission_t);
andy@12 361
andy@12 362
andy@12 363 #define XEN_DOMCTL_hypercall_init 22
andy@12 364 struct xen_domctl_hypercall_init {
andy@12 365 uint64_aligned_t gmfn; /* GMFN to be initialised */
andy@12 366 };
andy@12 367 typedef struct xen_domctl_hypercall_init xen_domctl_hypercall_init_t;
andy@12 368 DEFINE_XEN_GUEST_HANDLE(xen_domctl_hypercall_init_t);
andy@12 369
andy@12 370
andy@12 371 #define XEN_DOMCTL_arch_setup 23
andy@12 372 #define _XEN_DOMAINSETUP_hvm_guest 0
andy@12 373 #define XEN_DOMAINSETUP_hvm_guest (1UL<<_XEN_DOMAINSETUP_hvm_guest)
andy@12 374 #define _XEN_DOMAINSETUP_query 1 /* Get parameters (for save) */
andy@12 375 #define XEN_DOMAINSETUP_query (1UL<<_XEN_DOMAINSETUP_query)
andy@12 376 typedef struct xen_domctl_arch_setup {
andy@12 377 uint64_aligned_t flags; /* XEN_DOMAINSETUP_* */
andy@12 378 #ifdef __ia64__
andy@12 379 uint64_aligned_t bp; /* mpaddr of boot param area */
andy@12 380 uint64_aligned_t maxmem; /* Highest memory address for MDT. */
andy@12 381 uint64_aligned_t xsi_va; /* Xen shared_info area virtual address. */
andy@12 382 uint32_t hypercall_imm; /* Break imm for Xen hypercalls. */
andy@12 383 #endif
andy@12 384 } xen_domctl_arch_setup_t;
andy@12 385 DEFINE_XEN_GUEST_HANDLE(xen_domctl_arch_setup_t);
andy@12 386
andy@12 387
andy@12 388 #define XEN_DOMCTL_settimeoffset 24
andy@12 389 struct xen_domctl_settimeoffset {
andy@12 390 int32_t time_offset_seconds; /* applied to domain wallclock time */
andy@12 391 };
andy@12 392 typedef struct xen_domctl_settimeoffset xen_domctl_settimeoffset_t;
andy@12 393 DEFINE_XEN_GUEST_HANDLE(xen_domctl_settimeoffset_t);
andy@12 394
andy@12 395
andy@12 396 #define XEN_DOMCTL_gethvmcontext 33
andy@12 397 #define XEN_DOMCTL_sethvmcontext 34
andy@12 398 typedef struct xen_domctl_hvmcontext {
andy@12 399 uint32_t size; /* IN/OUT: size of buffer / bytes filled */
andy@12 400 XEN_GUEST_HANDLE_64(uint8_t) buffer; /* IN/OUT: data, or call
andy@12 401 * gethvmcontext with NULL
andy@12 402 * buffer to get size
andy@12 403 * req'd */
andy@12 404 } xen_domctl_hvmcontext_t;
andy@12 405 DEFINE_XEN_GUEST_HANDLE(xen_domctl_hvmcontext_t);
andy@12 406
andy@12 407
andy@12 408 #define XEN_DOMCTL_set_address_size 35
andy@12 409 #define XEN_DOMCTL_get_address_size 36
andy@12 410 typedef struct xen_domctl_address_size {
andy@12 411 uint32_t size;
andy@12 412 } xen_domctl_address_size_t;
andy@12 413 DEFINE_XEN_GUEST_HANDLE(xen_domctl_address_size_t);
andy@12 414
andy@12 415
andy@12 416 #define XEN_DOMCTL_real_mode_area 26
andy@12 417 struct xen_domctl_real_mode_area {
andy@12 418 uint32_t log; /* log2 of Real Mode Area size */
andy@12 419 };
andy@12 420 typedef struct xen_domctl_real_mode_area xen_domctl_real_mode_area_t;
andy@12 421 DEFINE_XEN_GUEST_HANDLE(xen_domctl_real_mode_area_t);
andy@12 422
andy@12 423
andy@12 424 #define XEN_DOMCTL_sendtrigger 28
andy@12 425 #define XEN_DOMCTL_SENDTRIGGER_NMI 0
andy@12 426 #define XEN_DOMCTL_SENDTRIGGER_RESET 1
andy@12 427 #define XEN_DOMCTL_SENDTRIGGER_INIT 2
andy@12 428 struct xen_domctl_sendtrigger {
andy@12 429 uint32_t trigger; /* IN */
andy@12 430 uint32_t vcpu; /* IN */
andy@12 431 };
andy@12 432 typedef struct xen_domctl_sendtrigger xen_domctl_sendtrigger_t;
andy@12 433 DEFINE_XEN_GUEST_HANDLE(xen_domctl_sendtrigger_t);
andy@12 434
andy@12 435
andy@12 436 struct xen_domctl {
andy@12 437 uint32_t cmd;
andy@12 438 uint32_t interface_version; /* XEN_DOMCTL_INTERFACE_VERSION */
andy@12 439 domid_t domain;
andy@12 440 union {
andy@12 441 struct xen_domctl_createdomain createdomain;
andy@12 442 struct xen_domctl_getdomaininfo getdomaininfo;
andy@12 443 struct xen_domctl_getmemlist getmemlist;
andy@12 444 struct xen_domctl_getpageframeinfo getpageframeinfo;
andy@12 445 struct xen_domctl_getpageframeinfo2 getpageframeinfo2;
andy@12 446 struct xen_domctl_vcpuaffinity vcpuaffinity;
andy@12 447 struct xen_domctl_shadow_op shadow_op;
andy@12 448 struct xen_domctl_max_mem max_mem;
andy@12 449 struct xen_domctl_vcpucontext vcpucontext;
andy@12 450 struct xen_domctl_getvcpuinfo getvcpuinfo;
andy@12 451 struct xen_domctl_max_vcpus max_vcpus;
andy@12 452 struct xen_domctl_scheduler_op scheduler_op;
andy@12 453 struct xen_domctl_setdomainhandle setdomainhandle;
andy@12 454 struct xen_domctl_setdebugging setdebugging;
andy@12 455 struct xen_domctl_irq_permission irq_permission;
andy@12 456 struct xen_domctl_iomem_permission iomem_permission;
andy@12 457 struct xen_domctl_ioport_permission ioport_permission;
andy@12 458 struct xen_domctl_hypercall_init hypercall_init;
andy@12 459 struct xen_domctl_arch_setup arch_setup;
andy@12 460 struct xen_domctl_settimeoffset settimeoffset;
andy@12 461 struct xen_domctl_real_mode_area real_mode_area;
andy@12 462 struct xen_domctl_hvmcontext hvmcontext;
andy@12 463 struct xen_domctl_address_size address_size;
andy@12 464 struct xen_domctl_sendtrigger sendtrigger;
andy@12 465 uint8_t pad[128];
andy@12 466 } u;
andy@12 467 };
andy@12 468 typedef struct xen_domctl xen_domctl_t;
andy@12 469 DEFINE_XEN_GUEST_HANDLE(xen_domctl_t);
andy@12 470
andy@12 471 #endif /* __XEN_PUBLIC_DOMCTL_H__ */
andy@12 472
andy@12 473 /*
andy@12 474 * Local variables:
andy@12 475 * mode: C
andy@12 476 * c-set-style: "BSD"
andy@12 477 * c-basic-offset: 4
andy@12 478 * tab-width: 4
andy@12 479 * indent-tabs-mode: nil
andy@12 480 * End:
andy@12 481 */