summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel
diff options
context:
space:
mode:
authorMostafa Saleh <smostafa@google.com>2026-06-03 11:05:22 +0000
committerWill Deacon <will@kernel.org>2026-07-21 22:27:47 +0000
commite62decaf98e7c1385c4a22c61ba8bf94d24713a5 (patch)
tree107182e94051846df0561ca6b670a4f9d6f31e17 /arch/arm64/kernel
parent442d366cc1aabc699015a2e10a41bba17fe416ad (diff)
downloadlinux-e62decaf98e7c1385c4a22c61ba8bf94d24713a5.tar.gz
linux-e62decaf98e7c1385c4a22c61ba8bf94d24713a5.zip
arm64/coco: Add pKVM as a CC platform
pKVM does support memory encryption, expose that to the rest of the kernel through cc_platform_has() At the moment, all devices inside the guest are emulated which requires its memory to be shared back to the host (decrypted), so set force_dma_unencrypted() to always return true. Although, typically pKVM guests rely on restricted-dma-pools to bounce traffic, with this change, it is possible to solely rely on the default SWIOTLB for that (assuming the appropriate size is set from the command line) Signed-off-by: Mostafa Saleh <smostafa@google.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Tested-by: Aneesh Kumar K.V (Arm) <aneesh.kumar@kernel.org> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r--arch/arm64/kernel/rsi.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/arch/arm64/kernel/rsi.c b/arch/arm64/kernel/rsi.c
index 92160f2e57ff..25ca75ce1a4d 100644
--- a/arch/arm64/kernel/rsi.c
+++ b/arch/arm64/kernel/rsi.c
@@ -7,7 +7,6 @@
#include <linux/memblock.h>
#include <linux/psci.h>
#include <linux/swiotlb.h>
-#include <linux/cc_platform.h>
#include <linux/platform_device.h>
#include <asm/io.h>
@@ -23,17 +22,6 @@ EXPORT_SYMBOL(prot_ns_shared);
DEFINE_STATIC_KEY_FALSE_RO(rsi_present);
EXPORT_SYMBOL(rsi_present);
-bool cc_platform_has(enum cc_attr attr)
-{
- switch (attr) {
- case CC_ATTR_MEM_ENCRYPT:
- return is_realm_world();
- default:
- return false;
- }
-}
-EXPORT_SYMBOL_GPL(cc_platform_has);
-
static bool rsi_version_matches(void)
{
unsigned long ver_lower, ver_higher;