// SPDX-License-Identifier: GPL-2.0-only /* * Memory Encryption Support Common Code * * Copyright (C) 2016 Advanced Micro Devices, Inc. * * Author: Tom Lendacky <[email protected]> */ #include <linux/dma-direct.h> #include <linux/dma-mapping.h> #include <linux/swiotlb.h> #include <linux/cc_platform.h> #include <linux/mem_encrypt.h> #include <linux/virtio_anchor.h> #include <asm/sev.h> /* Override for DMA direct allocation check - ARCH_HAS_FORCE_DMA_UNENCRYPTED */ bool force_dma_unencrypted(struct device *dev) { … } static void print_mem_encrypt_feature_info(void) { … } /* Architecture __weak replacement functions */ void __init mem_encrypt_init(void) { … } void __init mem_encrypt_setup_arch(void) { … }