mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ANDROID: KVM: arm64: FAR_EL2 mask as a define
Create a macro definition for the FAR_EL2 mask and use it instead of a hard-coded value, and put it in a share header to be used by hyp. No functional change intended. Bug: 209580772 Change-Id: Ib83932d670cba6bf8f1ed45d2c0e1ed34331d98d Signed-off-by: Fuad Tabba <tabba@google.com> Signed-off-by: Quentin Perret <qperret@google.com>
This commit is contained in:
committed by
Quentin Perret
parent
2e5989b503
commit
7c4000b1ea
@@ -344,6 +344,8 @@
|
||||
#define PAR_TO_HPFAR(par) \
|
||||
(((par) & GENMASK_ULL(PHYS_MASK_SHIFT - 1, 12)) >> 8)
|
||||
|
||||
#define FAR_MASK GENMASK_ULL(11, 0)
|
||||
|
||||
#define ECN(x) { ESR_ELx_EC_##x, #x }
|
||||
|
||||
#define kvm_arm_exception_class \
|
||||
|
||||
@@ -1678,7 +1678,7 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu)
|
||||
* faulting VA. This is always 12 bits, irrespective
|
||||
* of the page size.
|
||||
*/
|
||||
fault_ipa |= kvm_vcpu_get_hfar(vcpu) & ((1 << 12) - 1);
|
||||
fault_ipa |= kvm_vcpu_get_hfar(vcpu) & FAR_MASK;
|
||||
ret = io_mem_abort(vcpu, fault_ipa);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user