arm64: KVM: Allow kvm_skip_instr32 to be shared between kernel and HYP code
As we're going to start emulating some instruction while in HYP,
we need to be able to move the PC forward. Pretty easy for AArch64,
but quite fidly for AArch32 (think Thumb2 and the IT state).
In order to be able to reuse the existing code in HYP, move the bulk
of it to kvm_emulate.h, and let the implementation located in
emulate.c use it. HYP will be able to use it at the expense of an
additional copy in the object file, but we can at least share the
source code.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2 files changed