mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-03 21:19:09 +08:00
swiotlb: do not zero buffer in set_memory_decrypted()
For larger TDX VM, memset() after set_memory_decrypted() in swiotlb_update_mem_attributes() takes substantial portion of boot time. Zeroing doesn't serve any functional purpose. Malicious VMM can mess with decrypted/shared buffer at any point. Remove the memset(). Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
committed by
Christoph Hellwig
parent
0280e3c58f
commit
dfcf2e017f
@@ -207,8 +207,6 @@ void __init swiotlb_update_mem_attributes(void)
|
||||
mem->vaddr = swiotlb_mem_remap(mem, bytes);
|
||||
if (!mem->vaddr)
|
||||
mem->vaddr = vaddr;
|
||||
|
||||
memset(mem->vaddr, 0, bytes);
|
||||
}
|
||||
|
||||
static void swiotlb_init_io_tlb_mem(struct io_tlb_mem *mem, phys_addr_t start,
|
||||
|
||||
Reference in New Issue
Block a user