ia64/xen-unstable

view xen/include/asm-ia64/vmx_pal.h @ 5704:9b73afea874e

Certain types of event channel are now auto-bound to vcpu0 by Xen.
Make sure that xenolinux agrees with this.
author sos22@douglas.cl.cam.ac.uk
date Fri Jul 08 15:35:43 2005 +0000 (2005-07-08)
parents c91f74efda05
children 67ea7868089b
line source
1 #ifndef _ASM_IA64_VT_PAL_H
2 #define _ASM_IA64_VT_PAL_H
4 /* -*- Mode:C; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */
5 /*
6 * vmx_pal.h: VT-I specific PAL (Processor Abstraction Layer) definitions
7 * Copyright (c) 2004, Intel Corporation.
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms and conditions of the GNU General Public License,
11 * version 2, as published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * more details.
17 *
18 * You should have received a copy of the GNU General Public License along with
19 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20 * Place - Suite 330, Boston, MA 02111-1307 USA.
21 *
22 * Xuefei Xu (Anthony Xu) (anthony.xu@intel.com)
23 * Fred Yang (fred.yang@intel.com)
24 * Kun Tian (Kevin Tian) (kevin.tian@intel.com)
25 */
27 #include <xen/types.h>
28 /* PAL PROCEDURE FOR VIRTUALIZATION */
29 #define PAL_VP_CREATE 265
30 /* Stacked Virt. Initializes a new VPD for the operation of
31 * a new virtual processor in the virtual environment.
32 */
33 #define PAL_VP_ENV_INFO 266
34 /*Stacked Virt. Returns the parameters needed to enter a virtual environment.*/
35 #define PAL_VP_EXIT_ENV 267
36 /*Stacked Virt. Allows a logical processor to exit a virtual environment.*/
37 #define PAL_VP_INIT_ENV 268
38 /*Stacked Virt. Allows a logical processor to enter a virtual environment.*/
39 #define PAL_VP_REGISTER 269
40 /*Stacked Virt. Register a different host IVT for the virtual processor.*/
41 #define PAL_VP_RESUME 270
42 /* Renamed from PAL_VP_RESUME */
43 #define PAL_VP_RESTORE 270
44 /*Stacked Virt. Resumes virtual processor operation on the logical processor.*/
45 #define PAL_VP_SUSPEND 271
46 /* Renamed from PAL_VP_SUSPEND */
47 #define PAL_VP_SAVE 271
48 /* Stacked Virt. Suspends operation for the specified virtual processor on
49 * the logical processor.
50 */
51 #define PAL_VP_TERMINATE 272
52 /* Stacked Virt. Terminates operation for the specified virtual processor.*/
54 static inline s64
55 ia64_pal_vp_env_info(u64 *buffer_size, u64 *vp_env_info)
56 {
57 struct ia64_pal_retval iprv;
58 PAL_CALL_STK(iprv, PAL_VP_ENV_INFO, 0, 0, 0);
59 *buffer_size=iprv.v0;
60 *vp_env_info=iprv.v1;
61 return iprv.status;
62 }
64 static inline s64
65 ia64_pal_vp_exit_env(u64 iva)
66 {
67 struct ia64_pal_retval iprv;
68 PAL_CALL_STK(iprv, PAL_VP_EXIT_ENV, (u64)iva, 0, 0);
69 return iprv.status;
70 }
72 /* config_options in pal_vp_init_env */
73 #define VP_INITIALIZE 1UL
74 #define VP_FR_PMC 1UL<<1
75 #define VP_OPCODE 1UL<<8
76 #define VP_CAUSE 1UL<<9
77 /* init vp env with initializing vm_buffer */
78 #define VP_INIT_ENV_INITALIZE VP_INITIALIZE|VP_FR_PMC|VP_OPCODE|VP_CAUSE
79 /* init vp env without initializing vm_buffer */
80 #define VP_INIT_ENV VP_FR_PMC|VP_OPCODE|VP_CAUSE
82 static inline s64
83 ia64_pal_vp_init_env (u64 config_options, u64 pbase_addr, \
84 u64 vbase_addr, u64 * vsa_base)
85 {
86 struct ia64_pal_retval iprv;
87 PAL_CALL_STK(iprv, PAL_VP_INIT_ENV, config_options, pbase_addr,\
88 vbase_addr);
89 *vsa_base=iprv.v0;
90 return iprv.status;
91 }
93 static inline s64
94 ia64_pal_vp_create (u64 *vpd, u64 *host_iva, u64* opt_handler)
95 {
96 struct ia64_pal_retval iprv;
97 PAL_CALL_STK(iprv, PAL_VP_CREATE, (u64)vpd, (u64)host_iva,
98 (u64)opt_handler);
99 return iprv.status;
100 }
102 static inline s64
103 ia64_pal_vp_restore (u64 *vpd, u64 pal_proc_vector)
104 {
105 struct ia64_pal_retval iprv;
106 PAL_CALL_STK(iprv, PAL_VP_RESTORE, (u64)vpd, pal_proc_vector, 0);
107 return iprv.status;
108 }
110 static inline s64
111 ia64_pal_vp_save (u64 *vpd, u64 pal_proc_vector)
112 {
113 struct ia64_pal_retval iprv;
114 PAL_CALL_STK(iprv, PAL_VP_SAVE, (u64)vpd, pal_proc_vector, 0);
115 return iprv.status;
116 }
118 #define PAL_PROC_VM_BIT (1UL << 40)
119 #define PAL_PROC_VMSW_BIT (1UL << 54)
120 #endif /* _ASM_IA64_VT_PAL_H */