mem_encrypt.h 456 B

123456789101112131415161718192021
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * SVM helper functions
  4. *
  5. * Copyright 2018 IBM Corporation
  6. */
  7. #ifndef _ASM_POWERPC_MEM_ENCRYPT_H
  8. #define _ASM_POWERPC_MEM_ENCRYPT_H
  9. #include <asm/svm.h>
  10. static inline bool force_dma_unencrypted(struct device *dev)
  11. {
  12. return is_secure_guest();
  13. }
  14. int set_memory_encrypted(unsigned long addr, int numpages);
  15. int set_memory_decrypted(unsigned long addr, int numpages);
  16. #endif /* _ASM_POWERPC_MEM_ENCRYPT_H */