[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH V3 08/11] swiotlb: Add bounce buffer remap address setting function
- To: Christoph Hellwig <hch@xxxxxx>, Tianyu Lan <ltykernel@xxxxxxxxx>
- From: Robin Murphy <robin.murphy@xxxxxxx>
- Date: Mon, 14 Jun 2021 14:49:51 +0100
- Cc: kys@xxxxxxxxxxxxx, haiyangz@xxxxxxxxxxxxx, sthemmin@xxxxxxxxxxxxx, wei.liu@xxxxxxxxxx, decui@xxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, x86@xxxxxxxxxx, hpa@xxxxxxxxx, arnd@xxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, luto@xxxxxxxxxx, peterz@xxxxxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, kirill.shutemov@xxxxxxxxxxxxxxx, rppt@xxxxxxxxxx, hannes@xxxxxxxxxxx, cai@xxxxxx, krish.sadhukhan@xxxxxxxxxx, saravanand@xxxxxx, Tianyu.Lan@xxxxxxxxxxxxx, konrad.wilk@xxxxxxxxxx, m.szyprowski@xxxxxxxxxxx, boris.ostrovsky@xxxxxxxxxx, jgross@xxxxxxxx, sstabellini@xxxxxxxxxx, joro@xxxxxxxxxx, will@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, kuba@xxxxxxxxxx, jejb@xxxxxxxxxxxxx, martin.petersen@xxxxxxxxxx, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, vkuznets@xxxxxxxxxx, thomas.lendacky@xxxxxxx, brijesh.singh@xxxxxxx, sunilmut@xxxxxxxxxxxxx
- Delivery-date: Mon, 14 Jun 2021 13:50:11 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2021-06-07 07:43, Christoph Hellwig wrote:
On Sun, May 30, 2021 at 11:06:25AM -0400, Tianyu Lan wrote:
From: Tianyu Lan <Tianyu.Lan@xxxxxxxxxxxxx>
For Hyper-V isolation VM with AMD SEV SNP, the bounce buffer(shared memory)
needs to be accessed via extra address space(e.g address above bit39).
Hyper-V code may remap extra address space outside of swiotlb. swiotlb_
bounce() needs to use remap virtual address to copy data from/to bounce
buffer. Add new interface swiotlb_set_bounce_remap() to do that.
Why can't you use the bus_dma_region ranges to remap to your preferred
address?
FWIW, I think a better generalisation for this would be allowing
set_memory_decrypted() to return an address rather than implicitly
operating in-place, and hide all the various hypervisor hooks behind that.
Robin.
|