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