swiotlb: do not zero buffer in set_memory_decrypted()
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Tue, 25 Jan 2022 13:20:01 +0000 (16:20 +0300)
committerChristoph Hellwig <hch@lst.de>
Wed, 26 Jan 2022 16:05:54 +0000 (17:05 +0100)
commitdfcf2e017f5bb928094952d5d56d3566d3d07ba7
tree8a52cc0db08e9e858df46fd6e5bdb881c80faa41
parent0280e3c58f92b2fe0e8fbbdf8d386449168de4a8
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>
kernel/dma/swiotlb.c