ia64/xen-unstable

view xen/include/asm-ia64/vmx_vpd.h @ 10812:a59843bb699e

[IA64] Remove unused contig mem flag for VTi

Remove the confusing flag ARCH_VMX_CONTIG_MEM for VTi domain. And add a
flag ARCH_VMX_DOMAIN to ensure VMX_DOMAIN check on all vcpus.

Signed-off-by : Zhang xiantao <xiantao.zhang@intel.com>
author awilliam@xenbuild.aw
date Thu Jul 27 08:47:39 2006 -0600 (2006-07-27)
parents 7f67c15e2c91
children 4acc6d51f389
line source
1 /* -*- Mode:C; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */
2 /*
3 * vmx.h: prototype for generial vmx related interface
4 * Copyright (c) 2004, Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17 * Place - Suite 330, Boston, MA 02111-1307 USA.
18 *
19 * Kun Tian (Kevin Tian) (kevin.tian@intel.com)
20 */
22 #ifndef _ASM_IA64_VMX_VPD_H_
23 #define _ASM_IA64_VMX_VPD_H_
25 #ifndef __ASSEMBLY__
27 #include <asm/vtm.h>
28 #include <asm/vmx_platform.h>
29 #include <public/arch-ia64.h>
31 #define VPD_SHIFT 17 /* 128K requirement */
32 #define VPD_SIZE (1 << VPD_SHIFT)
34 typedef struct {
35 unsigned long dcr; // CR0
36 unsigned long itm;
37 unsigned long iva;
38 unsigned long rsv1[5];
39 unsigned long pta; // CR8
40 unsigned long rsv2[7];
41 unsigned long ipsr; // CR16
42 unsigned long isr;
43 unsigned long rsv3;
44 unsigned long iip;
45 unsigned long ifa;
46 unsigned long itir;
47 unsigned long iipa;
48 unsigned long ifs;
49 unsigned long iim; // CR24
50 unsigned long iha;
51 unsigned long rsv4[38];
52 unsigned long lid; // CR64
53 unsigned long ivr;
54 unsigned long tpr;
55 unsigned long eoi;
56 unsigned long irr[4];
57 unsigned long itv; // CR72
58 unsigned long pmv;
59 unsigned long cmcv;
60 unsigned long rsv5[5];
61 unsigned long lrr0; // CR80
62 unsigned long lrr1;
63 unsigned long rsv6[46];
64 } cr_t;
66 #ifdef VTI_DEBUG
67 struct ivt_debug{
68 unsigned long iip;
69 unsigned long ipsr;
70 unsigned long ifa;
71 unsigned long vector;
72 };
73 #define IVT_DEBUG_MAX 128
74 #endif
75 struct arch_vmx_struct {
76 // vpd_t *vpd;
77 vtime_t vtm;
78 struct vlapic vlapic;
79 unsigned long vrr[8];
80 unsigned long vkr[8];
81 unsigned long cr_iipa; /* for emulation */
82 unsigned long cr_isr; /* for emulation */
83 unsigned long cause;
84 unsigned long opcode;
86 // unsigned long mrr5;
87 // unsigned long mrr6;
88 // unsigned long mrr7;
89 unsigned long mpta;
90 // unsigned long rfi_pfs;
91 // unsigned long rfi_iip;
92 // unsigned long rfi_ipsr;
93 // unsigned long rfi_ifs;
94 // unsigned long in_service[4]; // vLsapic inservice IRQ bits
95 unsigned long flags;
96 #ifdef VTI_DEBUG
97 unsigned long ivt_current;
98 struct ivt_debug ivt_debug[IVT_DEBUG_MAX];
99 #endif
100 };
102 #define vmx_schedule_tail(next) \
103 (next)->thread.arch_vmx.arch_vmx_schedule_tail((next))
105 #define VMX_DOMAIN(v) v->arch.arch_vmx.flags
107 #define ARCH_VMX_IO_WAIT 3 /* Waiting for I/O completion */
108 #define ARCH_VMX_INTR_ASSIST 4 /* Need DM's assist to issue intr */
109 #define ARCH_VMX_DOMAIN 5 /* Need it to indicate VTi domain */
112 #define VMX_DEBUG 1
113 #if VMX_DEBUG
115 extern unsigned int opt_vmx_debug_level;
116 #endif
117 #endif //__ASSEMBLY__
119 // VPD field offset
120 #define VPD_VAC_START_OFFSET 0
121 #define VPD_VDC_START_OFFSET 8
122 #define VPD_VHPI_START_OFFSET 256
123 #define VPD_VGR_START_OFFSET 1024
124 #define VPD_VBGR_START_OFFSET 1152
125 #define VPD_VNAT_START_OFFSET 1280
126 #define VPD_VBNAT_START_OFFSET 1288
127 #define VPD_VCPUID_START_OFFSET 1296
128 #define VPD_VPSR_START_OFFSET 1424
129 #define VPD_VPR_START_OFFSET 1432
130 #define VPD_VRSE_CFLE_START_OFFSET 1440
131 #define VPD_VCR_START_OFFSET 2048
132 #define VPD_VRR_START_OFFSET 3072
133 #define VPD_VMM_VAIL_START_OFFSET 31744
136 #endif /* _ASM_IA64_VMX_VPD_H_ */