* Question on corruption of host/guest vfp switch hyp function
@ 2015-06-19 1:16 Mario Smarduch
0 siblings, 0 replies; only message in thread
From: Mario Smarduch @ 2015-06-19 1:16 UTC (permalink / raw)
To: kvmarm@lists.cs.columbia.edu, Marc Zyngier,
christoffer.dall@linaro.org
Cc: Catalin Marinas, Will Deacon
I created a HYP function and call it from kvm_arch_vcpu_put().
It dies in restore_vfp_state right at the 'ldm' call.
Is the calling convention bad? Or anything else?
vcpu structure is corrupted right after that instruction.
I expanded the restore_vfp_state macro below, without
the ldm the guest boots (of course vfp restore is
not complete).
I'm running this on FastModels 9.x
Thanks,
Mario
+ENTRY(__kvm_restore_host_vfp_state)
+ push {r3, r7}
+
+ mov r1, #0
+ str r1, [r0, #VCPU_VFP_SAVED]
+
+ VFPFMRX r1, FPEXC
+ push {r1}
+ orr r6, r2, #FPEXC_EN
+ VFPFMXR FPEXC, r6
+
+ add r7, r0, #VCPU_VFP_GUEST
+ store_vfp_state r7
+
+ add r7, r0, #VCPU_VFP_HOST
+ ldr r7, [r7]
+ restore_vfp_state r7
+
+ pop {r1}
+ VFPFMXR FPEXC, r1
+ pop {r3, r7}
+ bx lr
+ENDPROC(__kvm_restore_host_vfp_state)
+ LDC p11, cr0, [r7],#32*4
+ MRC p10, 7, r6, cr7, cr0, 0
+ and r6, r6, #(0xf << 0)
+ cmp r6, #2
+ @ldceql p11, cr0, [r7],#32*4
+ @addne r7, r7, #32*4
+ @dsb
+ @sb
>>>>>>>>> Corruption here and dies <<<<<<<
+ ldm r7, {r2-r5}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-19 1:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-19 1:16 Question on corruption of host/guest vfp switch hyp function Mario Smarduch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.