提交 5c062ef4 编写于 作者: W Will Deacon

arm64: kvm: Replace hardcoded '1' with SYS_PAR_EL1_F

Now that we have a definition for the 'F' field of PAR_EL1, use that
instead of coding the immediate directly.
Acked-by: NMarc Zyngier <maz@kernel.org>
Reviewed-by: NMark Rutland <mark.rutland@arm.com>
Signed-off-by: NWill Deacon <will@kernel.org>
上级 42f91093
...@@ -264,7 +264,7 @@ static bool __hyp_text __translate_far_to_hpfar(u64 far, u64 *hpfar) ...@@ -264,7 +264,7 @@ static bool __hyp_text __translate_far_to_hpfar(u64 far, u64 *hpfar)
tmp = read_sysreg(par_el1); tmp = read_sysreg(par_el1);
write_sysreg(par, par_el1); write_sysreg(par, par_el1);
if (unlikely(tmp & 1)) if (unlikely(tmp & SYS_PAR_EL1_F))
return false; /* Translation failed, back to guest */ return false; /* Translation failed, back to guest */
/* Convert PAR to HPFAR format */ /* Convert PAR to HPFAR format */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册