File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,9 @@ static __always_inline unsigned long kvm_vcpu_get_hfar(const struct kvm_vcpu *vc
305305
306306static __always_inline phys_addr_t kvm_vcpu_get_fault_ipa (const struct kvm_vcpu * vcpu )
307307{
308- return ((phys_addr_t )vcpu -> arch .fault .hpfar_el2 & HPFAR_MASK ) << 8 ;
308+ u64 hpfar = vcpu -> arch .fault .hpfar_el2 ;
309+
310+ return FIELD_GET (HPFAR_EL2_FIPA , hpfar ) << 12 ;
309311}
310312
311313static inline u64 kvm_vcpu_get_disr (const struct kvm_vcpu * vcpu )
Original file line number Diff line number Diff line change @@ -578,7 +578,7 @@ void handle_host_mem_abort(struct kvm_cpu_context *host_ctxt)
578578 return ;
579579 }
580580
581- addr = ( fault .hpfar_el2 & HPFAR_MASK ) << 8 ;
581+ addr = FIELD_GET ( HPFAR_EL2_FIPA , fault .hpfar_el2 ) << 12 ;
582582 ret = host_stage2_idmap (addr );
583583 BUG_ON (ret && ret != - EAGAIN );
584584}
Original file line number Diff line number Diff line change @@ -3433,3 +3433,10 @@ Field 5 F
34333433Field 4 P
34343434Field 3:0 Align
34353435EndSysreg
3436+
3437+ Sysreg HPFAR_EL2 3 4 6 0 4
3438+ Field 63 NS
3439+ Res0 62:48
3440+ Field 47:4 FIPA
3441+ Res0 3:0
3442+ EndSysreg
You can’t perform that action at this time.
0 commit comments