mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
coco: arm64: s390: powerpc: Mark secure guests with CC_ATTR_GUEST_MEM_ENCRYPT
arm64 Realms, powerpc secure guests and s390 protected virtualization guests currently report CC_ATTR_MEM_ENCRYPT, but not CC_ATTR_GUEST_MEM_ENCRYPT. These environments are all secure guest configurations. Their force_dma_unencrypted() implementations also treat the same secure guest state as requiring unencrypted DMA. Report CC_ATTR_GUEST_MEM_ENCRYPT for the same condition so generic confidential-computing code can distinguish guest memory encryption from host memory encryption instead of relying only on CC_ATTR_MEM_ENCRYPT. Signed-off-by: Aneesh Kumar K.V (Arm) <aneesh.kumar@kernel.org> Link: https://lore.kernel.org/r/20260717180442.110954-9-aneesh.kumar@kernel.org Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
This commit is contained in:
parent
a7139dbbb1
commit
d4b9d59318
|
|
@ -418,6 +418,7 @@ bool cc_platform_has(enum cc_attr attr)
|
|||
{
|
||||
switch (attr) {
|
||||
case CC_ATTR_MEM_ENCRYPT:
|
||||
case CC_ATTR_GUEST_MEM_ENCRYPT:
|
||||
return is_realm_world() || is_protected_kvm_guest();
|
||||
default:
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ bool cc_platform_has(enum cc_attr attr)
|
|||
{
|
||||
switch (attr) {
|
||||
case CC_ATTR_MEM_ENCRYPT:
|
||||
case CC_ATTR_GUEST_MEM_ENCRYPT:
|
||||
return is_secure_guest();
|
||||
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ bool cc_platform_has(enum cc_attr attr)
|
|||
{
|
||||
switch (attr) {
|
||||
case CC_ATTR_MEM_ENCRYPT:
|
||||
case CC_ATTR_GUEST_MEM_ENCRYPT:
|
||||
return is_prot_virt_guest();
|
||||
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user