iPXE
xen.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
2 /******************************************************************************
3  * xen.h
4  *
5  * Guest OS interface to Xen.
6  *
7  * Copyright (c) 2004, K A Fraser
8  */
9 
10 #ifndef __XEN_PUBLIC_XEN_H__
11 #define __XEN_PUBLIC_XEN_H__
12 
13 FILE_LICENCE ( MIT );
14 FILE_SECBOOT ( PERMITTED );
15 
16 #include "xen-compat.h"
17 
18 #if defined(__i386__) || defined(__x86_64__)
19 #include "arch-x86/xen.h"
20 #elif defined(__arm__) || defined (__aarch64__)
21 #include "arch-arm.h"
22 #else
23 #include <bits/xen.h>
24 #endif
25 
26 #ifndef __ASSEMBLY__
27 /* Guest handles for primitive C types. */
29 __DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
31 __DEFINE_XEN_GUEST_HANDLE(uint, unsigned int);
32 #if __XEN_INTERFACE_VERSION__ < 0x00040300
34 __DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
35 #endif
37 
41 
42 /* Define a variable length array (depends on compiler). */
43 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
44 #define XEN_FLEX_ARRAY_DIM
45 #elif defined(__GNUC__)
46 #define XEN_FLEX_ARRAY_DIM 0
47 #else
48 #define XEN_FLEX_ARRAY_DIM 1 /* variable size */
49 #endif
50 
51 /* Turn a plain number into a C unsigned (long (long)) constant. */
52 #define __xen_mk_uint(x) x ## U
53 #define __xen_mk_ulong(x) x ## UL
54 #ifndef __xen_mk_ullong
55 # define __xen_mk_ullong(x) x ## ULL
56 #endif
57 #define xen_mk_uint(x) __xen_mk_uint(x)
58 #define xen_mk_ulong(x) __xen_mk_ulong(x)
59 #define xen_mk_ullong(x) __xen_mk_ullong(x)
60 
61 #else
62 
63 /* In assembly code we cannot use C numeric constant suffixes. */
64 #define xen_mk_uint(x) x
65 #define xen_mk_ulong(x) x
66 #define xen_mk_ullong(x) x
67 
68 #endif
69 
70 /*
71  * HYPERCALLS
72  */
73 
74 /* `incontents 100 hcalls List of hypercalls
75  * ` enum hypercall_num { // __HYPERVISOR_* => HYPERVISOR_*()
76  */
77 
78 #define __HYPERVISOR_set_trap_table 0
79 #define __HYPERVISOR_mmu_update 1
80 #define __HYPERVISOR_set_gdt 2
81 #define __HYPERVISOR_stack_switch 3
82 #define __HYPERVISOR_set_callbacks 4
83 #define __HYPERVISOR_fpu_taskswitch 5
84 #define __HYPERVISOR_sched_op_compat 6 /* compat since 0x00030101 */
85 #define __HYPERVISOR_platform_op 7
86 #define __HYPERVISOR_set_debugreg 8
87 #define __HYPERVISOR_get_debugreg 9
88 #define __HYPERVISOR_update_descriptor 10
89 #define __HYPERVISOR_memory_op 12
90 #define __HYPERVISOR_multicall 13
91 #define __HYPERVISOR_update_va_mapping 14
92 #define __HYPERVISOR_set_timer_op 15
93 #define __HYPERVISOR_event_channel_op_compat 16 /* compat since 0x00030202 */
94 #define __HYPERVISOR_xen_version 17
95 #define __HYPERVISOR_console_io 18
96 #define __HYPERVISOR_physdev_op_compat 19 /* compat since 0x00030202 */
97 #define __HYPERVISOR_grant_table_op 20
98 #define __HYPERVISOR_vm_assist 21
99 #define __HYPERVISOR_update_va_mapping_otherdomain 22
100 #define __HYPERVISOR_iret 23 /* x86 only */
101 #define __HYPERVISOR_vcpu_op 24
102 #define __HYPERVISOR_set_segment_base 25 /* x86/64 only */
103 #define __HYPERVISOR_mmuext_op 26
104 #define __HYPERVISOR_xsm_op 27
105 #define __HYPERVISOR_nmi_op 28
106 #define __HYPERVISOR_sched_op 29
107 #define __HYPERVISOR_callback_op 30
108 #define __HYPERVISOR_xenoprof_op 31
109 #define __HYPERVISOR_event_channel_op 32
110 #define __HYPERVISOR_physdev_op 33
111 #define __HYPERVISOR_hvm_op 34
112 #define __HYPERVISOR_sysctl 35
113 #define __HYPERVISOR_domctl 36
114 #define __HYPERVISOR_kexec_op 37
115 #define __HYPERVISOR_tmem_op 38
116 #define __HYPERVISOR_argo_op 39
117 #define __HYPERVISOR_xenpmu_op 40
118 #define __HYPERVISOR_dm_op 41
119 #define __HYPERVISOR_hypfs_op 42
120 
121 /* Architecture-specific hypercall definitions. */
122 #define __HYPERVISOR_arch_0 48
123 #define __HYPERVISOR_arch_1 49
124 #define __HYPERVISOR_arch_2 50
125 #define __HYPERVISOR_arch_3 51
126 #define __HYPERVISOR_arch_4 52
127 #define __HYPERVISOR_arch_5 53
128 #define __HYPERVISOR_arch_6 54
129 #define __HYPERVISOR_arch_7 55
130 
131 /* ` } */
132 
133 /*
134  * HYPERCALL COMPATIBILITY.
135  */
136 
137 /* New sched_op hypercall introduced in 0x00030101. */
138 #if __XEN_INTERFACE_VERSION__ < 0x00030101
139 #undef __HYPERVISOR_sched_op
140 #define __HYPERVISOR_sched_op __HYPERVISOR_sched_op_compat
141 #endif
142 
143 /* New event-channel and physdev hypercalls introduced in 0x00030202. */
144 #if __XEN_INTERFACE_VERSION__ < 0x00030202
145 #undef __HYPERVISOR_event_channel_op
146 #define __HYPERVISOR_event_channel_op __HYPERVISOR_event_channel_op_compat
147 #undef __HYPERVISOR_physdev_op
148 #define __HYPERVISOR_physdev_op __HYPERVISOR_physdev_op_compat
149 #endif
150 
151 /* New platform_op hypercall introduced in 0x00030204. */
152 #if __XEN_INTERFACE_VERSION__ < 0x00030204
153 #define __HYPERVISOR_dom0_op __HYPERVISOR_platform_op
154 #endif
155 
156 /*
157  * VIRTUAL INTERRUPTS
158  *
159  * Virtual interrupts that a guest OS may receive from Xen.
160  *
161  * In the side comments, 'V.' denotes a per-VCPU VIRQ while 'G.' denotes a
162  * global VIRQ. The former can be bound once per VCPU and cannot be re-bound.
163  * The latter can be allocated only once per guest: they must initially be
164  * allocated to VCPU0 but can subsequently be re-bound.
165  */
166 /* ` enum virq { */
167 #define VIRQ_TIMER 0 /* V. Timebase update, and/or requested timeout. */
168 #define VIRQ_DEBUG 1 /* V. Request guest to dump debug info. */
169 #define VIRQ_CONSOLE 2 /* G. (DOM0) Bytes received on emergency console. */
170 #define VIRQ_DOM_EXC 3 /* G. (DOM0) Exceptional event for some domain. */
171 #define VIRQ_TBUF 4 /* G. (DOM0) Trace buffer has records available. */
172 #define VIRQ_DEBUGGER 6 /* G. (DOM0) A domain has paused for debugging. */
173 #define VIRQ_XENOPROF 7 /* V. XenOprofile interrupt: new sample available */
174 #define VIRQ_CON_RING 8 /* G. (DOM0) Bytes received on console */
175 #define VIRQ_PCPU_STATE 9 /* G. (DOM0) PCPU state changed */
176 #define VIRQ_MEM_EVENT 10 /* G. (DOM0) A memory event has occurred */
177 #define VIRQ_ARGO 11 /* G. Argo interdomain message notification */
178 #define VIRQ_ENOMEM 12 /* G. (DOM0) Low on heap memory */
179 #define VIRQ_XENPMU 13 /* V. PMC interrupt */
180 
181 /* Architecture-specific VIRQ definitions. */
182 #define VIRQ_ARCH_0 16
183 #define VIRQ_ARCH_1 17
184 #define VIRQ_ARCH_2 18
185 #define VIRQ_ARCH_3 19
186 #define VIRQ_ARCH_4 20
187 #define VIRQ_ARCH_5 21
188 #define VIRQ_ARCH_6 22
189 #define VIRQ_ARCH_7 23
190 /* ` } */
191 
192 #define NR_VIRQS 24
193 
194 /*
195  * ` enum neg_errnoval
196  * ` HYPERVISOR_mmu_update(const struct mmu_update reqs[],
197  * ` unsigned count, unsigned *done_out,
198  * ` unsigned foreigndom)
199  * `
200  * @reqs is an array of mmu_update_t structures ((ptr, val) pairs).
201  * @count is the length of the above array.
202  * @pdone is an output parameter indicating number of completed operations
203  * @foreigndom[15:0]: FD, the expected owner of data pages referenced in this
204  * hypercall invocation. Can be DOMID_SELF.
205  * @foreigndom[31:16]: PFD, the expected owner of pagetable pages referenced
206  * in this hypercall invocation. The value of this field
207  * (x) encodes the PFD as follows:
208  * x == 0 => PFD == DOMID_SELF
209  * x != 0 => PFD == x - 1
210  *
211  * Sub-commands: ptr[1:0] specifies the appropriate MMU_* command.
212  * -------------
213  * ptr[1:0] == MMU_NORMAL_PT_UPDATE:
214  * Updates an entry in a page table belonging to PFD. If updating an L1 table,
215  * and the new table entry is valid/present, the mapped frame must belong to
216  * FD. If attempting to map an I/O page then the caller assumes the privilege
217  * of the FD.
218  * FD == DOMID_IO: Permit /only/ I/O mappings, at the priv level of the caller.
219  * FD == DOMID_XEN: Map restricted areas of Xen's heap space.
220  * ptr[:2] -- Machine address of the page-table entry to modify.
221  * val -- Value to write.
222  *
223  * There also certain implicit requirements when using this hypercall. The
224  * pages that make up a pagetable must be mapped read-only in the guest.
225  * This prevents uncontrolled guest updates to the pagetable. Xen strictly
226  * enforces this, and will disallow any pagetable update which will end up
227  * mapping pagetable page RW, and will disallow using any writable page as a
228  * pagetable. In practice it means that when constructing a page table for a
229  * process, thread, etc, we MUST be very dilligient in following these rules:
230  * 1). Start with top-level page (PGD or in Xen language: L4). Fill out
231  * the entries.
232  * 2). Keep on going, filling out the upper (PUD or L3), and middle (PMD
233  * or L2).
234  * 3). Start filling out the PTE table (L1) with the PTE entries. Once
235  * done, make sure to set each of those entries to RO (so writeable bit
236  * is unset). Once that has been completed, set the PMD (L2) for this
237  * PTE table as RO.
238  * 4). When completed with all of the PMD (L2) entries, and all of them have
239  * been set to RO, make sure to set RO the PUD (L3). Do the same
240  * operation on PGD (L4) pagetable entries that have a PUD (L3) entry.
241  * 5). Now before you can use those pages (so setting the cr3), you MUST also
242  * pin them so that the hypervisor can verify the entries. This is done
243  * via the HYPERVISOR_mmuext_op(MMUEXT_PIN_L4_TABLE, guest physical frame
244  * number of the PGD (L4)). And this point the HYPERVISOR_mmuext_op(
245  * MMUEXT_NEW_BASEPTR, guest physical frame number of the PGD (L4)) can be
246  * issued.
247  * For 32-bit guests, the L4 is not used (as there is less pagetables), so
248  * instead use L3.
249  * At this point the pagetables can be modified using the MMU_NORMAL_PT_UPDATE
250  * hypercall. Also if so desired the OS can also try to write to the PTE
251  * and be trapped by the hypervisor (as the PTE entry is RO).
252  *
253  * To deallocate the pages, the operations are the reverse of the steps
254  * mentioned above. The argument is MMUEXT_UNPIN_TABLE for all levels and the
255  * pagetable MUST not be in use (meaning that the cr3 is not set to it).
256  *
257  * ptr[1:0] == MMU_MACHPHYS_UPDATE:
258  * Updates an entry in the machine->pseudo-physical mapping table.
259  * ptr[:2] -- Machine address within the frame whose mapping to modify.
260  * The frame must belong to the FD, if one is specified.
261  * val -- Value to write into the mapping entry.
262  *
263  * ptr[1:0] == MMU_PT_UPDATE_PRESERVE_AD:
264  * As MMU_NORMAL_PT_UPDATE above, but A/D bits currently in the PTE are ORed
265  * with those in @val.
266  *
267  * ptr[1:0] == MMU_PT_UPDATE_NO_TRANSLATE:
268  * As MMU_NORMAL_PT_UPDATE above, but @val is not translated though FD
269  * page tables.
270  *
271  * @val is usually the machine frame number along with some attributes.
272  * The attributes by default follow the architecture defined bits. Meaning that
273  * if this is a X86_64 machine and four page table layout is used, the layout
274  * of val is:
275  * - 63 if set means No execute (NX)
276  * - 46-13 the machine frame number
277  * - 12 available for guest
278  * - 11 available for guest
279  * - 10 available for guest
280  * - 9 available for guest
281  * - 8 global
282  * - 7 PAT (PSE is disabled, must use hypercall to make 4MB or 2MB pages)
283  * - 6 dirty
284  * - 5 accessed
285  * - 4 page cached disabled
286  * - 3 page write through
287  * - 2 userspace accessible
288  * - 1 writeable
289  * - 0 present
290  *
291  * The one bits that does not fit with the default layout is the PAGE_PSE
292  * also called PAGE_PAT). The MMUEXT_[UN]MARK_SUPER arguments to the
293  * HYPERVISOR_mmuext_op serve as mechanism to set a pagetable to be 4MB
294  * (or 2MB) instead of using the PAGE_PSE bit.
295  *
296  * The reason that the PAGE_PSE (bit 7) is not being utilized is due to Xen
297  * using it as the Page Attribute Table (PAT) bit - for details on it please
298  * refer to Intel SDM 10.12. The PAT allows to set the caching attributes of
299  * pages instead of using MTRRs.
300  *
301  * The PAT MSR is as follows (it is a 64-bit value, each entry is 8 bits):
302  * PAT4 PAT0
303  * +-----+-----+----+----+----+-----+----+----+
304  * | UC | UC- | WC | WB | UC | UC- | WC | WB | <= Linux
305  * +-----+-----+----+----+----+-----+----+----+
306  * | UC | UC- | WT | WB | UC | UC- | WT | WB | <= BIOS (default when machine boots)
307  * +-----+-----+----+----+----+-----+----+----+
308  * | rsv | rsv | WP | WC | UC | UC- | WT | WB | <= Xen
309  * +-----+-----+----+----+----+-----+----+----+
310  *
311  * The lookup of this index table translates to looking up
312  * Bit 7, Bit 4, and Bit 3 of val entry:
313  *
314  * PAT/PSE (bit 7) ... PCD (bit 4) .. PWT (bit 3).
315  *
316  * If all bits are off, then we are using PAT0. If bit 3 turned on,
317  * then we are using PAT1, if bit 3 and bit 4, then PAT2..
318  *
319  * As you can see, the Linux PAT1 translates to PAT4 under Xen. Which means
320  * that if a guest that follows Linux's PAT setup and would like to set Write
321  * Combined on pages it MUST use PAT4 entry. Meaning that Bit 7 (PAGE_PAT) is
322  * set. For example, under Linux it only uses PAT0, PAT1, and PAT2 for the
323  * caching as:
324  *
325  * WB = none (so PAT0)
326  * WC = PWT (bit 3 on)
327  * UC = PWT | PCD (bit 3 and 4 are on).
328  *
329  * To make it work with Xen, it needs to translate the WC bit as so:
330  *
331  * PWT (so bit 3 on) --> PAT (so bit 7 is on) and clear bit 3
332  *
333  * And to translate back it would:
334  *
335  * PAT (bit 7 on) --> PWT (bit 3 on) and clear bit 7.
336  */
337 #define MMU_NORMAL_PT_UPDATE 0 /* checked '*ptr = val'. ptr is MA. */
338 #define MMU_MACHPHYS_UPDATE 1 /* ptr = MA of frame to modify entry for */
339 #define MMU_PT_UPDATE_PRESERVE_AD 2 /* atomically: *ptr = val | (*ptr&(A|D)) */
340 #define MMU_PT_UPDATE_NO_TRANSLATE 3 /* checked '*ptr = val'. ptr is MA. */
341  /* val never translated. */
342 
343 /*
344  * MMU EXTENDED OPERATIONS
345  *
346  * ` enum neg_errnoval
347  * ` HYPERVISOR_mmuext_op(mmuext_op_t uops[],
348  * ` unsigned int count,
349  * ` unsigned int *pdone,
350  * ` unsigned int foreigndom)
351  */
352 /* HYPERVISOR_mmuext_op() accepts a list of mmuext_op structures.
353  * A foreigndom (FD) can be specified (or DOMID_SELF for none).
354  * Where the FD has some effect, it is described below.
355  *
356  * cmd: MMUEXT_(UN)PIN_*_TABLE
357  * mfn: Machine frame number to be (un)pinned as a p.t. page.
358  * The frame must belong to the FD, if one is specified.
359  *
360  * cmd: MMUEXT_NEW_BASEPTR
361  * mfn: Machine frame number of new page-table base to install in MMU.
362  *
363  * cmd: MMUEXT_NEW_USER_BASEPTR [x86/64 only]
364  * mfn: Machine frame number of new page-table base to install in MMU
365  * when in user space.
366  *
367  * cmd: MMUEXT_TLB_FLUSH_LOCAL
368  * No additional arguments. Flushes local TLB.
369  *
370  * cmd: MMUEXT_INVLPG_LOCAL
371  * linear_addr: Linear address to be flushed from the local TLB.
372  *
373  * cmd: MMUEXT_TLB_FLUSH_MULTI
374  * vcpumask: Pointer to bitmap of VCPUs to be flushed.
375  *
376  * cmd: MMUEXT_INVLPG_MULTI
377  * linear_addr: Linear address to be flushed.
378  * vcpumask: Pointer to bitmap of VCPUs to be flushed.
379  *
380  * cmd: MMUEXT_TLB_FLUSH_ALL
381  * No additional arguments. Flushes all VCPUs' TLBs.
382  *
383  * cmd: MMUEXT_INVLPG_ALL
384  * linear_addr: Linear address to be flushed from all VCPUs' TLBs.
385  *
386  * cmd: MMUEXT_FLUSH_CACHE
387  * No additional arguments. Writes back and flushes cache contents.
388  *
389  * cmd: MMUEXT_FLUSH_CACHE_GLOBAL
390  * No additional arguments. Writes back and flushes cache contents
391  * on all CPUs in the system.
392  *
393  * cmd: MMUEXT_SET_LDT
394  * linear_addr: Linear address of LDT base (NB. must be page-aligned).
395  * nr_ents: Number of entries in LDT.
396  *
397  * cmd: MMUEXT_CLEAR_PAGE
398  * mfn: Machine frame number to be cleared.
399  *
400  * cmd: MMUEXT_COPY_PAGE
401  * mfn: Machine frame number of the destination page.
402  * src_mfn: Machine frame number of the source page.
403  *
404  * cmd: MMUEXT_[UN]MARK_SUPER
405  * mfn: Machine frame number of head of superpage to be [un]marked.
406  */
407 /* ` enum mmuext_cmd { */
408 #define MMUEXT_PIN_L1_TABLE 0
409 #define MMUEXT_PIN_L2_TABLE 1
410 #define MMUEXT_PIN_L3_TABLE 2
411 #define MMUEXT_PIN_L4_TABLE 3
412 #define MMUEXT_UNPIN_TABLE 4
413 #define MMUEXT_NEW_BASEPTR 5
414 #define MMUEXT_TLB_FLUSH_LOCAL 6
415 #define MMUEXT_INVLPG_LOCAL 7
416 #define MMUEXT_TLB_FLUSH_MULTI 8
417 #define MMUEXT_INVLPG_MULTI 9
418 #define MMUEXT_TLB_FLUSH_ALL 10
419 #define MMUEXT_INVLPG_ALL 11
420 #define MMUEXT_FLUSH_CACHE 12
421 #define MMUEXT_SET_LDT 13
422 #define MMUEXT_NEW_USER_BASEPTR 15
423 #define MMUEXT_CLEAR_PAGE 16
424 #define MMUEXT_COPY_PAGE 17
425 #define MMUEXT_FLUSH_CACHE_GLOBAL 18
426 #define MMUEXT_MARK_SUPER 19
427 #define MMUEXT_UNMARK_SUPER 20
428 /* ` } */
429 
430 #ifndef __ASSEMBLY__
431 struct mmuext_op {
432  unsigned int cmd; /* => enum mmuext_cmd */
433  union {
434  /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR
435  * CLEAR_PAGE, COPY_PAGE, [UN]MARK_SUPER */
437  /* INVLPG_LOCAL, INVLPG_ALL, SET_LDT */
438  unsigned long linear_addr;
439  } arg1;
440  union {
441  /* SET_LDT */
442  unsigned int nr_ents;
443  /* TLB_FLUSH_MULTI, INVLPG_MULTI */
444 #if __XEN_INTERFACE_VERSION__ >= 0x00030205
445  XEN_GUEST_HANDLE(const_void) vcpumask;
446 #else
447  const void *vcpumask;
448 #endif
449  /* COPY_PAGE */
451  } arg2;
452 };
453 typedef struct mmuext_op mmuext_op_t;
455 #endif
456 
457 /*
458  * ` enum neg_errnoval
459  * ` HYPERVISOR_update_va_mapping(unsigned long va, u64 val,
460  * ` enum uvm_flags flags)
461  * `
462  * ` enum neg_errnoval
463  * ` HYPERVISOR_update_va_mapping_otherdomain(unsigned long va, u64 val,
464  * ` enum uvm_flags flags,
465  * ` domid_t domid)
466  * `
467  * ` @va: The virtual address whose mapping we want to change
468  * ` @val: The new page table entry, must contain a machine address
469  * ` @flags: Control TLB flushes
470  */
471 /* These are passed as 'flags' to update_va_mapping. They can be ORed. */
472 /* When specifying UVMF_MULTI, also OR in a pointer to a CPU bitmap. */
473 /* UVMF_LOCAL is merely UVMF_MULTI with a NULL bitmap pointer. */
474 /* ` enum uvm_flags { */
475 #define UVMF_NONE (xen_mk_ulong(0)<<0) /* No flushing at all. */
476 #define UVMF_TLB_FLUSH (xen_mk_ulong(1)<<0) /* Flush entire TLB(s). */
477 #define UVMF_INVLPG (xen_mk_ulong(2)<<0) /* Flush only one entry. */
478 #define UVMF_FLUSHTYPE_MASK (xen_mk_ulong(3)<<0)
479 #define UVMF_MULTI (xen_mk_ulong(0)<<2) /* Flush subset of TLBs. */
480 #define UVMF_LOCAL (xen_mk_ulong(0)<<2) /* Flush local TLB. */
481 #define UVMF_ALL (xen_mk_ulong(1)<<2) /* Flush all TLBs. */
482 /* ` } */
483 
484 /*
485  * ` int
486  * ` HYPERVISOR_console_io(unsigned int cmd,
487  * ` unsigned int count,
488  * ` char buffer[]);
489  *
490  * @cmd: Command (see below)
491  * @count: Size of the buffer to read/write
492  * @buffer: Pointer in the guest memory
493  *
494  * List of commands:
495  *
496  * * CONSOLEIO_write: Write the buffer to Xen console.
497  * For the hardware domain, all the characters in the buffer will
498  * be written. Characters will be printed directly to the console.
499  * For all the other domains, only the printable characters will be
500  * written. Characters may be buffered until a newline (i.e '\n') is
501  * found.
502  * @return 0 on success, otherwise return an error code.
503  * * CONSOLEIO_read: Attempts to read up to @count characters from Xen
504  * console. The maximum buffer size (i.e. @count) supported is 2GB.
505  * @return the number of characters read on success, otherwise return
506  * an error code.
507  */
508 #define CONSOLEIO_write 0
509 #define CONSOLEIO_read 1
510 
511 /*
512  * Commands to HYPERVISOR_vm_assist().
513  */
514 #define VMASST_CMD_enable 0
515 #define VMASST_CMD_disable 1
516 
517 /* x86/32 guests: simulate full 4GB segment limits. */
518 #define VMASST_TYPE_4gb_segments 0
519 
520 /* x86/32 guests: trap (vector 15) whenever above vmassist is used. */
521 #define VMASST_TYPE_4gb_segments_notify 1
522 
523 /*
524  * x86 guests: support writes to bottom-level PTEs.
525  * NB1. Page-directory entries cannot be written.
526  * NB2. Guest must continue to remove all writable mappings of PTEs.
527  */
528 #define VMASST_TYPE_writable_pagetables 2
529 
530 /* x86/PAE guests: support PDPTs above 4GB. */
531 #define VMASST_TYPE_pae_extended_cr3 3
532 
533 /*
534  * x86 guests: Sane behaviour for virtual iopl
535  * - virtual iopl updated from do_iret() hypercalls.
536  * - virtual iopl reported in bounce frames.
537  * - guest kernels assumed to be level 0 for the purpose of iopl checks.
538  */
539 #define VMASST_TYPE_architectural_iopl 4
540 
541 /*
542  * All guests: activate update indicator in vcpu_runstate_info
543  * Enable setting the XEN_RUNSTATE_UPDATE flag in guest memory mapped
544  * vcpu_runstate_info during updates of the runstate information.
545  */
546 #define VMASST_TYPE_runstate_update_flag 5
547 
548 /*
549  * x86/64 guests: strictly hide M2P from user mode.
550  * This allows the guest to control respective hypervisor behavior:
551  * - when not set, L4 tables get created with the respective slot blank,
552  * and whenever the L4 table gets used as a kernel one the missing
553  * mapping gets inserted,
554  * - when set, L4 tables get created with the respective slot initialized
555  * as before, and whenever the L4 table gets used as a user one the
556  * mapping gets zapped.
557  */
558 #define VMASST_TYPE_m2p_strict 32
559 
560 #if __XEN_INTERFACE_VERSION__ < 0x00040600
561 #define MAX_VMASST_TYPE 3
562 #endif
563 
564 /* Domain ids >= DOMID_FIRST_RESERVED cannot be used for ordinary domains. */
565 #define DOMID_FIRST_RESERVED xen_mk_uint(0x7FF0)
566 
567 /* DOMID_SELF is used in certain contexts to refer to oneself. */
568 #define DOMID_SELF xen_mk_uint(0x7FF0)
569 
570 /*
571  * DOMID_IO is used to restrict page-table updates to mapping I/O memory.
572  * Although no Foreign Domain need be specified to map I/O pages, DOMID_IO
573  * is useful to ensure that no mappings to the OS's own heap are accidentally
574  * installed. (e.g., in Linux this could cause havoc as reference counts
575  * aren't adjusted on the I/O-mapping code path).
576  * This only makes sense as HYPERVISOR_mmu_update()'s and
577  * HYPERVISOR_update_va_mapping_otherdomain()'s "foreigndom" argument. For
578  * HYPERVISOR_mmu_update() context it can be specified by any calling domain,
579  * otherwise it's only permitted if the caller is privileged.
580  */
581 #define DOMID_IO xen_mk_uint(0x7FF1)
582 
583 /*
584  * DOMID_XEN is used to allow privileged domains to map restricted parts of
585  * Xen's heap space (e.g., the machine_to_phys table).
586  * This only makes sense as
587  * - HYPERVISOR_mmu_update()'s, HYPERVISOR_mmuext_op()'s, or
588  * HYPERVISOR_update_va_mapping_otherdomain()'s "foreigndom" argument,
589  * - with XENMAPSPACE_gmfn_foreign,
590  * and is only permitted if the caller is privileged.
591  */
592 #define DOMID_XEN xen_mk_uint(0x7FF2)
593 
594 /*
595  * DOMID_COW is used as the owner of sharable pages */
596 #define DOMID_COW xen_mk_uint(0x7FF3)
597 
598 /* DOMID_INVALID is used to identify pages with unknown owner. */
599 #define DOMID_INVALID xen_mk_uint(0x7FF4)
600 
601 /* Idle domain. */
602 #define DOMID_IDLE xen_mk_uint(0x7FFF)
603 
604 /* Mask for valid domain id values */
605 #define DOMID_MASK xen_mk_uint(0x7FFF)
606 
607 #ifndef __ASSEMBLY__
608 
610 
611 /*
612  * Send an array of these to HYPERVISOR_mmu_update().
613  * NB. The fields are natural pointer/address size for this architecture.
614  */
615 struct mmu_update {
616  uint64_t ptr; /* Machine address of PTE. */
617  uint64_t val; /* New contents of PTE. */
618 };
619 typedef struct mmu_update mmu_update_t;
621 
622 /*
623  * ` enum neg_errnoval
624  * ` HYPERVISOR_multicall(multicall_entry_t call_list[],
625  * ` uint32_t nr_calls);
626  *
627  * NB. The fields are logically the natural register size for this
628  * architecture. In cases where xen_ulong_t is larger than this then
629  * any unused bits in the upper portion must be zero.
630  */
634 };
637 
638 #if __XEN_INTERFACE_VERSION__ < 0x00040400
639 /*
640  * Event channel endpoints per domain (when using the 2-level ABI):
641  * 1024 if a long is 32 bits; 4096 if a long is 64 bits.
642  */
643 #define NR_EVENT_CHANNELS EVTCHN_2L_NR_CHANNELS
644 #endif
645 
647  /*
648  * Updates to the following values are preceded and followed by an
649  * increment of 'version'. The guest can therefore detect updates by
650  * looking for changes to 'version'. If the least-significant bit of
651  * the version number is set then an update is in progress and the guest
652  * must wait to read a consistent set of values.
653  * The correct way to interact with the version number is similar to
654  * Linux's seqlock: see the implementations of read_seqbegin/read_seqretry.
655  */
658  uint64_t tsc_timestamp; /* TSC at last update of time vals. */
659  uint64_t system_time; /* Time, in nanosecs, since boot. */
660  /*
661  * Current system time:
662  * system_time +
663  * ((((tsc - tsc_timestamp) << tsc_shift) * tsc_to_system_mul) >> 32)
664  * CPU frequency (Hz):
665  * ((10^9 << 32) / tsc_to_system_mul) >> tsc_shift
666  */
669 #if __XEN_INTERFACE_VERSION__ > 0x040600
670  uint8_t flags;
671  uint8_t pad1[2];
672 #else
674 #endif
675 }; /* 32 bytes */
677 
678 #define XEN_PVCLOCK_TSC_STABLE_BIT (1 << 0)
679 #define XEN_PVCLOCK_GUEST_STOPPED (1 << 1)
680 
681 struct vcpu_info {
682  /*
683  * 'evtchn_upcall_pending' is written non-zero by Xen to indicate
684  * a pending notification for a particular VCPU. It is then cleared
685  * by the guest OS /before/ checking for pending work, thus avoiding
686  * a set-and-check race. Note that the mask is only accessed by Xen
687  * on the CPU that is currently hosting the VCPU. This means that the
688  * pending and mask flags can be updated by the guest without special
689  * synchronisation (i.e., no need for the x86 LOCK prefix).
690  * This may seem suboptimal because if the pending flag is set by
691  * a different CPU then an IPI may be scheduled even when the mask
692  * is set. However, note:
693  * 1. The task of 'interrupt holdoff' is covered by the per-event-
694  * channel mask bits. A 'noisy' event that is continually being
695  * triggered can be masked at source at this very precise
696  * granularity.
697  * 2. The main purpose of the per-VCPU mask is therefore to restrict
698  * reentrant execution: whether for concurrency control, or to
699  * prevent unbounded stack usage. Whatever the purpose, we expect
700  * that the mask will be asserted only for short periods at a time,
701  * and so the likelihood of a 'spurious' IPI is suitably small.
702  * The mask is read before making an event upcall to the guest: a
703  * non-zero mask therefore guarantees that the VCPU will not receive
704  * an upcall activation. The mask is cleared when the VCPU requests
705  * to block: this avoids wakeup-waiting races.
706  */
708 #ifdef XEN_HAVE_PV_UPCALL_MASK
709  uint8_t evtchn_upcall_mask;
710 #else /* XEN_HAVE_PV_UPCALL_MASK */
712 #endif /* XEN_HAVE_PV_UPCALL_MASK */
716 }; /* 64 bytes (x86) */
717 #ifndef __XEN__
718 typedef struct vcpu_info vcpu_info_t;
719 #endif
720 
721 /*
722  * `incontents 200 startofday_shared Start-of-day shared data structure
723  * Xen/kernel shared data -- pointer provided in start_info.
724  *
725  * This structure is defined to be both smaller than a page, and the
726  * only data on the shared page, but may vary in actual size even within
727  * compatible Xen versions; guests should not rely on the size
728  * of this structure remaining constant.
729  */
730 struct shared_info {
732 
733  /*
734  * A domain can create "event channels" on which it can send and receive
735  * asynchronous event notifications. There are three classes of event that
736  * are delivered by this mechanism:
737  * 1. Bi-directional inter- and intra-domain connections. Domains must
738  * arrange out-of-band to set up a connection (usually by allocating
739  * an unbound 'listener' port and avertising that via a storage service
740  * such as xenstore).
741  * 2. Physical interrupts. A domain with suitable hardware-access
742  * privileges can bind an event-channel port to a physical interrupt
743  * source.
744  * 3. Virtual interrupts ('events'). A domain can bind an event-channel
745  * port to a virtual interrupt source, such as the virtual-timer
746  * device or the emergency console.
747  *
748  * Event channels are addressed by a "port index". Each channel is
749  * associated with two bits of information:
750  * 1. PENDING -- notifies the domain that there is a pending notification
751  * to be processed. This bit is cleared by the guest.
752  * 2. MASK -- if this bit is clear then a 0->1 transition of PENDING
753  * will cause an asynchronous upcall to be scheduled. This bit is only
754  * updated by the guest. It is read-only within Xen. If a channel
755  * becomes pending while the channel is masked then the 'edge' is lost
756  * (i.e., when the channel is unmasked, the guest must manually handle
757  * pending notifications as no upcall will be scheduled by Xen).
758  *
759  * To expedite scanning of pending notifications, any 0->1 pending
760  * transition on an unmasked channel causes a corresponding bit in a
761  * per-vcpu selector word to be set. Each bit in the selector covers a
762  * 'C long' in the PENDING bitfield array.
763  */
766 
767  /*
768  * Wallclock time: updated by control software or RTC emulation.
769  * Guests should base their gettimeofday() syscall on this
770  * wallclock-base value.
771  * The values of wc_sec and wc_nsec are offsets from the Unix epoch
772  * adjusted by the domain's 'time offset' (in seconds) as set either
773  * by XEN_DOMCTL_settimeoffset, or adjusted via a guest write to the
774  * emulated RTC.
775  */
776  uint32_t wc_version; /* Version counter: see vcpu_time_info_t. */
779 #if !defined(__i386__)
781 # define xen_wc_sec_hi wc_sec_hi
782 #elif !defined(__XEN__) && !defined(__XEN_TOOLS__)
783 # define xen_wc_sec_hi arch.wc_sec_hi
784 #endif
785 
787 
788 };
789 #ifndef __XEN__
790 typedef struct shared_info shared_info_t;
791 #endif
792 
793 /*
794  * `incontents 200 startofday Start-of-day memory layout
795  *
796  * 1. The domain is started within contiguous virtual-memory region.
797  * 2. The contiguous region ends on an aligned 4MB boundary.
798  * 3. This the order of bootstrap elements in the initial virtual region:
799  * a. relocated kernel image
800  * b. initial ram disk [mod_start, mod_len]
801  * (may be omitted)
802  * c. list of allocated page frames [mfn_list, nr_pages]
803  * (unless relocated due to XEN_ELFNOTE_INIT_P2M)
804  * d. start_info_t structure [register rSI (x86)]
805  * in case of dom0 this page contains the console info, too
806  * e. unless dom0: xenstore ring page
807  * f. unless dom0: console ring page
808  * g. bootstrap page tables [pt_base and CR3 (x86)]
809  * h. bootstrap stack [register ESP (x86)]
810  * 4. Bootstrap elements are packed together, but each is 4kB-aligned.
811  * 5. The list of page frames forms a contiguous 'pseudo-physical' memory
812  * layout for the domain. In particular, the bootstrap virtual-memory
813  * region is a 1:1 mapping to the first section of the pseudo-physical map.
814  * 6. All bootstrap elements are mapped read-writable for the guest OS. The
815  * only exception is the bootstrap page table, which is mapped read-only.
816  * 7. There is guaranteed to be at least 512kB padding after the final
817  * bootstrap element. If necessary, the bootstrap virtual region is
818  * extended by an extra 4MB to ensure this.
819  *
820  * Note: Prior to 25833:bb85bbccb1c9. ("x86/32-on-64 adjust Dom0 initial page
821  * table layout") a bug caused the pt_base (3.g above) and cr3 to not point
822  * to the start of the guest page tables (it was offset by two pages).
823  * This only manifested itself on 32-on-64 dom0 kernels and not 32-on-64 domU
824  * or 64-bit kernels of any colour. The page tables for a 32-on-64 dom0 got
825  * allocated in the order: 'first L1','first L2', 'first L3', so the offset
826  * to the page table base is by two pages back. The initial domain if it is
827  * 32-bit and runs under a 64-bit hypervisor should _NOT_ use two of the
828  * pages preceding pt_base and mark them as reserved/unused.
829  */
830 #ifdef XEN_HAVE_PV_GUEST_ENTRY
831 struct start_info {
832  /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */
833  char magic[32]; /* "xen-<version>-<platform>". */
834  unsigned long nr_pages; /* Total pages allocated to this domain. */
835  unsigned long shared_info; /* MACHINE address of shared info struct. */
836  uint32_t flags; /* SIF_xxx flags. */
837  xen_pfn_t store_mfn; /* MACHINE page number of shared page. */
838  uint32_t store_evtchn; /* Event channel for store communication. */
839  union {
840  struct {
841  xen_pfn_t mfn; /* MACHINE page number of console page. */
842  uint32_t evtchn; /* Event channel for console page. */
843  } domU;
844  struct {
845  uint32_t info_off; /* Offset of console_info struct. */
846  uint32_t info_size; /* Size of console_info struct from start.*/
847  } dom0;
848  } console;
849  /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME). */
850  unsigned long pt_base; /* VIRTUAL address of page directory. */
851  unsigned long nr_pt_frames; /* Number of bootstrap p.t. frames. */
852  unsigned long mfn_list; /* VIRTUAL address of page-frame list. */
853  unsigned long mod_start; /* VIRTUAL address of pre-loaded module */
854  /* (PFN of pre-loaded module if */
855  /* SIF_MOD_START_PFN set in flags). */
856  unsigned long mod_len; /* Size (bytes) of pre-loaded module. */
857 #define MAX_GUEST_CMDLINE 1024
858  int8_t cmd_line[MAX_GUEST_CMDLINE];
859  /* The pfn range here covers both page table and p->m table frames. */
860  unsigned long first_p2m_pfn;/* 1st pfn forming initial P->M table. */
861  unsigned long nr_p2m_frames;/* # of pfns forming initial P->M table. */
862 };
863 typedef struct start_info start_info_t;
864 
865 /* New console union for dom0 introduced in 0x00030203. */
866 #if __XEN_INTERFACE_VERSION__ < 0x00030203
867 #define console_mfn console.domU.mfn
868 #define console_evtchn console.domU.evtchn
869 #endif
870 #endif /* XEN_HAVE_PV_GUEST_ENTRY */
871 
872 /* These flags are passed in the 'flags' field of start_info_t. */
873 #define SIF_PRIVILEGED (1<<0) /* Is the domain privileged? */
874 #define SIF_INITDOMAIN (1<<1) /* Is this the initial control domain? */
875 #define SIF_MULTIBOOT_MOD (1<<2) /* Is mod_start a multiboot module? */
876 #define SIF_MOD_START_PFN (1<<3) /* Is mod_start a PFN? */
877 #define SIF_VIRT_P2M_4TOOLS (1<<4) /* Do Xen tools understand a virt. mapped */
878  /* P->M making the 3 level tree obsolete? */
879 #define SIF_PM_MASK (0xFF<<8) /* reserve 1 byte for xen-pm options */
880 
881 /*
882  * A multiboot module is a package containing modules very similar to a
883  * multiboot module array. The only differences are:
884  * - the array of module descriptors is by convention simply at the beginning
885  * of the multiboot module,
886  * - addresses in the module descriptors are based on the beginning of the
887  * multiboot module,
888  * - the number of modules is determined by a termination descriptor that has
889  * mod_start == 0.
890  *
891  * This permits to both build it statically and reference it in a configuration
892  * file, and let the PV guest easily rebase the addresses to virtual addresses
893  * and at the same time count the number of modules.
894  */
896 {
897  /* Address of first byte of the module */
899  /* Address of last byte of the module (inclusive) */
901  /* Address of zero-terminated command line */
903  /* Unused, must be zero */
905 };
906 /*
907  * `incontents 200 startofday_dom0_console Dom0_console
908  *
909  * The console structure in start_info.console.dom0
910  *
911  * This structure includes a variety of information required to
912  * have a working VGA/VESA console.
913  */
914 typedef struct dom0_vga_console_info {
915  uint8_t video_type; /* DOM0_VGA_CONSOLE_??? */
916 #define XEN_VGATYPE_TEXT_MODE_3 0x03
917 #define XEN_VGATYPE_VESA_LFB 0x23
918 #define XEN_VGATYPE_EFI_LFB 0x70
919 
920  union {
921  struct {
922  /* Font height, in pixels. */
924  /* Cursor location (column, row). */
926  /* Number of rows and columns (dimensions in characters). */
928  } text_mode_3;
929 
930  struct {
931  /* Width and height, in pixels. */
933  /* Bytes per scan line. */
935  /* Bits per pixel. */
937  /* LFB physical address, and size (in units of 64kB). */
940  /* RGB mask offsets and sizes, as defined by VBE 1.2+ */
945 #if __XEN_INTERFACE_VERSION__ >= 0x00030206
946  /* VESA capabilities (offset 0xa, VESA command 0x4f00). */
947  uint32_t gbl_caps;
948  /* Mode attributes (offset 0x0, VESA command 0x4f01). */
949  uint16_t mode_attrs;
950  uint16_t pad;
951 #endif
952 #if __XEN_INTERFACE_VERSION__ >= 0x00040d00
953  /* high 32 bits of lfb_base */
954  uint32_t ext_lfb_base;
955 #endif
956  } vesa_lfb;
957  } u;
959 #define xen_vga_console_info dom0_vga_console_info
960 #define xen_vga_console_info_t dom0_vga_console_info_t
961 
963 
968 
969 typedef struct {
970  uint8_t a[16];
971 } xen_uuid_t;
972 
973 /*
974  * XEN_DEFINE_UUID(0x00112233, 0x4455, 0x6677, 0x8899,
975  * 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff)
976  * will construct UUID 00112233-4455-6677-8899-aabbccddeeff presented as
977  * {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88,
978  * 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
979  *
980  * NB: This is compatible with Linux kernel and with libuuid, but it is not
981  * compatible with Microsoft, as they use mixed-endian encoding (some
982  * components are little-endian, some are big-endian).
983  */
984 #define XEN_DEFINE_UUID_(a, b, c, d, e1, e2, e3, e4, e5, e6) \
985  {{((a) >> 24) & 0xFF, ((a) >> 16) & 0xFF, \
986  ((a) >> 8) & 0xFF, ((a) >> 0) & 0xFF, \
987  ((b) >> 8) & 0xFF, ((b) >> 0) & 0xFF, \
988  ((c) >> 8) & 0xFF, ((c) >> 0) & 0xFF, \
989  ((d) >> 8) & 0xFF, ((d) >> 0) & 0xFF, \
990  e1, e2, e3, e4, e5, e6}}
991 
992 #if defined(__STDC_VERSION__) ? __STDC_VERSION__ >= 199901L : defined(__GNUC__)
993 #define XEN_DEFINE_UUID(a, b, c, d, e1, e2, e3, e4, e5, e6) \
994  ((xen_uuid_t)XEN_DEFINE_UUID_(a, b, c, d, e1, e2, e3, e4, e5, e6))
995 #else
996 #define XEN_DEFINE_UUID(a, b, c, d, e1, e2, e3, e4, e5, e6) \
997  XEN_DEFINE_UUID_(a, b, c, d, e1, e2, e3, e4, e5, e6)
998 #endif /* __STDC_VERSION__ / __GNUC__ */
999 
1000 #endif /* !__ASSEMBLY__ */
1001 
1002 /* Default definitions for macros used by domctl/sysctl. */
1003 #if defined(__XEN__) || defined(__XEN_TOOLS__)
1004 
1005 #ifndef int64_aligned_t
1006 #define int64_aligned_t int64_t
1007 #endif
1008 #ifndef uint64_aligned_t
1009 #define uint64_aligned_t uint64_t
1010 #endif
1011 #ifndef XEN_GUEST_HANDLE_64
1012 #define XEN_GUEST_HANDLE_64(name) XEN_GUEST_HANDLE(name)
1013 #endif
1014 
1015 #ifndef __ASSEMBLY__
1016 struct xenctl_bitmap {
1017  XEN_GUEST_HANDLE_64(uint8) bitmap;
1018  uint32_t nr_bits;
1019 };
1020 typedef struct xenctl_bitmap xenctl_bitmap_t;
1021 #endif
1022 
1023 #endif /* defined(__XEN__) || defined(__XEN_TOOLS__) */
1024 
1025 #endif /* __XEN_PUBLIC_XEN_H__ */
1026 
1027 /*
1028  * Local variables:
1029  * mode: C
1030  * c-file-style: "BSD"
1031  * c-basic-offset: 4
1032  * tab-width: 4
1033  * indent-tabs-mode: nil
1034  * End:
1035  */
uint32_t mod_end
Definition: xen.h:900
uint32_t cmdline
Definition: xen.h:902
unsigned short uint16_t
Definition: stdint.h:11
uint64_t ptr
Definition: xen.h:616
uint32_t wc_sec
Definition: xen.h:777
uint8_t green_pos
Definition: xen.h:942
uint16_t domid_t
Definition: xen.h:609
uint8_t rsvd_size
Definition: xen.h:944
uint32_t pad0
Definition: xen.h:657
uint32_t mod_start
Definition: multiboot.h:12
xen_ulong_t op
Definition: xen.h:632
uint16_t bytes_per_line
Definition: xen.h:934
Definition: xen.h:681
uint64_t val
Definition: xen.h:617
uint16_t magic
Magic signature.
Definition: bzimage.h:6
xen_ulong_t result
Definition: xen.h:632
uint32_t wc_nsec
Definition: xen.h:778
vcpu_time_info_t time
Definition: xen.h:715
xen_pfn_t mfn
Definition: xen.h:436
uint16_t height
Definition: xen.h:932
__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char)
#define XEN_LEGACY_MAX_VCPUS
Definition: xen.h:103
xen_pfn_t src_mfn
Definition: xen.h:450
unsigned long long uint64_t
Definition: stdint.h:13
uint32_t wc_sec_hi
Definition: xen.h:780
u32 pad[9]
Padding.
Definition: ar9003_mac.h:47
union dom0_vga_console_info::@696 u
#define XEN_GUEST_HANDLE(name)
Definition: xen.h:40
FILE_SECBOOT(PERMITTED)
uint8_t blue_size
Definition: xen.h:943
uint8_t uint8
Definition: stdint.h:29
int8_t pad1[3]
Definition: xen.h:673
uint32_t pad
Definition: xen.h:904
unsigned long xen_ulong_t
Definition: xen.h:107
struct arch_shared_info arch
Definition: xen.h:786
uint32_t tsc_to_system_mul
Definition: xen.h:667
uint32_t mod_start
Definition: xen.h:898
uint8_t red_size
Definition: xen.h:941
xen_ulong_t evtchn_pending_sel
Definition: xen.h:713
uint8_t blue_pos
Definition: xen.h:943
signed char int8_t
Definition: stdint.h:15
xen_ulong_t evtchn_pending[sizeof(xen_ulong_t) *8]
Definition: xen.h:764
A bitmap.
Definition: bitmap.h:40
uint16_t columns
Definition: xen.h:927
uint16_t bits_per_pixel
Definition: xen.h:936
uint32_t lfb_size
Definition: xen.h:939
uint16_t width
Definition: xen.h:932
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint8_t flags
Flags.
Definition: ena.h:18
Definition: xen.h:631
union mmuext_op::@695 arg2
unsigned long xen_pfn_t
Definition: nonxen.h:25
Definition: xen.h:431
uint16_t uint16
Definition: stdint.h:31
uint8_t red_pos
Definition: xen.h:941
unsigned char uint8_t
Definition: stdint.h:10
uint8_t green_size
Definition: xen.h:942
uint32_t wc_version
Definition: xen.h:776
unsigned int uint32_t
Definition: stdint.h:12
uint64_t uint64
Definition: stdint.h:35
struct dom0_vga_console_info::@696::@698 vesa_lfb
int8_t tsc_shift
Definition: xen.h:668
union mmuext_op::@694 arg1
const void * vcpumask
Definition: xen.h:447
uint16_t rows
Definition: xen.h:927
unsigned int cmd
Definition: xen.h:432
uint8_t pad0
Definition: xen.h:711
uint16_t cursor_x
Definition: xen.h:925
struct dom0_vga_console_info::@696::@697 text_mode_3
unsigned long linear_addr
Definition: xen.h:438
xen_ulong_t args[6]
Definition: xen.h:633
uint8_t rsvd_pos
Definition: xen.h:944
DEFINE_XEN_GUEST_HANDLE(trap_info_t)
unsigned long xen_ulong_t
Definition: nonxen.h:27
uint8_t video_type
Definition: xen.h:915
struct arch_vcpu_info arch
Definition: xen.h:714
uint8_t xen_domain_handle_t[16]
Definition: xen.h:962
uint32_t lfb_base
Definition: xen.h:938
uint16_t cursor_y
Definition: xen.h:925
uint32_t version
Definition: xen.h:656
uint16_t font_height
Definition: xen.h:923
xen_ulong_t evtchn_mask[sizeof(xen_ulong_t) *8]
Definition: xen.h:765
unsigned int nr_ents
Definition: xen.h:442
struct dom0_vga_console_info dom0_vga_console_info_t
uint8_t evtchn_upcall_pending
Definition: xen.h:707
uint32_t uint32
Definition: stdint.h:33
uint64_t system_time
Definition: xen.h:659
uint64_t tsc_timestamp
Definition: xen.h:658