ANDROID: KVM: arm64: Rename pkvm_clear_pvmfw_pages()

pkvm_clear_pvmfw_pages() is used to poison the pvmfw pages during reset,
so rename it to pkvm_poison_pvmfw_pages() instead.

Signed-off-by: Will Deacon <will@kernel.org>
Bug: 254819795
Change-Id: Ie5b9c90f0707fa81d9099425cff35383bfb0d009
Signed-off-by: Will Deacon <willdeacon@google.com>
This commit is contained in:
Will Deacon
2022-11-17 11:40:01 +00:00
committed by Will Deacon
parent 27dede52b4
commit 8b48bb1593
3 changed files with 4 additions and 4 deletions

View File

@@ -133,6 +133,6 @@ static inline bool pkvm_ipa_in_pvmfw_region(struct pkvm_hyp_vm *vm, u64 ipa)
int pkvm_load_pvmfw_pages(struct pkvm_hyp_vm *vm, u64 ipa, phys_addr_t phys,
u64 size);
void pkvm_clear_pvmfw_pages(void);
void pkvm_poison_pvmfw_pages(void);
#endif /* __ARM64_KVM_NVHE_PKVM_H__ */

View File

@@ -887,7 +887,7 @@ int pkvm_load_pvmfw_pages(struct pkvm_hyp_vm *vm, u64 ipa, phys_addr_t phys,
return 0;
}
void pkvm_clear_pvmfw_pages(void)
void pkvm_poison_pvmfw_pages(void)
{
void *addr = hyp_phys_to_virt(pvmfw_base);

View File

@@ -250,7 +250,7 @@ static unsigned long psci_0_2_handler(u64 func_id, struct kvm_cpu_context *host_
*/
case PSCI_0_2_FN_SYSTEM_OFF:
case PSCI_0_2_FN_SYSTEM_RESET:
pkvm_clear_pvmfw_pages();
pkvm_poison_pvmfw_pages();
return psci_forward(host_ctxt);
case PSCI_0_2_FN64_CPU_SUSPEND:
return psci_cpu_suspend(func_id, host_ctxt);
@@ -265,7 +265,7 @@ static unsigned long psci_1_0_handler(u64 func_id, struct kvm_cpu_context *host_
{
switch (func_id) {
case PSCI_1_1_FN64_SYSTEM_RESET2:
pkvm_clear_pvmfw_pages();
pkvm_poison_pvmfw_pages();
fallthrough;
case PSCI_1_0_FN_PSCI_FEATURES:
case PSCI_1_0_FN_SET_SUSPEND_MODE: