ARM: KVM: Teach some form of type-safety to kvm_call_hyp

Just like on arm64, and for the same reasons, kvm_call_hyp removes
any form of type safety when calling into HYP. But we can still
try to tell the compiler what we're trying to achieve.

Here, we can add code that would do the function call if it wasn't
guarded by an always-false predicate. Hopefully, the compiler is
dumb enough to do the type checking and clever enough to not emit
the corresponding code...

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
This commit is contained in:
Marc Zyngier
2019-01-11 14:57:58 +00:00
부모 7cba8a8d0d
커밋 d18232ea8a
3개의 변경된 파일31개의 추가작업 그리고 6개의 파일을 삭제

파일 보기

@@ -176,7 +176,7 @@ THUMB( orr lr, lr, #PSR_T_BIT )
msr spsr_cxsf, lr
ldr lr, =panic
msr ELR_hyp, lr
ldr lr, =kvm_call_hyp
ldr lr, =__kvm_call_hyp
clrex
eret
ENDPROC(__hyp_do_panic)

파일 보기

@@ -42,7 +42,7 @@
* r12: caller save
* rest: callee save
*/
ENTRY(kvm_call_hyp)
ENTRY(__kvm_call_hyp)
hvc #0
bx lr
ENDPROC(kvm_call_hyp)
ENDPROC(__kvm_call_hyp)