KVM: ARM: Fix wrong address in comment

hyp_hvc vector offset is 0x14 and hyp_svc vector offset is 0x8.

Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
ARM: KVM: convert GP registers from u32 to unsigned long

On 32bit ARM, unsigned long is guaranteed to be a 32bit quantity.
On 64bit ARM, it is a 64bit quantity.

In order to be able to share code between the two architectures,
convert the registers to be unsigned long, so the core code can
be oblivious of the change.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
ARM: KVM: abstract fault register accesses

Instead of directly accessing the fault registers, use proper accessors
so the core code can be shared.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
ARM: KVM: abstract HSR_ISV away

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
ARM: KVM: abstract HSR_WNR away

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
ARM: KVM: abstract HSR_SSE away

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
ARM: KVM: abstract HSR_SRT_{MASK,SHIFT} away

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
ARM: KVM: abstract (and fix) external abort detection away

Bit 8 is cache maintenance, bit 9 is external abort.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
ARM: KVM: abstract S1TW abort detection away

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
ARM: KVM: abstract SAS decoding away

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
ARM: KVM: abstract IL decoding away

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
ARM: KVM: abstract exception class decoding away

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
ARM: KVM: abstract fault decoding away

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
ARM: KVM: abstract HSR_EC_IABT away

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
ARM: KVM: move kvm_condition_valid to emulate.c

This is really hardware emulation, and as such it better be with
its little friends.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
ARM: KVM: move exit handler selection to a separate file

The exit handler selection code cannot be shared with arm64
(two different modes, more exception classes...).

Move it to a separate file (handle_exit.c).

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
KVM: ARM: Reintroduce trace_kvm_hvc

This one got lost in the move to handle_exit, so let's reintroduce it
using an accessor to the immediate value field like the other ones.

Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
ARM: KVM: abstract most MMU operations

Move low level MMU-related operations to kvm_mmu.h. This makes
the MMU code reusable by the arm64 port.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
ARM: KVM: remove superfluous include from kvm_vgic.h

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
ARM: KVM: move hyp init to kvm_host.h

Make the split of the pgd_ptr an implementation specific thing
by moving the init call to an inline function.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>