Thread (26 messages) 26 messages, 4 authors, 2021-06-21

Re: [PATCH v13 01/12] swiotlb: Refactor swiotlb init functions

From: Christoph Hellwig <hch@lst.de>
Date: 2021-06-18 14:32:22
Also in: intel-gfx, linux-devicetree, linux-iommu, linux-pci, lkml, xen-devel

On Fri, Jun 18, 2021 at 09:09:17AM -0500, Tom Lendacky wrote:
quoted
swiotlb_init_with_tbl uses memblock_alloc to allocate the io_tlb_mem
and memblock_alloc[1] will do memset in memblock_alloc_try_nid[2], so
swiotlb_init_with_tbl is also good.
I'm happy to add the memset in swiotlb_init_io_tlb_mem if you think
it's clearer and safer.
On x86, if the memset is done before set_memory_decrypted() and memory
encryption is active, then the memory will look like ciphertext afterwards
and not be zeroes. If zeroed memory is required, then a memset must be
done after the set_memory_decrypted() calls.
Which should be fine - we don't care that the memory is cleared to 0,
just that it doesn't leak other data.  Maybe a comment would be useful,
though,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help