1 #ifndef __ASM_IA64_KVM_H
2 #define __ASM_IA64_KVM_H
5 * asm-ia64/kvm.h: kvm structure definitions for ia64
7 * Copyright (C) 2007 Xiantao Zhang <xiantao.zhang@intel.com>
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.
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
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.
24 #include <asm/types.h>
26 #include <linux/ioctl.h>
28 /* Architectural interrupt line count. */
29 #define KVM_NR_INTERRUPTS 256
31 #define KVM_IOAPIC_NUM_PINS 48
33 struct kvm_ioapic_state
{
45 __u8 delivery_status
:1;
54 } redirtbl
[KVM_IOAPIC_NUM_PINS
];
57 #define KVM_IRQCHIP_PIC_MASTER 0
58 #define KVM_IRQCHIP_PIC_SLAVE 1
59 #define KVM_IRQCHIP_IOAPIC 2
61 #define KVM_CONTEXT_SIZE 8*1024
65 unsigned long bits
[2];
66 long double __dummy
; /* force 16-byte alignment */
72 char dummy
[KVM_CONTEXT_SIZE
];
76 unsigned long caller_unat
;
79 unsigned long ar
[128];
81 unsigned long cr
[128];
86 struct kvm_fpreg fr
[128];
93 unsigned long p
: 1; /* 0 */
94 unsigned long rv1
: 1; /* 1 */
95 unsigned long ma
: 3; /* 2-4 */
96 unsigned long a
: 1; /* 5 */
97 unsigned long d
: 1; /* 6 */
98 unsigned long pl
: 2; /* 7-8 */
99 unsigned long ar
: 3; /* 9-11 */
100 unsigned long ppn
: 38; /* 12-49 */
101 unsigned long rv2
: 2; /* 50-51 */
102 unsigned long ed
: 1; /* 52 */
103 unsigned long ig1
: 11; /* 53-63 */
106 unsigned long __rv1
: 53; /* 0-52 */
107 unsigned long contiguous
: 1; /*53 */
108 unsigned long tc
: 1; /* 54 TR or TC */
109 unsigned long cl
: 1;
110 /* 55 I side or D side cache line */
111 unsigned long len
: 4; /* 56-59 */
112 unsigned long io
: 1; /* 60 entry is for io or not */
113 unsigned long nomap
: 1;
114 /* 61 entry cann't be inserted into machine TLB.*/
115 unsigned long checked
: 1;
116 /* 62 for VTLB/VHPT sanity check */
117 unsigned long invalid
: 1;
118 /* 63 invalid entry */
120 unsigned long page_flags
;
121 }; /* same for VHPT and TLB */
125 unsigned long rv3
: 2;
126 unsigned long ps
: 6;
127 unsigned long key
: 24;
128 unsigned long rv4
: 32;
134 unsigned long ig2
: 12;
135 unsigned long vpn
: 49;
136 unsigned long vrn
: 3;
141 unsigned long tag
: 63;
142 unsigned long ti
: 1;
147 struct thash_data
*next
;
149 unsigned long gpaddr
;
158 unsigned long vgr
[16];
159 unsigned long vbgr
[16];
162 unsigned long vcpuid
[5];
165 unsigned long vcr
[128];
171 struct saved_vpd vpd
;
174 unsigned long vmm_rr
;
176 struct thash_data itrs
[NITRS
];
177 struct thash_data dtrs
[NDTRS
];
178 /* Bit is set if there is a tr/tc for the region. */
179 unsigned char itr_regions
;
180 unsigned char dtr_regions
;
181 unsigned char tc_regions
;
184 unsigned long saved_itc
;
185 unsigned long itc_check
;
186 unsigned long timer_check
;
187 unsigned long timer_pending
;
188 unsigned long last_itc
;
190 unsigned long vrr
[8];
191 unsigned long ibr
[8];
192 unsigned long dbr
[8];
193 unsigned long insvc
[4]; /* Interrupt in service. */
196 unsigned long metaphysical_rr0
; /* from kvm_arch (so is pinned) */
197 unsigned long metaphysical_rr4
; /* from kvm_arch (so is pinned) */
198 unsigned long metaphysical_saved_rr0
; /* from kvm_arch */
199 unsigned long metaphysical_saved_rr4
; /* from kvm_arch */
200 unsigned long fp_psr
; /*used for lazy float register */
201 unsigned long saved_gp
;
202 /*for phycial emulation */