Skip to content

Commit aac64ad

Browse files
Fuad TabbaMarc Zyngier
authored andcommitted
KVM: arm64: Use kvm_vcpu_has_feature() directly for struct kvm
Now that we have introduced kvm_vcpu_has_feature(), use it in the remaining code that checks for features in struct kvm, instead of using the __vcpu_has_feature() helper. No functional change intended. Suggested-by: Quentin Perret <[email protected]> Signed-off-by: Fuad Tabba <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Zyngier <[email protected]>
1 parent 41d6028 commit aac64ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/arm64/kvm/nested.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,8 +1021,8 @@ int kvm_init_nv_sysregs(struct kvm *kvm)
10211021
res0 |= HCR_NV2;
10221022
if (!kvm_has_feat(kvm, ID_AA64MMFR2_EL1, NV, IMP))
10231023
res0 |= (HCR_AT | HCR_NV1 | HCR_NV);
1024-
if (!(__vcpu_has_feature(&kvm->arch, KVM_ARM_VCPU_PTRAUTH_ADDRESS) &&
1025-
__vcpu_has_feature(&kvm->arch, KVM_ARM_VCPU_PTRAUTH_GENERIC)))
1024+
if (!(kvm_vcpu_has_feature(kvm, KVM_ARM_VCPU_PTRAUTH_ADDRESS) &&
1025+
kvm_vcpu_has_feature(kvm, KVM_ARM_VCPU_PTRAUTH_GENERIC)))
10261026
res0 |= (HCR_API | HCR_APK);
10271027
if (!kvm_has_feat(kvm, ID_AA64ISAR0_EL1, TME, IMP))
10281028
res0 |= BIT(39);
@@ -1078,8 +1078,8 @@ int kvm_init_nv_sysregs(struct kvm *kvm)
10781078

10791079
/* HFG[RW]TR_EL2 */
10801080
res0 = res1 = 0;
1081-
if (!(__vcpu_has_feature(&kvm->arch, KVM_ARM_VCPU_PTRAUTH_ADDRESS) &&
1082-
__vcpu_has_feature(&kvm->arch, KVM_ARM_VCPU_PTRAUTH_GENERIC)))
1081+
if (!(kvm_vcpu_has_feature(kvm, KVM_ARM_VCPU_PTRAUTH_ADDRESS) &&
1082+
kvm_vcpu_has_feature(kvm, KVM_ARM_VCPU_PTRAUTH_GENERIC)))
10831083
res0 |= (HFGxTR_EL2_APDAKey | HFGxTR_EL2_APDBKey |
10841084
HFGxTR_EL2_APGAKey | HFGxTR_EL2_APIAKey |
10851085
HFGxTR_EL2_APIBKey);

0 commit comments

Comments
 (0)