[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Resend RFC PATCH V4 09/13] x86/Swiotlb/HV: Add Swiotlb bounce buffer remap function for HV IVM
- To: Christoph Hellwig <hch@xxxxxx>
- From: Tianyu Lan <ltykernel@xxxxxxxxx>
- Date: Sat, 14 Aug 2021 00:43:16 +0800
- Cc: kys@xxxxxxxxxxxxx, haiyangz@xxxxxxxxxxxxx, sthemmin@xxxxxxxxxxxxx, wei.liu@xxxxxxxxxx, decui@xxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, x86@xxxxxxxxxx, hpa@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, luto@xxxxxxxxxx, peterz@xxxxxxxxxxxxx, konrad.wilk@xxxxxxxxxx, boris.ostrovsky@xxxxxxxxxx, jgross@xxxxxxxx, sstabellini@xxxxxxxxxx, joro@xxxxxxxxxx, will@xxxxxxxxxx, davem@xxxxxxxxxxxxx, kuba@xxxxxxxxxx, jejb@xxxxxxxxxxxxx, martin.petersen@xxxxxxxxxx, arnd@xxxxxxxx, m.szyprowski@xxxxxxxxxxx, robin.murphy@xxxxxxx, kirill.shutemov@xxxxxxxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, rppt@xxxxxxxxxx, Tianyu.Lan@xxxxxxxxxxxxx, thomas.lendacky@xxxxxxx, ardb@xxxxxxxxxx, robh@xxxxxxxxxx, nramas@xxxxxxxxxxxxxxxxxxx, pgonda@xxxxxxxxxx, martin.b.radev@xxxxxxxxx, david@xxxxxxxxxx, krish.sadhukhan@xxxxxxxxxx, saravanand@xxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, keescook@xxxxxxxxxxxx, rientjes@xxxxxxxxxx, hannes@xxxxxxxxxxx, michael.h.kelley@xxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, vkuznets@xxxxxxxxxx, brijesh.singh@xxxxxxx, anparri@xxxxxxxxxxxxx
- Delivery-date: Fri, 13 Aug 2021 16:43:41 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Christoph:
I followed your this suggestion to rework the latest
version(https://lkml.org/lkml/2021/8/9/805). I just remove the arch
prefix from your suggested name arch_dma_map_decrypted because the
platform may populate their map/umap callback in the ops. But from your
latest comment(https://lkml.org/lkml/2021/8/12/149), these names confuse
vs the actual dma_map_* calls... Could you help to give the right
function name? The new map function is to map bounce buffer in the
trust/Isolation VM and these buffers are DMA memory.
On 7/20/2021 9:54 PM, Christoph Hellwig wrote:
- set_memory_decrypted((unsigned long)vaddr, bytes >> PAGE_SHIFT);
- memset(vaddr, 0, bytes);
+ mem->vstart = (void *)set_memory_decrypted_map((unsigned long)vaddr,
bytes);
Please always pass kernel virtual addresses as pointers.
And I think these APIs might need better names, e.g.
arch_dma_map_decrypted and arch_dma_unmap_decrypted.
Also these will need fallback versions for non-x86 architectures that
currently use memory encryption.
|