ANDROID: KVM: arm64: move __deactivate_traps_hfgxtr out of __deactivate_traps_common

In future patches, this function isn't going to be used for
protected VMs. Therefore, move it out of the common function so
that in can be selectively called in future patches.

No functional change intended.

Bug: 278749606
Change-Id: Ibfe5965ed3683b1400f9e126d7f6f3140c62e519
Signed-off-by: Fuad Tabba <tabba@google.com>
This commit is contained in:
Fuad Tabba 2023-12-12 14:02:37 +00:00
parent bcbca2e57f
commit 289f66c4ee
3 changed files with 2 additions and 2 deletions

View File

@ -252,8 +252,6 @@ static inline void __deactivate_traps_common(struct kvm_vcpu *vcpu)
if (cpus_have_final_cap(ARM64_HAS_HCX))
write_sysreg_s(HCRX_HOST_FLAGS, SYS_HCRX_EL2);
__deactivate_traps_hfgxtr(vcpu);
}
static inline void ___activate_traps(struct kvm_vcpu *vcpu)

View File

@ -107,6 +107,7 @@ static void __deactivate_traps(struct kvm_vcpu *vcpu)
}
__deactivate_traps_common(vcpu);
__deactivate_traps_hfgxtr(vcpu);
write_sysreg(this_cpu_ptr(&kvm_init_params)->hcr_el2, hcr_el2);

View File

@ -158,6 +158,7 @@ void deactivate_traps_vhe_put(struct kvm_vcpu *vcpu)
local_irq_save(flags);
__deactivate_traps_common(vcpu);
__deactivate_traps_hfgxtr(vcpu);
local_irq_restore(flags);
}