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