diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2014-09-26 12:29:34 +0200 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2014-09-26 14:39:45 +0200 |
commit | 0496daa5cf99741ce8db82686b4c7446a37feabb (patch) | |
tree | f434917ca04fa8f8e13846d496c378cbf7356927 /arch/arm64/include/asm | |
parent | dbff124e29fa24aff9705b354b5f4648cd96e0bb (diff) | |
download | talos-obmc-linux-0496daa5cf99741ce8db82686b4c7446a37feabb.tar.gz talos-obmc-linux-0496daa5cf99741ce8db82686b4c7446a37feabb.zip |
arm/arm64: KVM: Report correct FSC for unsupported fault types
When we catch something that's not a permission fault or a translation
fault, we log the unsupported FSC in the kernel log, but we were masking
off the bottom bits of the FSC which was not very helpful.
Also correctly report the FSC for data and instruction faults rather
than telling people it was a DFCS, which doesn't exist in the ARM ARM.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm64/include/asm')
-rw-r--r-- | arch/arm64/include/asm/kvm_emulate.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h index fdc3e21abd8d..5674a55b5518 100644 --- a/arch/arm64/include/asm/kvm_emulate.h +++ b/arch/arm64/include/asm/kvm_emulate.h @@ -174,6 +174,11 @@ static inline bool kvm_vcpu_trap_is_iabt(const struct kvm_vcpu *vcpu) static inline u8 kvm_vcpu_trap_get_fault(const struct kvm_vcpu *vcpu) { + return kvm_vcpu_get_hsr(vcpu) & ESR_EL2_FSC; +} + +static inline u8 kvm_vcpu_trap_get_fault_type(const struct kvm_vcpu *vcpu) +{ return kvm_vcpu_get_hsr(vcpu) & ESR_EL2_FSC_TYPE; } |