Thread (15 messages) 15 messages, 3 authors, 2021-11-26

Re: [PATCH 1/5] x86/Swiotlb: Add Swiotlb bounce buffer remap function for HV IVM

flat view

From: Christoph Hellwig <hch@lst.de>
Date: 2021-11-17 10:00:02
Also in: linux-hyperv, linux-iommu, linux-scsi, lkml, xen-devel

The subject is wrong, nothing x86-specific here.  Please use
"swiotlb: " as the prefix
+ * @vaddr:	The vaddr of the swiotlb memory pool. The swiotlb
+ *		memory pool may be remapped in the memory encrypted case and store
Please avoid the overly long line.
quoted hunk ↗ jump to hunk
+	/*
+	 * With swiotlb_unencrypted_base setting, swiotlb bounce buffer will
+	 * be remapped in the swiotlb_update_mem_attributes() and return here
+	 * directly.
+	 */
I'd word this as:

	/*
	 * If swiotlb_unencrypted_base is set, the bounce buffer memory will
	 * be remapped and cleared in swiotlb_update_mem_attributes.
	 */
quoted hunk ↗ jump to hunk
+	ret = swiotlb_init_io_tlb_mem(mem, __pa(tlb), nslabs, false);
+	if (ret) {
+		memblock_free(mem->slots, alloc_size);
+		return ret;
+	}
With the latest update swiotlb_init_io_tlb_mem will always return 0,
so no need for the return value change or error handling here.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help