From: Marc Zyngier Date: Tue, 15 Aug 2023 18:39:00 +0000 (+0100) Subject: KVM: arm64: nv: Expose FGT to nested guests X-Git-Tag: v6.6.7~1953^2~9^2~3^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a5d28433ad94cc38ecb3dbb5138b8ae30ffb98a;p=platform%2Fkernel%2Flinux-starfive.git KVM: arm64: nv: Expose FGT to nested guests Now that we have FGT support, expose the feature to NV guests. Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier Reviewed-by: Jing Zhang Link: https://lore.kernel.org/r/20230815183903.2735724-27-maz@kernel.org --- diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c index 7f80f38..3facd89 100644 --- a/arch/arm64/kvm/nested.c +++ b/arch/arm64/kvm/nested.c @@ -71,8 +71,9 @@ void access_nested_id_reg(struct kvm_vcpu *v, struct sys_reg_params *p, break; case SYS_ID_AA64MMFR0_EL1: - /* Hide ECV, FGT, ExS, Secure Memory */ - val &= ~(GENMASK_ULL(63, 43) | + /* Hide ECV, ExS, Secure Memory */ + val &= ~(NV_FTR(MMFR0, ECV) | + NV_FTR(MMFR0, EXS) | NV_FTR(MMFR0, TGRAN4_2) | NV_FTR(MMFR0, TGRAN16_2) | NV_FTR(MMFR0, TGRAN64_2) |