diff options
author | Will Deacon <will@kernel.org> | 2019-08-22 17:21:21 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2019-08-27 17:38:41 +0100 |
commit | 5c062ef4155b60018c547552ca48823297d00998 (patch) | |
tree | 1ebe442fbed0de47cc8baa9e544172e939859fdf | |
parent | 42f91093b043332ad75cea7aeafecda6fe81814c (diff) | |
download | linux-5c062ef4155b60018c547552ca48823297d00998.tar.gz linux-5c062ef4155b60018c547552ca48823297d00998.tar.bz2 linux-5c062ef4155b60018c547552ca48823297d00998.zip |
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: Marc Zyngier <maz@kernel.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | arch/arm64/kvm/hyp/switch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c index adaf266d8de8..bd978ad71936 100644 --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -264,7 +264,7 @@ static bool __hyp_text __translate_far_to_hpfar(u64 far, u64 *hpfar) tmp = read_sysreg(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 */ /* Convert PAR to HPFAR format */ |