ia64/xen-unstable

view xen/include/public/arch-ia64.h @ 16682:7515dc56c124

[IA64] Sort out the XEN_IA64_OPTF_IDENT_MAP_REG[457] constants confusion

Currently the constants are used for two different purpose.
one is for the OPTF hypercall sub command.
another is bit flag for struct opt_feature::mask.
They are different spaces, split them out.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Sun Dec 30 13:02:16 2007 -0700 (2007-12-30)
parents ad0f20f5590a
children 692a91e3b262
line source
1 /******************************************************************************
2 * arch-ia64/hypervisor-if.h
3 *
4 * Guest OS interface to IA64 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 */
26 #ifndef __HYPERVISOR_IF_IA64_H__
27 #define __HYPERVISOR_IF_IA64_H__
29 /* Structural guest handles introduced in 0x00030201. */
30 #if __XEN_INTERFACE_VERSION__ >= 0x00030201
31 #define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
32 typedef struct { type *p; } __guest_handle_ ## name
33 #else
34 #define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
35 typedef type * __guest_handle_ ## name
36 #endif
38 #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
39 ___DEFINE_XEN_GUEST_HANDLE(name, type)
40 #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
41 #define XEN_GUEST_HANDLE(name) __guest_handle_ ## name
42 #define XEN_GUEST_HANDLE_64(name) XEN_GUEST_HANDLE(name)
43 #define uint64_aligned_t uint64_t
44 #define set_xen_guest_handle(hnd, val) do { (hnd).p = val; } while (0)
45 #ifdef __XEN_TOOLS__
46 #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0)
47 #endif
49 #ifndef __ASSEMBLY__
50 /* Guest handles for primitive C types. */
51 __DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
52 __DEFINE_XEN_GUEST_HANDLE(uint, unsigned int);
53 __DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
54 __DEFINE_XEN_GUEST_HANDLE(u64, unsigned long);
55 DEFINE_XEN_GUEST_HANDLE(char);
56 DEFINE_XEN_GUEST_HANDLE(int);
57 DEFINE_XEN_GUEST_HANDLE(long);
58 DEFINE_XEN_GUEST_HANDLE(void);
60 typedef unsigned long xen_pfn_t;
61 DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
62 #define PRI_xen_pfn "lx"
63 #endif
65 /* Arch specific VIRQs definition */
66 #define VIRQ_ITC VIRQ_ARCH_0 /* V. Virtual itc timer */
67 #define VIRQ_MCA_CMC VIRQ_ARCH_1 /* MCA cmc interrupt */
68 #define VIRQ_MCA_CPE VIRQ_ARCH_2 /* MCA cpe interrupt */
70 /* Maximum number of virtual CPUs in multi-processor guests. */
71 /* WARNING: before changing this, check that shared_info fits on a page */
72 #define MAX_VIRT_CPUS 64
74 #ifndef __ASSEMBLY__
76 typedef unsigned long xen_ulong_t;
78 #ifdef __XEN_TOOLS__
79 #define XEN_PAGE_SIZE XC_PAGE_SIZE
80 #else
81 #define XEN_PAGE_SIZE PAGE_SIZE
82 #endif
84 #define INVALID_MFN (~0UL)
86 #define MEM_G (1UL << 30)
87 #define MEM_M (1UL << 20)
88 #define MEM_K (1UL << 10)
90 /* Guest physical address of IO ports space. */
91 #define IO_PORTS_PADDR 0x00000ffffc000000UL
92 #define IO_PORTS_SIZE 0x0000000004000000UL
94 #define MMIO_START (3 * MEM_G)
95 #define MMIO_SIZE (512 * MEM_M)
97 #define VGA_IO_START 0xA0000UL
98 #define VGA_IO_SIZE 0x20000
100 #define LEGACY_IO_START (MMIO_START + MMIO_SIZE)
101 #define LEGACY_IO_SIZE (64*MEM_M)
103 #define IO_PAGE_START (LEGACY_IO_START + LEGACY_IO_SIZE)
104 #define IO_PAGE_SIZE XEN_PAGE_SIZE
106 #define STORE_PAGE_START (IO_PAGE_START + IO_PAGE_SIZE)
107 #define STORE_PAGE_SIZE XEN_PAGE_SIZE
109 #define BUFFER_IO_PAGE_START (STORE_PAGE_START + STORE_PAGE_SIZE)
110 #define BUFFER_IO_PAGE_SIZE XEN_PAGE_SIZE
112 #define BUFFER_PIO_PAGE_START (BUFFER_IO_PAGE_START + BUFFER_IO_PAGE_SIZE)
113 #define BUFFER_PIO_PAGE_SIZE XEN_PAGE_SIZE
115 #define IO_SAPIC_START 0xfec00000UL
116 #define IO_SAPIC_SIZE 0x100000
118 #define PIB_START 0xfee00000UL
119 #define PIB_SIZE 0x200000
121 #define GFW_START (4*MEM_G -16*MEM_M)
122 #define GFW_SIZE (16*MEM_M)
124 /* Nvram belongs to GFW memory space */
125 #define NVRAM_SIZE (MEM_K * 64)
126 #define NVRAM_START (GFW_START + 10 * MEM_M)
128 #define NVRAM_VALID_SIG 0x4650494e45584948 // "HIXENIPF"
129 struct nvram_save_addr {
130 unsigned long addr;
131 unsigned long signature;
132 };
134 struct pt_fpreg {
135 union {
136 unsigned long bits[2];
137 long double __dummy; /* force 16-byte alignment */
138 } u;
139 };
141 union vac {
142 unsigned long value;
143 struct {
144 int a_int:1;
145 int a_from_int_cr:1;
146 int a_to_int_cr:1;
147 int a_from_psr:1;
148 int a_from_cpuid:1;
149 int a_cover:1;
150 int a_bsw:1;
151 long reserved:57;
152 };
153 };
154 typedef union vac vac_t;
156 union vdc {
157 unsigned long value;
158 struct {
159 int d_vmsw:1;
160 int d_extint:1;
161 int d_ibr_dbr:1;
162 int d_pmc:1;
163 int d_to_pmd:1;
164 int d_itm:1;
165 long reserved:58;
166 };
167 };
168 typedef union vdc vdc_t;
170 struct mapped_regs {
171 union vac vac;
172 union vdc vdc;
173 unsigned long virt_env_vaddr;
174 unsigned long reserved1[29];
175 unsigned long vhpi;
176 unsigned long reserved2[95];
177 union {
178 unsigned long vgr[16];
179 unsigned long bank1_regs[16]; // bank1 regs (r16-r31) when bank0 active
180 };
181 union {
182 unsigned long vbgr[16];
183 unsigned long bank0_regs[16]; // bank0 regs (r16-r31) when bank1 active
184 };
185 unsigned long vnat;
186 unsigned long vbnat;
187 unsigned long vcpuid[5];
188 unsigned long reserved3[11];
189 unsigned long vpsr;
190 unsigned long vpr;
191 unsigned long reserved4[76];
192 union {
193 unsigned long vcr[128];
194 struct {
195 unsigned long dcr; // CR0
196 unsigned long itm;
197 unsigned long iva;
198 unsigned long rsv1[5];
199 unsigned long pta; // CR8
200 unsigned long rsv2[7];
201 unsigned long ipsr; // CR16
202 unsigned long isr;
203 unsigned long rsv3;
204 unsigned long iip;
205 unsigned long ifa;
206 unsigned long itir;
207 unsigned long iipa;
208 unsigned long ifs;
209 unsigned long iim; // CR24
210 unsigned long iha;
211 unsigned long rsv4[38];
212 unsigned long lid; // CR64
213 unsigned long ivr;
214 unsigned long tpr;
215 unsigned long eoi;
216 unsigned long irr[4];
217 unsigned long itv; // CR72
218 unsigned long pmv;
219 unsigned long cmcv;
220 unsigned long rsv5[5];
221 unsigned long lrr0; // CR80
222 unsigned long lrr1;
223 unsigned long rsv6[46];
224 };
225 };
226 union {
227 unsigned long reserved5[128];
228 struct {
229 unsigned long precover_ifs;
230 unsigned long unat; // not sure if this is needed until NaT arch is done
231 int interrupt_collection_enabled; // virtual psr.ic
232 /* virtual interrupt deliverable flag is evtchn_upcall_mask in
233 * shared info area now. interrupt_mask_addr is the address
234 * of evtchn_upcall_mask for current vcpu
235 */
236 unsigned char *interrupt_mask_addr;
237 int pending_interruption;
238 unsigned char vpsr_pp;
239 unsigned char vpsr_dfh;
240 unsigned char hpsr_dfh;
241 unsigned char hpsr_mfh;
242 unsigned long reserved5_1[4];
243 int metaphysical_mode; // 1 = use metaphys mapping, 0 = use virtual
244 int banknum; // 0 or 1, which virtual register bank is active
245 unsigned long rrs[8]; // region registers
246 unsigned long krs[8]; // kernel registers
247 unsigned long tmp[16]; // temp registers (e.g. for hyperprivops)
248 };
249 };
250 };
251 typedef struct mapped_regs mapped_regs_t;
253 struct vpd {
254 struct mapped_regs vpd_low;
255 unsigned long reserved6[3456];
256 unsigned long vmm_avail[128];
257 unsigned long reserved7[4096];
258 };
259 typedef struct vpd vpd_t;
261 struct arch_vcpu_info {
262 };
263 typedef struct arch_vcpu_info arch_vcpu_info_t;
265 /*
266 * This structure is used for magic page in domain pseudo physical address
267 * space and the result of XENMEM_machine_memory_map.
268 * As the XENMEM_machine_memory_map result,
269 * xen_memory_map::nr_entries indicates the size in bytes
270 * including struct xen_ia64_memmap_info. Not the number of entries.
271 */
272 struct xen_ia64_memmap_info {
273 uint64_t efi_memmap_size; /* size of EFI memory map */
274 uint64_t efi_memdesc_size; /* size of an EFI memory map descriptor */
275 uint32_t efi_memdesc_version; /* memory descriptor version */
276 void *memdesc[0]; /* array of efi_memory_desc_t */
277 };
278 typedef struct xen_ia64_memmap_info xen_ia64_memmap_info_t;
280 struct arch_shared_info {
281 /* PFN of the start_info page. */
282 unsigned long start_info_pfn;
284 /* Interrupt vector for event channel. */
285 int evtchn_vector;
287 /* PFN of memmap_info page */
288 unsigned int memmap_info_num_pages;/* currently only = 1 case is
289 supported. */
290 unsigned long memmap_info_pfn;
292 uint64_t pad[31];
293 };
294 typedef struct arch_shared_info arch_shared_info_t;
296 typedef unsigned long xen_callback_t;
298 struct ia64_tr_entry {
299 unsigned long pte;
300 unsigned long itir;
301 unsigned long vadr;
302 unsigned long rid;
303 };
304 typedef struct ia64_tr_entry ia64_tr_entry_t;
305 DEFINE_XEN_GUEST_HANDLE(ia64_tr_entry_t);
307 struct vcpu_tr_regs {
308 struct ia64_tr_entry itrs[12];
309 struct ia64_tr_entry dtrs[12];
310 };
312 union vcpu_ar_regs {
313 unsigned long ar[128];
314 struct {
315 unsigned long kr[8];
316 unsigned long rsv1[8];
317 unsigned long rsc;
318 unsigned long bsp;
319 unsigned long bspstore;
320 unsigned long rnat;
321 unsigned long rsv2;
322 unsigned long fcr;
323 unsigned long rsv3[2];
324 unsigned long eflag;
325 unsigned long csd;
326 unsigned long ssd;
327 unsigned long cflg;
328 unsigned long fsr;
329 unsigned long fir;
330 unsigned long fdr;
331 unsigned long rsv4;
332 unsigned long ccv; /* 32 */
333 unsigned long rsv5[3];
334 unsigned long unat;
335 unsigned long rsv6[3];
336 unsigned long fpsr;
337 unsigned long rsv7[3];
338 unsigned long itc;
339 unsigned long rsv8[3];
340 unsigned long ign1[16];
341 unsigned long pfs; /* 64 */
342 unsigned long lc;
343 unsigned long ec;
344 unsigned long rsv9[45];
345 unsigned long ign2[16];
346 };
347 };
349 union vcpu_cr_regs {
350 unsigned long cr[128];
351 struct {
352 unsigned long dcr; // CR0
353 unsigned long itm;
354 unsigned long iva;
355 unsigned long rsv1[5];
356 unsigned long pta; // CR8
357 unsigned long rsv2[7];
358 unsigned long ipsr; // CR16
359 unsigned long isr;
360 unsigned long rsv3;
361 unsigned long iip;
362 unsigned long ifa;
363 unsigned long itir;
364 unsigned long iipa;
365 unsigned long ifs;
366 unsigned long iim; // CR24
367 unsigned long iha;
368 unsigned long rsv4[38];
369 unsigned long lid; // CR64
370 unsigned long ivr;
371 unsigned long tpr;
372 unsigned long eoi;
373 unsigned long irr[4];
374 unsigned long itv; // CR72
375 unsigned long pmv;
376 unsigned long cmcv;
377 unsigned long rsv5[5];
378 unsigned long lrr0; // CR80
379 unsigned long lrr1;
380 unsigned long rsv6[46];
381 };
382 };
384 struct vcpu_guest_context_regs {
385 unsigned long r[32];
386 unsigned long b[8];
387 unsigned long bank[16];
388 unsigned long ip;
389 unsigned long psr;
390 unsigned long cfm;
391 unsigned long pr;
392 unsigned int nats; /* NaT bits for r1-r31. */
393 unsigned int bnats; /* Nat bits for banked registers. */
394 union vcpu_ar_regs ar;
395 union vcpu_cr_regs cr;
396 struct pt_fpreg f[128];
397 unsigned long dbr[8];
398 unsigned long ibr[8];
399 unsigned long rr[8];
400 unsigned long pkr[16];
402 /* FIXME: cpuid,pmd,pmc */
404 unsigned long xip;
405 unsigned long xpsr;
406 unsigned long xfs;
407 unsigned long xr[4];
409 struct vcpu_tr_regs tr;
411 /* Physical registers in case of debug event. */
412 unsigned long excp_iipa;
413 unsigned long excp_ifa;
414 unsigned long excp_isr;
415 unsigned int excp_vector;
417 /*
418 * The rbs is intended to be the image of the stacked registers still
419 * in the cpu (not yet stored in memory). It is laid out as if it
420 * were written in memory at a 512 (64*8) aligned address + offset.
421 * rbs_voff is (offset / 8). rbs_nat contains NaT bits for the
422 * remaining rbs registers. rbs_rnat contains NaT bits for in memory
423 * rbs registers.
424 * Note: loadrs is 2**14 bytes == 2**11 slots.
425 */
426 unsigned int rbs_voff;
427 unsigned long rbs[2048];
428 unsigned long rbs_rnat;
430 /*
431 * RSE.N_STACKED_PHYS via PAL_RSE_INFO
432 * Strictly this isn't cpu context, but this value is necessary
433 * for domain save/restore. So is here.
434 */
435 unsigned long num_phys_stacked;
436 };
438 struct vcpu_guest_context {
439 #define VGCF_EXTRA_REGS (1UL << 1) /* Set extra regs. */
440 #define VGCF_SET_CR_IRR (1UL << 2) /* Set cr_irr[0:3]. */
441 unsigned long flags; /* VGCF_* flags */
443 struct vcpu_guest_context_regs regs;
445 unsigned long event_callback_ip;
447 /* xen doesn't share privregs pages with hvm domain so that this member
448 * doesn't make sense for hvm domain.
449 * ~0UL is already used for INVALID_P2M_ENTRY. */
450 #define VGC_PRIVREGS_HVM (~(-2UL))
451 unsigned long privregs_pfn;
452 };
453 typedef struct vcpu_guest_context vcpu_guest_context_t;
454 DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
456 /* dom0 vp op */
457 #define __HYPERVISOR_ia64_dom0vp_op __HYPERVISOR_arch_0
458 /* Map io space in machine address to dom0 physical address space.
459 Currently physical assigned address equals to machine address. */
460 #define IA64_DOM0VP_ioremap 0
462 /* Convert a pseudo physical page frame number to the corresponding
463 machine page frame number. If no page is assigned, INVALID_MFN or
464 GPFN_INV_MASK is returned depending on domain's non-vti/vti mode. */
465 #define IA64_DOM0VP_phystomach 1
467 /* Convert a machine page frame number to the corresponding pseudo physical
468 page frame number of the caller domain. */
469 #define IA64_DOM0VP_machtophys 3
471 /* Reserved for future use. */
472 #define IA64_DOM0VP_iounmap 4
474 /* Unmap and free pages contained in the specified pseudo physical region. */
475 #define IA64_DOM0VP_zap_physmap 5
477 /* Assign machine page frame to dom0's pseudo physical address space. */
478 #define IA64_DOM0VP_add_physmap 6
480 /* expose the p2m table into domain */
481 #define IA64_DOM0VP_expose_p2m 7
483 /* xen perfmon */
484 #define IA64_DOM0VP_perfmon 8
486 /* gmfn version of IA64_DOM0VP_add_physmap */
487 #define IA64_DOM0VP_add_physmap_with_gmfn 9
489 /* get fpswa revision */
490 #define IA64_DOM0VP_fpswa_revision 10
492 /* Add an I/O port space range */
493 #define IA64_DOM0VP_add_io_space 11
495 /* expose the foreign domain's p2m table into privileged domain */
496 #define IA64_DOM0VP_expose_foreign_p2m 12
497 #define IA64_DOM0VP_EFP_ALLOC_PTE 0x1 /* allocate p2m table */
499 /* unexpose the foreign domain's p2m table into privileged domain */
500 #define IA64_DOM0VP_unexpose_foreign_p2m 13
502 // flags for page assignement to pseudo physical address space
503 #define _ASSIGN_readonly 0
504 #define ASSIGN_readonly (1UL << _ASSIGN_readonly)
505 #define ASSIGN_writable (0UL << _ASSIGN_readonly) // dummy flag
506 /* Internal only: memory attribute must be WC/UC/UCE. */
507 #define _ASSIGN_nocache 1
508 #define ASSIGN_nocache (1UL << _ASSIGN_nocache)
509 // tlb tracking
510 #define _ASSIGN_tlb_track 2
511 #define ASSIGN_tlb_track (1UL << _ASSIGN_tlb_track)
512 /* Internal only: associated with PGC_allocated bit */
513 #define _ASSIGN_pgc_allocated 3
514 #define ASSIGN_pgc_allocated (1UL << _ASSIGN_pgc_allocated)
516 /* This structure has the same layout of struct ia64_boot_param, defined in
517 <asm/system.h>. It is redefined here to ease use. */
518 struct xen_ia64_boot_param {
519 unsigned long command_line; /* physical address of cmd line args */
520 unsigned long efi_systab; /* physical address of EFI system table */
521 unsigned long efi_memmap; /* physical address of EFI memory map */
522 unsigned long efi_memmap_size; /* size of EFI memory map */
523 unsigned long efi_memdesc_size; /* size of an EFI memory map descriptor */
524 unsigned int efi_memdesc_version; /* memory descriptor version */
525 struct {
526 unsigned short num_cols; /* number of columns on console. */
527 unsigned short num_rows; /* number of rows on console. */
528 unsigned short orig_x; /* cursor's x position */
529 unsigned short orig_y; /* cursor's y position */
530 } console_info;
531 unsigned long fpswa; /* physical address of the fpswa interface */
532 unsigned long initrd_start;
533 unsigned long initrd_size;
534 unsigned long domain_start; /* va where the boot time domain begins */
535 unsigned long domain_size; /* how big is the boot domain */
536 };
538 #endif /* !__ASSEMBLY__ */
540 /* Size of the shared_info area (this is not related to page size). */
541 #define XSI_SHIFT 14
542 #define XSI_SIZE (1 << XSI_SHIFT)
543 /* Log size of mapped_regs area (64 KB - only 4KB is used). */
544 #define XMAPPEDREGS_SHIFT 12
545 #define XMAPPEDREGS_SIZE (1 << XMAPPEDREGS_SHIFT)
546 /* Offset of XASI (Xen arch shared info) wrt XSI_BASE. */
547 #define XMAPPEDREGS_OFS XSI_SIZE
549 /* Hyperprivops. */
550 #define HYPERPRIVOP_START 0x1
551 #define HYPERPRIVOP_RFI (HYPERPRIVOP_START + 0x0)
552 #define HYPERPRIVOP_RSM_DT (HYPERPRIVOP_START + 0x1)
553 #define HYPERPRIVOP_SSM_DT (HYPERPRIVOP_START + 0x2)
554 #define HYPERPRIVOP_COVER (HYPERPRIVOP_START + 0x3)
555 #define HYPERPRIVOP_ITC_D (HYPERPRIVOP_START + 0x4)
556 #define HYPERPRIVOP_ITC_I (HYPERPRIVOP_START + 0x5)
557 #define HYPERPRIVOP_SSM_I (HYPERPRIVOP_START + 0x6)
558 #define HYPERPRIVOP_GET_IVR (HYPERPRIVOP_START + 0x7)
559 #define HYPERPRIVOP_GET_TPR (HYPERPRIVOP_START + 0x8)
560 #define HYPERPRIVOP_SET_TPR (HYPERPRIVOP_START + 0x9)
561 #define HYPERPRIVOP_EOI (HYPERPRIVOP_START + 0xa)
562 #define HYPERPRIVOP_SET_ITM (HYPERPRIVOP_START + 0xb)
563 #define HYPERPRIVOP_THASH (HYPERPRIVOP_START + 0xc)
564 #define HYPERPRIVOP_PTC_GA (HYPERPRIVOP_START + 0xd)
565 #define HYPERPRIVOP_ITR_D (HYPERPRIVOP_START + 0xe)
566 #define HYPERPRIVOP_GET_RR (HYPERPRIVOP_START + 0xf)
567 #define HYPERPRIVOP_SET_RR (HYPERPRIVOP_START + 0x10)
568 #define HYPERPRIVOP_SET_KR (HYPERPRIVOP_START + 0x11)
569 #define HYPERPRIVOP_FC (HYPERPRIVOP_START + 0x12)
570 #define HYPERPRIVOP_GET_CPUID (HYPERPRIVOP_START + 0x13)
571 #define HYPERPRIVOP_GET_PMD (HYPERPRIVOP_START + 0x14)
572 #define HYPERPRIVOP_GET_EFLAG (HYPERPRIVOP_START + 0x15)
573 #define HYPERPRIVOP_SET_EFLAG (HYPERPRIVOP_START + 0x16)
574 #define HYPERPRIVOP_RSM_BE (HYPERPRIVOP_START + 0x17)
575 #define HYPERPRIVOP_GET_PSR (HYPERPRIVOP_START + 0x18)
576 #define HYPERPRIVOP_SET_RR0_TO_RR4 (HYPERPRIVOP_START + 0x19)
577 #define HYPERPRIVOP_MAX (0x1a)
579 /* Fast and light hypercalls. */
580 #define __HYPERVISOR_ia64_fast_eoi __HYPERVISOR_arch_1
582 /* Extra debug features. */
583 #define __HYPERVISOR_ia64_debug_op __HYPERVISOR_arch_2
585 /* Xencomm macros. */
586 #define XENCOMM_INLINE_MASK 0xf800000000000000UL
587 #define XENCOMM_INLINE_FLAG 0x8000000000000000UL
589 #ifndef __ASSEMBLY__
591 /*
592 * Optimization features.
593 * The hypervisor may do some special optimizations for guests. This hypercall
594 * can be used to switch on/of these special optimizations.
595 */
596 #define __HYPERVISOR_opt_feature 0x700UL
598 #define XEN_IA64_OPTF_OFF 0x0
599 #define XEN_IA64_OPTF_ON 0x1
601 /*
602 * If this feature is switched on, the hypervisor inserts the
603 * tlb entries without calling the guests traphandler.
604 * This is useful in guests using region 7 for identity mapping
605 * like the linux kernel does.
606 */
607 #define XEN_IA64_OPTF_IDENT_MAP_REG7 1
609 /* Identity mapping of region 4 addresses in HVM. */
610 #define XEN_IA64_OPTF_IDENT_MAP_REG4 2
612 /* Identity mapping of region 5 addresses in HVM. */
613 #define XEN_IA64_OPTF_IDENT_MAP_REG5 3
615 #define XEN_IA64_OPTF_IDENT_MAP_NOT_SET (0)
617 struct xen_ia64_opt_feature {
618 unsigned long cmd; /* Which feature */
619 unsigned char on; /* Switch feature on/off */
620 union {
621 struct {
622 /* The page protection bit mask of the pte.
623 * This will be or'ed with the pte. */
624 unsigned long pgprot;
625 unsigned long key; /* A protection key for itir. */
626 };
627 };
628 };
630 #endif /* __ASSEMBLY__ */
632 /* xen perfmon */
633 #ifdef XEN
634 #ifndef __ASSEMBLY__
635 #ifndef _ASM_IA64_PERFMON_H
637 #include <xen/list.h> // asm/perfmon.h requires struct list_head
638 #include <asm/perfmon.h>
639 // for PFM_xxx and pfarg_features_t, pfarg_context_t, pfarg_reg_t, pfarg_load_t
641 #endif /* _ASM_IA64_PERFMON_H */
643 DEFINE_XEN_GUEST_HANDLE(pfarg_features_t);
644 DEFINE_XEN_GUEST_HANDLE(pfarg_context_t);
645 DEFINE_XEN_GUEST_HANDLE(pfarg_reg_t);
646 DEFINE_XEN_GUEST_HANDLE(pfarg_load_t);
647 #endif /* __ASSEMBLY__ */
648 #endif /* XEN */
650 #endif /* __HYPERVISOR_IF_IA64_H__ */
652 /*
653 * Local variables:
654 * mode: C
655 * c-set-style: "BSD"
656 * c-basic-offset: 4
657 * tab-width: 4
658 * indent-tabs-mode: nil
659 * End:
660 */