The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/xen/interface/domctl.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    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  */
   27 
   28 #ifndef __XEN_PUBLIC_DOMCTL_H__
   29 #define __XEN_PUBLIC_DOMCTL_H__
   30 
   31 #if !defined(__XEN__) && !defined(__XEN_TOOLS__)
   32 #error "domctl operations are intended for use by node control tools only"
   33 #endif
   34 
   35 #include "xen.h"
   36 #include "grant_table.h"
   37 
   38 #define XEN_DOMCTL_INTERFACE_VERSION 0x00000008
   39 
   40 /*
   41  * NB. xen_domctl.domain is an IN/OUT parameter for this operation.
   42  * If it is specified as zero, an id is auto-allocated and returned.
   43  */
   44 /* XEN_DOMCTL_createdomain */
   45 struct xen_domctl_createdomain {
   46     /* IN parameters */
   47     uint32_t ssidref;
   48     xen_domain_handle_t handle;
   49  /* Is this an HVM guest (as opposed to a PV guest)? */
   50 #define _XEN_DOMCTL_CDF_hvm_guest     0
   51 #define XEN_DOMCTL_CDF_hvm_guest      (1U<<_XEN_DOMCTL_CDF_hvm_guest)
   52  /* Use hardware-assisted paging if available? */
   53 #define _XEN_DOMCTL_CDF_hap           1
   54 #define XEN_DOMCTL_CDF_hap            (1U<<_XEN_DOMCTL_CDF_hap)
   55  /* Should domain memory integrity be verifed by tboot during Sx? */
   56 #define _XEN_DOMCTL_CDF_s3_integrity  2
   57 #define XEN_DOMCTL_CDF_s3_integrity   (1U<<_XEN_DOMCTL_CDF_s3_integrity)
   58  /* Disable out-of-sync shadow page tables? */
   59 #define _XEN_DOMCTL_CDF_oos_off       3
   60 #define XEN_DOMCTL_CDF_oos_off        (1U<<_XEN_DOMCTL_CDF_oos_off)
   61     uint32_t flags;
   62 };
   63 typedef struct xen_domctl_createdomain xen_domctl_createdomain_t;
   64 DEFINE_XEN_GUEST_HANDLE(xen_domctl_createdomain_t);
   65 
   66 /* XEN_DOMCTL_getdomaininfo */
   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  /* XEN_DOMINF_shutdown guest-supplied code.  */
   92 #define XEN_DOMINF_shutdownmask 255
   93 #define XEN_DOMINF_shutdownshift 16
   94     uint32_t flags;              /* XEN_DOMINF_* */
   95     uint64_aligned_t tot_pages;
   96     uint64_aligned_t max_pages;
   97     uint64_aligned_t shr_pages;
   98     uint64_aligned_t paged_pages;
   99     uint64_aligned_t shared_info_frame; /* GMFN of shared_info struct */
  100     uint64_aligned_t cpu_time;
  101     uint32_t nr_online_vcpus;    /* Number of VCPUs currently online. */
  102     uint32_t max_vcpu_id;        /* Maximum VCPUID in use by this domain. */
  103     uint32_t ssidref;
  104     xen_domain_handle_t handle;
  105     uint32_t cpupool;
  106 };
  107 typedef struct xen_domctl_getdomaininfo xen_domctl_getdomaininfo_t;
  108 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getdomaininfo_t);
  109 
  110 
  111 /* XEN_DOMCTL_getmemlist */
  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) 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);
  124 
  125 
  126 /* XEN_DOMCTL_getpageframeinfo */
  127 
  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_XALLOC  (0xeU<<28) /* allocate-only page */
  138 #define XEN_DOMCTL_PFINFO_PAGEDTAB (0x8U<<28)
  139 #define XEN_DOMCTL_PFINFO_LTAB_MASK (0xfU<<28)
  140 
  141 struct xen_domctl_getpageframeinfo {
  142     /* IN variables. */
  143     uint64_aligned_t gmfn; /* GMFN to query */
  144     /* OUT variables. */
  145     /* Is the page PINNED to a type? */
  146     uint32_t type;         /* see above type defs */
  147 };
  148 typedef struct xen_domctl_getpageframeinfo xen_domctl_getpageframeinfo_t;
  149 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getpageframeinfo_t);
  150 
  151 
  152 /* XEN_DOMCTL_getpageframeinfo2 */
  153 struct xen_domctl_getpageframeinfo2 {
  154     /* IN variables. */
  155     uint64_aligned_t num;
  156     /* IN/OUT variables. */
  157     XEN_GUEST_HANDLE_64(uint32) array;
  158 };
  159 typedef struct xen_domctl_getpageframeinfo2 xen_domctl_getpageframeinfo2_t;
  160 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getpageframeinfo2_t);
  161 
  162 /* XEN_DOMCTL_getpageframeinfo3 */
  163 struct xen_domctl_getpageframeinfo3 {
  164     /* IN variables. */
  165     uint64_aligned_t num;
  166     /* IN/OUT variables. */
  167     XEN_GUEST_HANDLE_64(xen_pfn_t) array;
  168 };
  169 
  170 
  171 /*
  172  * Control shadow pagetables operation
  173  */
  174 /* XEN_DOMCTL_shadow_op */
  175 
  176 /* Disable shadow mode. */
  177 #define XEN_DOMCTL_SHADOW_OP_OFF         0
  178 
  179 /* Enable shadow mode (mode contains ORed XEN_DOMCTL_SHADOW_ENABLE_* flags). */
  180 #define XEN_DOMCTL_SHADOW_OP_ENABLE      32
  181 
  182 /* Log-dirty bitmap operations. */
  183  /* Return the bitmap and clean internal copy for next round. */
  184 #define XEN_DOMCTL_SHADOW_OP_CLEAN       11
  185  /* Return the bitmap but do not modify internal copy. */
  186 #define XEN_DOMCTL_SHADOW_OP_PEEK        12
  187 
  188 /* Memory allocation accessors. */
  189 #define XEN_DOMCTL_SHADOW_OP_GET_ALLOCATION   30
  190 #define XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION   31
  191 
  192 /* Legacy enable operations. */
  193  /* Equiv. to ENABLE with no mode flags. */
  194 #define XEN_DOMCTL_SHADOW_OP_ENABLE_TEST       1
  195  /* Equiv. to ENABLE with mode flag ENABLE_LOG_DIRTY. */
  196 #define XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY   2
  197  /* Equiv. to ENABLE with mode flags ENABLE_REFCOUNT and ENABLE_TRANSLATE. */
  198 #define XEN_DOMCTL_SHADOW_OP_ENABLE_TRANSLATE  3
  199 
  200 /* Mode flags for XEN_DOMCTL_SHADOW_OP_ENABLE. */
  201  /*
  202   * Shadow pagetables are refcounted: guest does not use explicit mmu
  203   * operations nor write-protect its pagetables.
  204   */
  205 #define XEN_DOMCTL_SHADOW_ENABLE_REFCOUNT  (1 << 1)
  206  /*
  207   * Log pages in a bitmap as they are dirtied.
  208   * Used for live relocation to determine which pages must be re-sent.
  209   */
  210 #define XEN_DOMCTL_SHADOW_ENABLE_LOG_DIRTY (1 << 2)
  211  /*
  212   * Automatically translate GPFNs into MFNs.
  213   */
  214 #define XEN_DOMCTL_SHADOW_ENABLE_TRANSLATE (1 << 3)
  215  /*
  216   * Xen does not steal virtual address space from the guest.
  217   * Requires HVM support.
  218   */
  219 #define XEN_DOMCTL_SHADOW_ENABLE_EXTERNAL  (1 << 4)
  220 
  221 struct xen_domctl_shadow_op_stats {
  222     uint32_t fault_count;
  223     uint32_t dirty_count;
  224 };
  225 typedef struct xen_domctl_shadow_op_stats xen_domctl_shadow_op_stats_t;
  226 DEFINE_XEN_GUEST_HANDLE(xen_domctl_shadow_op_stats_t);
  227 
  228 struct xen_domctl_shadow_op {
  229     /* IN variables. */
  230     uint32_t       op;       /* XEN_DOMCTL_SHADOW_OP_* */
  231 
  232     /* OP_ENABLE */
  233     uint32_t       mode;     /* XEN_DOMCTL_SHADOW_ENABLE_* */
  234 
  235     /* OP_GET_ALLOCATION / OP_SET_ALLOCATION */
  236     uint32_t       mb;       /* Shadow memory allocation in MB */
  237 
  238     /* OP_PEEK / OP_CLEAN */
  239     XEN_GUEST_HANDLE_64(uint8) dirty_bitmap;
  240     uint64_aligned_t pages; /* Size of buffer. Updated with actual size. */
  241     struct xen_domctl_shadow_op_stats stats;
  242 };
  243 typedef struct xen_domctl_shadow_op xen_domctl_shadow_op_t;
  244 DEFINE_XEN_GUEST_HANDLE(xen_domctl_shadow_op_t);
  245 
  246 
  247 /* XEN_DOMCTL_max_mem */
  248 struct xen_domctl_max_mem {
  249     /* IN variables. */
  250     uint64_aligned_t max_memkb;
  251 };
  252 typedef struct xen_domctl_max_mem xen_domctl_max_mem_t;
  253 DEFINE_XEN_GUEST_HANDLE(xen_domctl_max_mem_t);
  254 
  255 
  256 /* XEN_DOMCTL_setvcpucontext */
  257 /* XEN_DOMCTL_getvcpucontext */
  258 struct xen_domctl_vcpucontext {
  259     uint32_t              vcpu;                  /* IN */
  260     XEN_GUEST_HANDLE_64(vcpu_guest_context_t) ctxt; /* IN/OUT */
  261 };
  262 typedef struct xen_domctl_vcpucontext xen_domctl_vcpucontext_t;
  263 DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpucontext_t);
  264 
  265 
  266 /* XEN_DOMCTL_getvcpuinfo */
  267 struct xen_domctl_getvcpuinfo {
  268     /* IN variables. */
  269     uint32_t vcpu;
  270     /* OUT variables. */
  271     uint8_t  online;                  /* currently online (not hotplugged)? */
  272     uint8_t  blocked;                 /* blocked waiting for an event? */
  273     uint8_t  running;                 /* currently scheduled on its CPU? */
  274     uint64_aligned_t cpu_time;        /* total cpu time consumed (ns) */
  275     uint32_t cpu;                     /* current mapping   */
  276 };
  277 typedef struct xen_domctl_getvcpuinfo xen_domctl_getvcpuinfo_t;
  278 DEFINE_XEN_GUEST_HANDLE(xen_domctl_getvcpuinfo_t);
  279 
  280 
  281 /* Get/set which physical cpus a vcpu can execute on. */
  282 /* XEN_DOMCTL_setvcpuaffinity */
  283 /* XEN_DOMCTL_getvcpuaffinity */
  284 struct xen_domctl_vcpuaffinity {
  285     uint32_t  vcpu;              /* IN */
  286     struct xenctl_cpumap cpumap; /* IN/OUT */
  287 };
  288 typedef struct xen_domctl_vcpuaffinity xen_domctl_vcpuaffinity_t;
  289 DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpuaffinity_t);
  290 
  291 
  292 /* XEN_DOMCTL_max_vcpus */
  293 struct xen_domctl_max_vcpus {
  294     uint32_t max;           /* maximum number of vcpus */
  295 };
  296 typedef struct xen_domctl_max_vcpus xen_domctl_max_vcpus_t;
  297 DEFINE_XEN_GUEST_HANDLE(xen_domctl_max_vcpus_t);
  298 
  299 
  300 /* XEN_DOMCTL_scheduler_op */
  301 /* Scheduler types. */
  302 #define XEN_SCHEDULER_SEDF     4
  303 #define XEN_SCHEDULER_CREDIT   5
  304 #define XEN_SCHEDULER_CREDIT2  6
  305 #define XEN_SCHEDULER_ARINC653 7
  306 /* Set or get info? */
  307 #define XEN_DOMCTL_SCHEDOP_putinfo 0
  308 #define XEN_DOMCTL_SCHEDOP_getinfo 1
  309 struct xen_domctl_scheduler_op {
  310     uint32_t sched_id;  /* XEN_SCHEDULER_* */
  311     uint32_t cmd;       /* XEN_DOMCTL_SCHEDOP_* */
  312     union {
  313         struct xen_domctl_sched_sedf {
  314             uint64_aligned_t period;
  315             uint64_aligned_t slice;
  316             uint64_aligned_t latency;
  317             uint32_t extratime;
  318             uint32_t weight;
  319         } sedf;
  320         struct xen_domctl_sched_credit {
  321             uint16_t weight;
  322             uint16_t cap;
  323         } credit;
  324         struct xen_domctl_sched_credit2 {
  325             uint16_t weight;
  326         } credit2;
  327     } u;
  328 };
  329 typedef struct xen_domctl_scheduler_op xen_domctl_scheduler_op_t;
  330 DEFINE_XEN_GUEST_HANDLE(xen_domctl_scheduler_op_t);
  331 
  332 
  333 /* XEN_DOMCTL_setdomainhandle */
  334 struct xen_domctl_setdomainhandle {
  335     xen_domain_handle_t handle;
  336 };
  337 typedef struct xen_domctl_setdomainhandle xen_domctl_setdomainhandle_t;
  338 DEFINE_XEN_GUEST_HANDLE(xen_domctl_setdomainhandle_t);
  339 
  340 
  341 /* XEN_DOMCTL_setdebugging */
  342 struct xen_domctl_setdebugging {
  343     uint8_t enable;
  344 };
  345 typedef struct xen_domctl_setdebugging xen_domctl_setdebugging_t;
  346 DEFINE_XEN_GUEST_HANDLE(xen_domctl_setdebugging_t);
  347 
  348 
  349 /* XEN_DOMCTL_irq_permission */
  350 struct xen_domctl_irq_permission {
  351     uint8_t pirq;
  352     uint8_t allow_access;    /* flag to specify enable/disable of IRQ access */
  353 };
  354 typedef struct xen_domctl_irq_permission xen_domctl_irq_permission_t;
  355 DEFINE_XEN_GUEST_HANDLE(xen_domctl_irq_permission_t);
  356 
  357 
  358 /* XEN_DOMCTL_iomem_permission */
  359 struct xen_domctl_iomem_permission {
  360     uint64_aligned_t first_mfn;/* first page (physical page number) in range */
  361     uint64_aligned_t nr_mfns;  /* number of pages in range (>0) */
  362     uint8_t  allow_access;     /* allow (!0) or deny (0) access to range? */
  363 };
  364 typedef struct xen_domctl_iomem_permission xen_domctl_iomem_permission_t;
  365 DEFINE_XEN_GUEST_HANDLE(xen_domctl_iomem_permission_t);
  366 
  367 
  368 /* XEN_DOMCTL_ioport_permission */
  369 struct xen_domctl_ioport_permission {
  370     uint32_t first_port;              /* first port int range */
  371     uint32_t nr_ports;                /* size of port range */
  372     uint8_t  allow_access;            /* allow or deny access to range? */
  373 };
  374 typedef struct xen_domctl_ioport_permission xen_domctl_ioport_permission_t;
  375 DEFINE_XEN_GUEST_HANDLE(xen_domctl_ioport_permission_t);
  376 
  377 
  378 /* XEN_DOMCTL_hypercall_init */
  379 struct xen_domctl_hypercall_init {
  380     uint64_aligned_t  gmfn;           /* GMFN to be initialised */
  381 };
  382 typedef struct xen_domctl_hypercall_init xen_domctl_hypercall_init_t;
  383 DEFINE_XEN_GUEST_HANDLE(xen_domctl_hypercall_init_t);
  384 
  385 
  386 /* XEN_DOMCTL_arch_setup */
  387 #define _XEN_DOMAINSETUP_hvm_guest 0
  388 #define XEN_DOMAINSETUP_hvm_guest  (1UL<<_XEN_DOMAINSETUP_hvm_guest)
  389 #define _XEN_DOMAINSETUP_query 1 /* Get parameters (for save)  */
  390 #define XEN_DOMAINSETUP_query  (1UL<<_XEN_DOMAINSETUP_query)
  391 #define _XEN_DOMAINSETUP_sioemu_guest 2
  392 #define XEN_DOMAINSETUP_sioemu_guest  (1UL<<_XEN_DOMAINSETUP_sioemu_guest)
  393 typedef struct xen_domctl_arch_setup {
  394     uint64_aligned_t flags;  /* XEN_DOMAINSETUP_* */
  395 #ifdef __ia64__
  396     uint64_aligned_t bp;     /* mpaddr of boot param area */
  397     uint64_aligned_t maxmem; /* Highest memory address for MDT.  */
  398     uint64_aligned_t xsi_va; /* Xen shared_info area virtual address.  */
  399     uint32_t hypercall_imm;  /* Break imm for Xen hypercalls.  */
  400     int8_t vhpt_size_log2;   /* Log2 of VHPT size. */
  401 #endif
  402 } xen_domctl_arch_setup_t;
  403 DEFINE_XEN_GUEST_HANDLE(xen_domctl_arch_setup_t);
  404 
  405 
  406 /* XEN_DOMCTL_settimeoffset */
  407 struct xen_domctl_settimeoffset {
  408     int32_t  time_offset_seconds; /* applied to domain wallclock time */
  409 };
  410 typedef struct xen_domctl_settimeoffset xen_domctl_settimeoffset_t;
  411 DEFINE_XEN_GUEST_HANDLE(xen_domctl_settimeoffset_t);
  412 
  413 /* XEN_DOMCTL_gethvmcontext */
  414 /* XEN_DOMCTL_sethvmcontext */
  415 typedef struct xen_domctl_hvmcontext {
  416     uint32_t size; /* IN/OUT: size of buffer / bytes filled */
  417     XEN_GUEST_HANDLE_64(uint8) buffer; /* IN/OUT: data, or call
  418                                         * gethvmcontext with NULL
  419                                         * buffer to get size req'd */
  420 } xen_domctl_hvmcontext_t;
  421 DEFINE_XEN_GUEST_HANDLE(xen_domctl_hvmcontext_t);
  422 
  423 
  424 /* XEN_DOMCTL_set_address_size */
  425 /* XEN_DOMCTL_get_address_size */
  426 typedef struct xen_domctl_address_size {
  427     uint32_t size;
  428 } xen_domctl_address_size_t;
  429 DEFINE_XEN_GUEST_HANDLE(xen_domctl_address_size_t);
  430 
  431 
  432 /* XEN_DOMCTL_real_mode_area */
  433 struct xen_domctl_real_mode_area {
  434     uint32_t log; /* log2 of Real Mode Area size */
  435 };
  436 typedef struct xen_domctl_real_mode_area xen_domctl_real_mode_area_t;
  437 DEFINE_XEN_GUEST_HANDLE(xen_domctl_real_mode_area_t);
  438 
  439 
  440 /* XEN_DOMCTL_sendtrigger */
  441 #define XEN_DOMCTL_SENDTRIGGER_NMI    0
  442 #define XEN_DOMCTL_SENDTRIGGER_RESET  1
  443 #define XEN_DOMCTL_SENDTRIGGER_INIT   2
  444 #define XEN_DOMCTL_SENDTRIGGER_POWER  3
  445 #define XEN_DOMCTL_SENDTRIGGER_SLEEP  4
  446 struct xen_domctl_sendtrigger {
  447     uint32_t  trigger;  /* IN */
  448     uint32_t  vcpu;     /* IN */
  449 };
  450 typedef struct xen_domctl_sendtrigger xen_domctl_sendtrigger_t;
  451 DEFINE_XEN_GUEST_HANDLE(xen_domctl_sendtrigger_t);
  452 
  453 
  454 /* Assign PCI device to HVM guest. Sets up IOMMU structures. */
  455 /* XEN_DOMCTL_assign_device */
  456 /* XEN_DOMCTL_test_assign_device */
  457 /* XEN_DOMCTL_deassign_device */
  458 struct xen_domctl_assign_device {
  459     uint32_t  machine_sbdf;   /* machine PCI ID of assigned device */
  460 };
  461 typedef struct xen_domctl_assign_device xen_domctl_assign_device_t;
  462 DEFINE_XEN_GUEST_HANDLE(xen_domctl_assign_device_t);
  463 
  464 /* Retrieve sibling devices infomation of machine_sbdf */
  465 /* XEN_DOMCTL_get_device_group */
  466 struct xen_domctl_get_device_group {
  467     uint32_t  machine_sbdf;     /* IN */
  468     uint32_t  max_sdevs;        /* IN */
  469     uint32_t  num_sdevs;        /* OUT */
  470     XEN_GUEST_HANDLE_64(uint32)  sdev_array;   /* OUT */
  471 };
  472 typedef struct xen_domctl_get_device_group xen_domctl_get_device_group_t;
  473 DEFINE_XEN_GUEST_HANDLE(xen_domctl_get_device_group_t);
  474 
  475 /* Pass-through interrupts: bind real irq -> hvm devfn. */
  476 /* XEN_DOMCTL_bind_pt_irq */
  477 /* XEN_DOMCTL_unbind_pt_irq */
  478 typedef enum pt_irq_type_e {
  479     PT_IRQ_TYPE_PCI,
  480     PT_IRQ_TYPE_ISA,
  481     PT_IRQ_TYPE_MSI,
  482     PT_IRQ_TYPE_MSI_TRANSLATE,
  483 } pt_irq_type_t;
  484 struct xen_domctl_bind_pt_irq {
  485     uint32_t machine_irq;
  486     pt_irq_type_t irq_type;
  487     uint32_t hvm_domid;
  488 
  489     union {
  490         struct {
  491             uint8_t isa_irq;
  492         } isa;
  493         struct {
  494             uint8_t bus;
  495             uint8_t device;
  496             uint8_t intx;
  497         } pci;
  498         struct {
  499             uint8_t gvec;
  500             uint32_t gflags;
  501             uint64_aligned_t gtable;
  502         } msi;
  503     } u;
  504 };
  505 typedef struct xen_domctl_bind_pt_irq xen_domctl_bind_pt_irq_t;
  506 DEFINE_XEN_GUEST_HANDLE(xen_domctl_bind_pt_irq_t);
  507 
  508 
  509 /* Bind machine I/O address range -> HVM address range. */
  510 /* XEN_DOMCTL_memory_mapping */
  511 #define DPCI_ADD_MAPPING         1
  512 #define DPCI_REMOVE_MAPPING      0
  513 struct xen_domctl_memory_mapping {
  514     uint64_aligned_t first_gfn; /* first page (hvm guest phys page) in range */
  515     uint64_aligned_t first_mfn; /* first page (machine page) in range */
  516     uint64_aligned_t nr_mfns;   /* number of pages in range (>0) */
  517     uint32_t add_mapping;       /* add or remove mapping */
  518     uint32_t padding;           /* padding for 64-bit aligned structure */
  519 };
  520 typedef struct xen_domctl_memory_mapping xen_domctl_memory_mapping_t;
  521 DEFINE_XEN_GUEST_HANDLE(xen_domctl_memory_mapping_t);
  522 
  523 
  524 /* Bind machine I/O port range -> HVM I/O port range. */
  525 /* XEN_DOMCTL_ioport_mapping */
  526 struct xen_domctl_ioport_mapping {
  527     uint32_t first_gport;     /* first guest IO port*/
  528     uint32_t first_mport;     /* first machine IO port */
  529     uint32_t nr_ports;        /* size of port range */
  530     uint32_t add_mapping;     /* add or remove mapping */
  531 };
  532 typedef struct xen_domctl_ioport_mapping xen_domctl_ioport_mapping_t;
  533 DEFINE_XEN_GUEST_HANDLE(xen_domctl_ioport_mapping_t);
  534 
  535 
  536 /*
  537  * Pin caching type of RAM space for x86 HVM domU.
  538  */
  539 /* XEN_DOMCTL_pin_mem_cacheattr */
  540 /* Caching types: these happen to be the same as x86 MTRR/PAT type codes. */
  541 #define XEN_DOMCTL_MEM_CACHEATTR_UC  0
  542 #define XEN_DOMCTL_MEM_CACHEATTR_WC  1
  543 #define XEN_DOMCTL_MEM_CACHEATTR_WT  4
  544 #define XEN_DOMCTL_MEM_CACHEATTR_WP  5
  545 #define XEN_DOMCTL_MEM_CACHEATTR_WB  6
  546 #define XEN_DOMCTL_MEM_CACHEATTR_UCM 7
  547 struct xen_domctl_pin_mem_cacheattr {
  548     uint64_aligned_t start, end;
  549     uint32_t type; /* XEN_DOMCTL_MEM_CACHEATTR_* */
  550 };
  551 typedef struct xen_domctl_pin_mem_cacheattr xen_domctl_pin_mem_cacheattr_t;
  552 DEFINE_XEN_GUEST_HANDLE(xen_domctl_pin_mem_cacheattr_t);
  553 
  554 
  555 /* XEN_DOMCTL_set_ext_vcpucontext */
  556 /* XEN_DOMCTL_get_ext_vcpucontext */
  557 struct xen_domctl_ext_vcpucontext {
  558     /* IN: VCPU that this call applies to. */
  559     uint32_t         vcpu;
  560     /*
  561      * SET: Size of struct (IN)
  562      * GET: Size of struct (OUT, up to 128 bytes)
  563      */
  564     uint32_t         size;
  565 #if defined(__i386__) || defined(__x86_64__)
  566     /* SYSCALL from 32-bit mode and SYSENTER callback information. */
  567     /* NB. SYSCALL from 64-bit mode is contained in vcpu_guest_context_t */
  568     uint64_aligned_t syscall32_callback_eip;
  569     uint64_aligned_t sysenter_callback_eip;
  570     uint16_t         syscall32_callback_cs;
  571     uint16_t         sysenter_callback_cs;
  572     uint8_t          syscall32_disables_events;
  573     uint8_t          sysenter_disables_events;
  574     uint64_aligned_t mcg_cap;
  575 #endif
  576 };
  577 typedef struct xen_domctl_ext_vcpucontext xen_domctl_ext_vcpucontext_t;
  578 DEFINE_XEN_GUEST_HANDLE(xen_domctl_ext_vcpucontext_t);
  579 
  580 /*
  581  * Set optimizaton features for a domain
  582  */
  583 /* XEN_DOMCTL_set_opt_feature */
  584 struct xen_domctl_set_opt_feature {
  585 #if defined(__ia64__)
  586     struct xen_ia64_opt_feature optf;
  587 #else
  588     /* Make struct non-empty: do not depend on this field name! */
  589     uint64_t dummy;
  590 #endif
  591 };
  592 typedef struct xen_domctl_set_opt_feature xen_domctl_set_opt_feature_t;
  593 DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_opt_feature_t);
  594 
  595 /*
  596  * Set the target domain for a domain
  597  */
  598 /* XEN_DOMCTL_set_target */
  599 struct xen_domctl_set_target {
  600     domid_t target;
  601 };
  602 typedef struct xen_domctl_set_target xen_domctl_set_target_t;
  603 DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_target_t);
  604 
  605 #if defined(__i386__) || defined(__x86_64__)
  606 # define XEN_CPUID_INPUT_UNUSED  0xFFFFFFFF
  607 /* XEN_DOMCTL_set_cpuid */
  608 struct xen_domctl_cpuid {
  609   uint32_t input[2];
  610   uint32_t eax;
  611   uint32_t ebx;
  612   uint32_t ecx;
  613   uint32_t edx;
  614 };
  615 typedef struct xen_domctl_cpuid xen_domctl_cpuid_t;
  616 DEFINE_XEN_GUEST_HANDLE(xen_domctl_cpuid_t);
  617 #endif
  618 
  619 /* XEN_DOMCTL_subscribe */
  620 struct xen_domctl_subscribe {
  621     uint32_t port; /* IN */
  622 };
  623 typedef struct xen_domctl_subscribe xen_domctl_subscribe_t;
  624 DEFINE_XEN_GUEST_HANDLE(xen_domctl_subscribe_t);
  625 
  626 /*
  627  * Define the maximum machine address size which should be allocated
  628  * to a guest.
  629  */
  630 /* XEN_DOMCTL_set_machine_address_size */
  631 /* XEN_DOMCTL_get_machine_address_size */
  632 
  633 /*
  634  * Do not inject spurious page faults into this domain.
  635  */
  636 /* XEN_DOMCTL_suppress_spurious_page_faults */
  637 
  638 /* XEN_DOMCTL_debug_op */
  639 #define XEN_DOMCTL_DEBUG_OP_SINGLE_STEP_OFF         0
  640 #define XEN_DOMCTL_DEBUG_OP_SINGLE_STEP_ON          1
  641 struct xen_domctl_debug_op {
  642     uint32_t op;   /* IN */
  643     uint32_t vcpu; /* IN */
  644 };
  645 typedef struct xen_domctl_debug_op xen_domctl_debug_op_t;
  646 DEFINE_XEN_GUEST_HANDLE(xen_domctl_debug_op_t);
  647 
  648 /*
  649  * Request a particular record from the HVM context
  650  */
  651 /* XEN_DOMCTL_gethvmcontext_partial */
  652 typedef struct xen_domctl_hvmcontext_partial {
  653     uint32_t type;                      /* IN: Type of record required */
  654     uint32_t instance;                  /* IN: Instance of that type */
  655     XEN_GUEST_HANDLE_64(uint8) buffer;  /* OUT: buffer to write record into */
  656 } xen_domctl_hvmcontext_partial_t;
  657 DEFINE_XEN_GUEST_HANDLE(xen_domctl_hvmcontext_partial_t);
  658 
  659 /* XEN_DOMCTL_disable_migrate */
  660 typedef struct xen_domctl_disable_migrate {
  661     uint32_t disable; /* IN: 1: disable migration and restore */
  662 } xen_domctl_disable_migrate_t;
  663 
  664 
  665 /* XEN_DOMCTL_gettscinfo */
  666 /* XEN_DOMCTL_settscinfo */
  667 struct xen_guest_tsc_info {
  668     uint32_t tsc_mode;
  669     uint32_t gtsc_khz;
  670     uint32_t incarnation;
  671     uint32_t pad;
  672     uint64_aligned_t elapsed_nsec;
  673 };
  674 typedef struct xen_guest_tsc_info xen_guest_tsc_info_t;
  675 DEFINE_XEN_GUEST_HANDLE(xen_guest_tsc_info_t);
  676 typedef struct xen_domctl_tsc_info {
  677     XEN_GUEST_HANDLE_64(xen_guest_tsc_info_t) out_info; /* OUT */
  678     xen_guest_tsc_info_t info; /* IN */
  679 } xen_domctl_tsc_info_t;
  680 
  681 /* XEN_DOMCTL_gdbsx_guestmemio      guest mem io */
  682 struct xen_domctl_gdbsx_memio {
  683     /* IN */
  684     uint64_aligned_t pgd3val;/* optional: init_mm.pgd[3] value */
  685     uint64_aligned_t gva;    /* guest virtual address */
  686     uint64_aligned_t uva;    /* user buffer virtual address */
  687     uint32_t         len;    /* number of bytes to read/write */
  688     uint8_t          gwr;    /* 0 = read from guest. 1 = write to guest */
  689     /* OUT */
  690     uint32_t         remain; /* bytes remaining to be copied */
  691 };
  692 
  693 /* XEN_DOMCTL_gdbsx_pausevcpu */
  694 /* XEN_DOMCTL_gdbsx_unpausevcpu */
  695 struct xen_domctl_gdbsx_pauseunp_vcpu { /* pause/unpause a vcpu */
  696     uint32_t         vcpu;         /* which vcpu */
  697 };
  698 
  699 /* XEN_DOMCTL_gdbsx_domstatus */
  700 struct xen_domctl_gdbsx_domstatus {
  701     /* OUT */
  702     uint8_t          paused;     /* is the domain paused */
  703     uint32_t         vcpu_id;    /* any vcpu in an event? */
  704     uint32_t         vcpu_ev;    /* if yes, what event? */
  705 };
  706 
  707 /*
  708  * Memory event operations
  709  */
  710 
  711 /* XEN_DOMCTL_mem_event_op */
  712 
  713 /*
  714  * Domain memory paging
  715  * Page memory in and out.
  716  * Domctl interface to set up and tear down the 
  717  * pager<->hypervisor interface. Use XENMEM_paging_op*
  718  * to perform per-page operations.
  719  *
  720  * The XEN_DOMCTL_MEM_EVENT_OP_PAGING_ENABLE domctl returns several
  721  * non-standard error codes to indicate why paging could not be enabled:
  722  * ENODEV - host lacks HAP support (EPT/NPT) or HAP is disabled in guest
  723  * EMLINK - guest has iommu passthrough enabled
  724  * EXDEV  - guest has PoD enabled
  725  * EBUSY  - guest has or had paging enabled, ring buffer still active
  726  */
  727 #define XEN_DOMCTL_MEM_EVENT_OP_PAGING            1
  728 
  729 #define XEN_DOMCTL_MEM_EVENT_OP_PAGING_ENABLE     0
  730 #define XEN_DOMCTL_MEM_EVENT_OP_PAGING_DISABLE    1
  731 
  732 /*
  733  * Access permissions.
  734  *
  735  * As with paging, use the domctl for teardown/setup of the
  736  * helper<->hypervisor interface.
  737  *
  738  * There are HVM hypercalls to set the per-page access permissions of every
  739  * page in a domain.  When one of these permissions--independent, read, 
  740  * write, and execute--is violated, the VCPU is paused and a memory event 
  741  * is sent with what happened.  (See public/mem_event.h) .
  742  *
  743  * The memory event handler can then resume the VCPU and redo the access 
  744  * with a XENMEM_access_op_resume hypercall.
  745  *
  746  * The XEN_DOMCTL_MEM_EVENT_OP_ACCESS_ENABLE domctl returns several
  747  * non-standard error codes to indicate why access could not be enabled:
  748  * ENODEV - host lacks HAP support (EPT/NPT) or HAP is disabled in guest
  749  * EBUSY  - guest has or had access enabled, ring buffer still active
  750  */
  751 #define XEN_DOMCTL_MEM_EVENT_OP_ACCESS            2
  752 
  753 #define XEN_DOMCTL_MEM_EVENT_OP_ACCESS_ENABLE     0
  754 #define XEN_DOMCTL_MEM_EVENT_OP_ACCESS_DISABLE    1
  755 
  756 /*
  757  * Sharing ENOMEM helper.
  758  *
  759  * As with paging, use the domctl for teardown/setup of the
  760  * helper<->hypervisor interface.
  761  *
  762  * If setup, this ring is used to communicate failed allocations
  763  * in the unshare path. XENMEM_sharing_op_resume is used to wake up
  764  * vcpus that could not unshare.
  765  *
  766  * Note that shring can be turned on (as per the domctl below)
  767  * *without* this ring being setup.
  768  */
  769 #define XEN_DOMCTL_MEM_EVENT_OP_SHARING           3
  770 
  771 #define XEN_DOMCTL_MEM_EVENT_OP_SHARING_ENABLE    0
  772 #define XEN_DOMCTL_MEM_EVENT_OP_SHARING_DISABLE   1
  773 
  774 /* Use for teardown/setup of helper<->hypervisor interface for paging, 
  775  * access and sharing.*/
  776 struct xen_domctl_mem_event_op {
  777     uint32_t       op;           /* XEN_DOMCTL_MEM_EVENT_OP_*_* */
  778     uint32_t       mode;         /* XEN_DOMCTL_MEM_EVENT_OP_* */
  779 
  780     uint32_t port;              /* OUT: event channel for ring */
  781 };
  782 typedef struct xen_domctl_mem_event_op xen_domctl_mem_event_op_t;
  783 DEFINE_XEN_GUEST_HANDLE(xen_domctl_mem_event_op_t);
  784 
  785 /*
  786  * Memory sharing operations
  787  */
  788 /* XEN_DOMCTL_mem_sharing_op.
  789  * The CONTROL sub-domctl is used for bringup/teardown. */
  790 #define XEN_DOMCTL_MEM_SHARING_CONTROL          0
  791 
  792 struct xen_domctl_mem_sharing_op {
  793     uint8_t op; /* XEN_DOMCTL_MEM_SHARING_* */
  794 
  795     union {
  796         uint8_t enable;                   /* CONTROL */
  797     } u;
  798 };
  799 typedef struct xen_domctl_mem_sharing_op xen_domctl_mem_sharing_op_t;
  800 DEFINE_XEN_GUEST_HANDLE(xen_domctl_mem_sharing_op_t);
  801 
  802 struct xen_domctl_audit_p2m {
  803     /* OUT error counts */
  804     uint64_t orphans;
  805     uint64_t m2p_bad;
  806     uint64_t p2m_bad;
  807 };
  808 typedef struct xen_domctl_audit_p2m xen_domctl_audit_p2m_t;
  809 DEFINE_XEN_GUEST_HANDLE(xen_domctl_audit_p2m_t);
  810 
  811 struct xen_domctl_set_virq_handler {
  812     uint32_t virq; /* IN */
  813 };
  814 typedef struct xen_domctl_set_virq_handler xen_domctl_set_virq_handler_t;
  815 DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_virq_handler_t);
  816 
  817 #if defined(__i386__) || defined(__x86_64__)
  818 /* XEN_DOMCTL_setvcpuextstate */
  819 /* XEN_DOMCTL_getvcpuextstate */
  820 struct xen_domctl_vcpuextstate {
  821     /* IN: VCPU that this call applies to. */
  822     uint32_t         vcpu;
  823     /*
  824      * SET: xfeature support mask of struct (IN)
  825      * GET: xfeature support mask of struct (IN/OUT)
  826      * xfeature mask is served as identifications of the saving format
  827      * so that compatible CPUs can have a check on format to decide
  828      * whether it can restore.
  829      */
  830     uint64_aligned_t         xfeature_mask;
  831     /*
  832      * SET: Size of struct (IN)
  833      * GET: Size of struct (IN/OUT)
  834      */
  835     uint64_aligned_t         size;
  836     XEN_GUEST_HANDLE_64(uint64) buffer;
  837 };
  838 typedef struct xen_domctl_vcpuextstate xen_domctl_vcpuextstate_t;
  839 DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpuextstate_t);
  840 #endif
  841 
  842 /* XEN_DOMCTL_set_access_required: sets whether a memory event listener
  843  * must be present to handle page access events: if false, the page
  844  * access will revert to full permissions if no one is listening;
  845  *  */
  846 struct xen_domctl_set_access_required {
  847     uint8_t access_required;
  848 };
  849 typedef struct xen_domctl_set_access_required xen_domctl_set_access_required_t;
  850 DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_access_required_t);
  851 
  852 struct xen_domctl {
  853     uint32_t cmd;
  854 #define XEN_DOMCTL_createdomain                   1
  855 #define XEN_DOMCTL_destroydomain                  2
  856 #define XEN_DOMCTL_pausedomain                    3
  857 #define XEN_DOMCTL_unpausedomain                  4
  858 #define XEN_DOMCTL_getdomaininfo                  5
  859 #define XEN_DOMCTL_getmemlist                     6
  860 #define XEN_DOMCTL_getpageframeinfo               7
  861 #define XEN_DOMCTL_getpageframeinfo2              8
  862 #define XEN_DOMCTL_setvcpuaffinity                9
  863 #define XEN_DOMCTL_shadow_op                     10
  864 #define XEN_DOMCTL_max_mem                       11
  865 #define XEN_DOMCTL_setvcpucontext                12
  866 #define XEN_DOMCTL_getvcpucontext                13
  867 #define XEN_DOMCTL_getvcpuinfo                   14
  868 #define XEN_DOMCTL_max_vcpus                     15
  869 #define XEN_DOMCTL_scheduler_op                  16
  870 #define XEN_DOMCTL_setdomainhandle               17
  871 #define XEN_DOMCTL_setdebugging                  18
  872 #define XEN_DOMCTL_irq_permission                19
  873 #define XEN_DOMCTL_iomem_permission              20
  874 #define XEN_DOMCTL_ioport_permission             21
  875 #define XEN_DOMCTL_hypercall_init                22
  876 #define XEN_DOMCTL_arch_setup                    23
  877 #define XEN_DOMCTL_settimeoffset                 24
  878 #define XEN_DOMCTL_getvcpuaffinity               25
  879 #define XEN_DOMCTL_real_mode_area                26
  880 #define XEN_DOMCTL_resumedomain                  27
  881 #define XEN_DOMCTL_sendtrigger                   28
  882 #define XEN_DOMCTL_subscribe                     29
  883 #define XEN_DOMCTL_gethvmcontext                 33
  884 #define XEN_DOMCTL_sethvmcontext                 34
  885 #define XEN_DOMCTL_set_address_size              35
  886 #define XEN_DOMCTL_get_address_size              36
  887 #define XEN_DOMCTL_assign_device                 37
  888 #define XEN_DOMCTL_bind_pt_irq                   38
  889 #define XEN_DOMCTL_memory_mapping                39
  890 #define XEN_DOMCTL_ioport_mapping                40
  891 #define XEN_DOMCTL_pin_mem_cacheattr             41
  892 #define XEN_DOMCTL_set_ext_vcpucontext           42
  893 #define XEN_DOMCTL_get_ext_vcpucontext           43
  894 #define XEN_DOMCTL_set_opt_feature               44
  895 #define XEN_DOMCTL_test_assign_device            45
  896 #define XEN_DOMCTL_set_target                    46
  897 #define XEN_DOMCTL_deassign_device               47
  898 #define XEN_DOMCTL_unbind_pt_irq                 48
  899 #define XEN_DOMCTL_set_cpuid                     49
  900 #define XEN_DOMCTL_get_device_group              50
  901 #define XEN_DOMCTL_set_machine_address_size      51
  902 #define XEN_DOMCTL_get_machine_address_size      52
  903 #define XEN_DOMCTL_suppress_spurious_page_faults 53
  904 #define XEN_DOMCTL_debug_op                      54
  905 #define XEN_DOMCTL_gethvmcontext_partial         55
  906 #define XEN_DOMCTL_mem_event_op                  56
  907 #define XEN_DOMCTL_mem_sharing_op                57
  908 #define XEN_DOMCTL_disable_migrate               58
  909 #define XEN_DOMCTL_gettscinfo                    59
  910 #define XEN_DOMCTL_settscinfo                    60
  911 #define XEN_DOMCTL_getpageframeinfo3             61
  912 #define XEN_DOMCTL_setvcpuextstate               62
  913 #define XEN_DOMCTL_getvcpuextstate               63
  914 #define XEN_DOMCTL_set_access_required           64
  915 #define XEN_DOMCTL_audit_p2m                     65
  916 #define XEN_DOMCTL_set_virq_handler              66
  917 #define XEN_DOMCTL_gdbsx_guestmemio            1000
  918 #define XEN_DOMCTL_gdbsx_pausevcpu             1001
  919 #define XEN_DOMCTL_gdbsx_unpausevcpu           1002
  920 #define XEN_DOMCTL_gdbsx_domstatus             1003
  921     uint32_t interface_version; /* XEN_DOMCTL_INTERFACE_VERSION */
  922     domid_t  domain;
  923     union {
  924         struct xen_domctl_createdomain      createdomain;
  925         struct xen_domctl_getdomaininfo     getdomaininfo;
  926         struct xen_domctl_getmemlist        getmemlist;
  927         struct xen_domctl_getpageframeinfo  getpageframeinfo;
  928         struct xen_domctl_getpageframeinfo2 getpageframeinfo2;
  929         struct xen_domctl_getpageframeinfo3 getpageframeinfo3;
  930         struct xen_domctl_vcpuaffinity      vcpuaffinity;
  931         struct xen_domctl_shadow_op         shadow_op;
  932         struct xen_domctl_max_mem           max_mem;
  933         struct xen_domctl_vcpucontext       vcpucontext;
  934         struct xen_domctl_getvcpuinfo       getvcpuinfo;
  935         struct xen_domctl_max_vcpus         max_vcpus;
  936         struct xen_domctl_scheduler_op      scheduler_op;
  937         struct xen_domctl_setdomainhandle   setdomainhandle;
  938         struct xen_domctl_setdebugging      setdebugging;
  939         struct xen_domctl_irq_permission    irq_permission;
  940         struct xen_domctl_iomem_permission  iomem_permission;
  941         struct xen_domctl_ioport_permission ioport_permission;
  942         struct xen_domctl_hypercall_init    hypercall_init;
  943         struct xen_domctl_arch_setup        arch_setup;
  944         struct xen_domctl_settimeoffset     settimeoffset;
  945         struct xen_domctl_disable_migrate   disable_migrate;
  946         struct xen_domctl_tsc_info          tsc_info;
  947         struct xen_domctl_real_mode_area    real_mode_area;
  948         struct xen_domctl_hvmcontext        hvmcontext;
  949         struct xen_domctl_hvmcontext_partial hvmcontext_partial;
  950         struct xen_domctl_address_size      address_size;
  951         struct xen_domctl_sendtrigger       sendtrigger;
  952         struct xen_domctl_get_device_group  get_device_group;
  953         struct xen_domctl_assign_device     assign_device;
  954         struct xen_domctl_bind_pt_irq       bind_pt_irq;
  955         struct xen_domctl_memory_mapping    memory_mapping;
  956         struct xen_domctl_ioport_mapping    ioport_mapping;
  957         struct xen_domctl_pin_mem_cacheattr pin_mem_cacheattr;
  958         struct xen_domctl_ext_vcpucontext   ext_vcpucontext;
  959         struct xen_domctl_set_opt_feature   set_opt_feature;
  960         struct xen_domctl_set_target        set_target;
  961         struct xen_domctl_subscribe         subscribe;
  962         struct xen_domctl_debug_op          debug_op;
  963         struct xen_domctl_mem_event_op      mem_event_op;
  964         struct xen_domctl_mem_sharing_op    mem_sharing_op;
  965 #if defined(__i386__) || defined(__x86_64__)
  966         struct xen_domctl_cpuid             cpuid;
  967         struct xen_domctl_vcpuextstate      vcpuextstate;
  968 #endif
  969         struct xen_domctl_set_access_required access_required;
  970         struct xen_domctl_audit_p2m         audit_p2m;
  971         struct xen_domctl_set_virq_handler  set_virq_handler;
  972         struct xen_domctl_gdbsx_memio       gdbsx_guest_memio;
  973         struct xen_domctl_gdbsx_pauseunp_vcpu gdbsx_pauseunp_vcpu;
  974         struct xen_domctl_gdbsx_domstatus   gdbsx_domstatus;
  975         uint8_t                             pad[128];
  976     } u;
  977 };
  978 typedef struct xen_domctl xen_domctl_t;
  979 DEFINE_XEN_GUEST_HANDLE(xen_domctl_t);
  980 
  981 #endif /* __XEN_PUBLIC_DOMCTL_H__ */
  982 
  983 /*
  984  * Local variables:
  985  * mode: C
  986  * c-set-style: "BSD"
  987  * c-basic-offset: 4
  988  * tab-width: 4
  989  * indent-tabs-mode: nil
  990  * End:
  991  */

Cache object: be00f99a6a31f28f27efbacf3b2e4587


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.