Go to the documentation of this file.
24 #include <asm/asmmacro.h>
25 #include <asm/types.h>
27 #include <asm/kvm_host.h>
29 #include "asm-offsets.h"
31 #define KVM_MINSTATE_START_SAVE_MIN \
34 mov.m r28 = ar.rnat; \
35 addl r22 = VMM_RBS_OFFSET,r1; \
37 lfetch.fault.excl.nt1 [r22]; \
38 addl r1 = KVM_STK_OFFSET-VMM_PT_REGS_SIZE, r1; \
39 mov r23 = ar.bspstore; \
41 mov ar.bspstore = r22; \
48 #define KVM_MINSTATE_END_SAVE_MIN \
53 #define PAL_VSA_SYNC_READ \
56 add r25 = VMM_VPD_BASE_OFFSET, r21; \
64 br.cond.sptk kvm_vps_sync_read; \
69 #define KVM_MINSTATE_GET_CURRENT(reg) mov reg=r21
98 #define PT(f) (VMM_PT_REGS_##f##_OFFSET)
100 #define KVM_DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA) \
101 KVM_MINSTATE_GET_CURRENT(r16); \
110 tbit.z p0,p15 = r29,IA64_PSR_I_BIT; \
118 KVM_MINSTATE_START_SAVE_MIN \
119 adds r17 = 2*L1_CACHE_BYTES,r1; \
120 adds r16 = PT(CR_IPSR),r1; \
122 lfetch.fault.excl.nt1 [r17],L1_CACHE_BYTES; \
125 lfetch.fault.excl.nt1 [r17]; \
126 tbit.nz p15,p0 = r29,IA64_PSR_I_BIT; \
129 adds r16 = PT(R8),r1; \
130 adds r17 = PT(R9),r1; \
132 .mem.offset 0,0; st8.spill [r16] = r8,16; \
133 .mem.offset 8,0; st8.spill [r17] = r9,16; \
135 .mem.offset 0,0; st8.spill [r16] = r10,24; \
136 .mem.offset 8,0; st8.spill [r17] = r11,24; \
142 st8 [r17] = r30,16; \
145 st8 [r16] = r25,16; \
146 st8 [r17] = r26,16; \
149 st8 [r16] = r27,16; \
150 st8 [r17] = r28,16; \
152 st8 [r16] = r23,16; \
153 st8 [r17] = r31,16; \
155 st8 [r16] = r29,16; \
156 st8 [r17] = r18,16; \
158 .mem.offset 0,0; st8.spill [r16] = r20,16; \
159 .mem.offset 8,0; st8.spill [r17] = r12,16; \
162 .mem.offset 0,0; st8.spill [r16] = r13,16; \
163 .mem.offset 8,0; st8.spill [r17] = r10,16; \
166 .mem.offset 0,0; st8.spill [r16] = r15,16; \
167 .mem.offset 8,0; st8.spill [r17] = r14,16; \
169 .mem.offset 0,0; st8.spill [r16] = r2,16; \
170 .mem.offset 8,0; st8.spill [r17] = r3,16; \
171 adds r2 = VMM_PT_REGS_R16_OFFSET,r1; \
173 adds r16 = VMM_VCPU_IIPA_OFFSET,r13; \
174 adds r17 = VMM_VCPU_ISR_OFFSET,r13; \
185 movl r11 = FPSR_DEFAULT; \
186 adds r17 = VMM_VCPU_GP_OFFSET,r13; \
191 KVM_MINSTATE_END_SAVE_MIN
207 #define KVM_SAVE_REST \
208 .mem.offset 0,0; st8.spill [r2] = r16,16; \
209 .mem.offset 8,0; st8.spill [r3] = r17,16; \
211 .mem.offset 0,0; st8.spill [r2] = r18,16; \
212 .mem.offset 8,0; st8.spill [r3] = r19,16; \
214 .mem.offset 0,0; st8.spill [r2] = r20,16; \
215 .mem.offset 8,0; st8.spill [r3] = r21,16; \
218 .mem.offset 0,0; st8.spill [r2] = r22,16; \
219 .mem.offset 8,0; st8.spill [r3] = r23,16; \
222 .mem.offset 0,0; st8.spill [r2] = r24,16; \
223 .mem.offset 8,0; st8.spill [r3] = r25,16; \
225 .mem.offset 0,0; st8.spill [r2] = r26,16; \
226 .mem.offset 8,0; st8.spill [r3] = r27,16; \
228 .mem.offset 0,0; st8.spill [r2] = r28,16; \
229 .mem.offset 8,0; st8.spill [r3] = r29,16; \
231 .mem.offset 0,0; st8.spill [r2] = r30,16; \
232 .mem.offset 8,0; st8.spill [r3] = r31,32; \
236 adds r24 = PT(B6)-PT(F7),r3; \
237 adds r25 = PT(B7)-PT(F7),r3; \
239 st8 [r24] = r18,16; \
240 st8 [r25] = r19,16; \
241 adds r2 = PT(R4)-PT(F6),r2; \
242 adds r3 = PT(R5)-PT(F7),r3; \
248 adds r19 = PT(EML_UNAT)-PT(R4),r2; \
253 #define KVM_SAVE_EXTRA \
254 .mem.offset 0,0; st8.spill [r2] = r4,16; \
255 .mem.offset 8,0; st8.spill [r3] = r5,16; \
257 .mem.offset 0,0; st8.spill [r2] = r6,16; \
258 .mem.offset 8,0; st8.spill [r3] = r7; \
264 #define KVM_SAVE_MIN_WITH_COVER KVM_DO_SAVE_MIN(cover, mov r30 = cr.ifs,)
265 #define KVM_SAVE_MIN_WITH_COVER_R19 KVM_DO_SAVE_MIN(cover, mov r30 = cr.ifs, mov r15 = r19)
266 #define KVM_SAVE_MIN KVM_DO_SAVE_MIN( , mov r30 = r0, )