Skip to content
Commit 26e98a03 authored by Steven Price's avatar Steven Price
Browse files

arm64: Enforce bounce buffers for realm DMA



Within a realm guest it's not possible for a device emulated by the VMM
to access arbitrary guest memory. So force the use of bounce buffers to
ensure that the memory the emulated devices are accessing is in memory
which is explicitly shared with the host.

This adds a call to swiotlb_update_mem_attributes() which calls
set_memory_decrypted() to ensure the bounce buffer memory is shared with
the host. For non-realm guests or hosts this is a no-op.

Co-developed-by: Suzuki Poulose's avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Suzuki Poulose's avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Steven Price's avatarSteven Price <steven.price@arm.com>
---
v3: Simplify mem_init() by using a 'flags' variable.
parent be93244b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment