mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-04-03 12:05:13 +02:00
Implementing the internal mem_encrypt API for arm64 depends entirely on the Confidential Computing environment in which the kernel is running. Introduce a simple dispatcher so that backend hooks can be registered depending upon the environment in which the kernel finds itself. Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Steven Price <steven.price@arm.com> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20240830130150.8568-4-will@kernel.org Signed-off-by: Will Deacon <will@kernel.org>
16 lines
464 B
C
16 lines
464 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef __ASM_MEM_ENCRYPT_H
|
|
#define __ASM_MEM_ENCRYPT_H
|
|
|
|
struct arm64_mem_crypt_ops {
|
|
int (*encrypt)(unsigned long addr, int numpages);
|
|
int (*decrypt)(unsigned long addr, int numpages);
|
|
};
|
|
|
|
int arm64_mem_crypt_ops_register(const struct arm64_mem_crypt_ops *ops);
|
|
|
|
int set_memory_encrypted(unsigned long addr, int numpages);
|
|
int set_memory_decrypted(unsigned long addr, int numpages);
|
|
|
|
#endif /* __ASM_MEM_ENCRYPT_H */
|