When running as a protected guest, the KVM host does not have access to any pages mapped into the guest. Consequently, KVM exposes hypercalls to the guest so that pages can be shared back with the host for the purposes of shared memory communication such as virtio. Detect the presence of these hypercalls when running as a guest and use them to implement the memory encryption interfaces gated by CONFIG_ARCH_HAS_MEM_ENCRYPT which are called from the DMA layer to share SWIOTLB bounce buffers for virtio. Although no encryption is actually performed, "sharing" a page is akin to decryption, whereas "unsharing" a page maps to encryption, albeit without destruction of the underlying page contents. Signed-off-by: Will Deacon <will@kernel.org> [willdeacon@: Use asm/mem_encrypt.h instead of asm/set_memory.h; Implement mem_encrypt_active()] Bug: 209580772 Change-Id: I5955ff0dca65561183f9a60e94be87f28fbf14ec Signed-off-by: Will Deacon <willdeacon@google.com>
16 lines
565 B
Makefile
16 lines
565 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
obj-y := dma-mapping.o extable.o fault.o init.o \
|
|
cache.o copypage.o flush.o \
|
|
ioremap.o mem_encrypt.o mmap.o pgd.o mmu.o \
|
|
context.o proc.o pageattr.o
|
|
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
|
|
obj-$(CONFIG_PTDUMP_CORE) += ptdump.o
|
|
obj-$(CONFIG_PTDUMP_DEBUGFS) += ptdump_debugfs.o
|
|
obj-$(CONFIG_TRANS_TABLE) += trans_pgd.o
|
|
obj-$(CONFIG_DEBUG_VIRTUAL) += physaddr.o
|
|
obj-$(CONFIG_ARM64_MTE) += mteswap.o
|
|
KASAN_SANITIZE_physaddr.o += n
|
|
|
|
obj-$(CONFIG_KASAN) += kasan_init.o
|
|
KASAN_SANITIZE_kasan_init.o := n
|