xen.h 38 KB

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