mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
x86/mm: Add DMA support for SEV memory encryption
DMA access to encrypted memory cannot be performed when SEV is active. In order for DMA to properly work when SEV is active, the SWIOTLB bounce buffers must be used. Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Brijesh Singh <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Borislav Petkov <[email protected]>C Tested-by: Borislav Petkov <[email protected]> Cc: [email protected] Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
This commit is contained in:
parent
0e4c12b45a
commit
d7b417fa08
2 changed files with 89 additions and 2 deletions
|
|
@ -507,8 +507,9 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev,
|
|||
if (no_iotlb_memory)
|
||||
panic("Can not allocate SWIOTLB buffer earlier and can't now provide you with the DMA bounce buffer");
|
||||
|
||||
if (sme_active())
|
||||
pr_warn_once("SME is active and system is using DMA bounce buffers\n");
|
||||
if (mem_encrypt_active())
|
||||
pr_warn_once("%s is active and system is using DMA bounce buffers\n",
|
||||
sme_active() ? "SME" : "SEV");
|
||||
|
||||
mask = dma_get_seg_boundary(hwdev);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue