RE: [PATCH V3 04/13] HV: Mark vmbus ring buffer visible to host in Isolation VM

2021-08-12 Thread Michael Kelley via iommu
From: Tianyu Lan Sent: Monday, August 9, 2021 10:56 AM > Subject: [PATCH V3 04/13] HV: Mark vmbus ring buffer visible to host in > Isolation VM > Use tag "Drivers: hv: vmbus:" in the Subject line. > Mark vmbus ring buffer visible with set_memory_decrypted() when > establish gpadl handle. > >

RE: [PATCH V3 03/13] x86/HV: Add new hvcall guest address host visibility support

2021-08-12 Thread Michael Kelley via iommu
From: Tianyu Lan Sent: Monday, August 9, 2021 10:56 AM [snip] > diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c > index ad8a5c586a35..1e4a0882820a 100644 > --- a/arch/x86/mm/pat/set_memory.c > +++ b/arch/x86/mm/pat/set_memory.c > @@ -29,6 +29,8 @@ > #include >

RE: [PATCH V3 03/13] x86/HV: Add new hvcall guest address host visibility support

2021-08-12 Thread Michael Kelley via iommu
From: Tianyu Lan Sent: Monday, August 9, 2021 10:56 AM > Subject: [PATCH V3 03/13] x86/HV: Add new hvcall guest address host > visibility support Use "x86/hyperv:" tag in the Subject line. > > From: Tianyu Lan > > Add new hvcall guest address host visibility support to mark > memory visible

RE: [PATCH V3 02/13] x86/HV: Initialize shared memory boundary in the Isolation VM.

2021-08-12 Thread Michael Kelley via iommu
From: Tianyu Lan Sent: Monday, August 9, 2021 10:56 AM > Subject: [PATCH V3 02/13] x86/HV: Initialize shared memory boundary in the > Isolation VM. As with Patch 1, use the "x86/hyperv:" tag in the Subject line. > > From: Tianyu Lan > > Hyper-V exposes shared memory boundary via cpuid >

RE: [PATCH V3 01/13] x86/HV: Initialize GHCB page in Isolation VM

2021-08-12 Thread Michael Kelley via iommu
From: Tianyu Lan Sent: Monday, August 9, 2021 10:56 AM > Subject: [PATCH V3 01/13] x86/HV: Initialize GHCB page in Isolation VM The subject line tag on patches under arch/x86/hyperv is generally "x86/hyperv:". There's some variation in the spelling of "hyperv", but let's go with the all

Re: [PATCH V3 09/13] DMA: Add dma_map_decrypted/dma_unmap_encrypted() function

2021-08-12 Thread Tianyu Lan
On 8/12/2021 8:26 PM, Christoph Hellwig wrote: On Mon, Aug 09, 2021 at 01:56:13PM -0400, Tianyu Lan wrote: From: Tianyu Lan In Hyper-V Isolation VM with AMD SEV, swiotlb boucne buffer needs to be mapped into address space above vTOM and so introduce dma_map_decrypted/dma_unmap_encrypted()

Re: [PATCH] dma-mapping: return an unsigned int from dma_map_sg{,_attrs}

2021-08-12 Thread Logan Gunthorpe
On 2021-08-12 7:00 a.m., Christoph Hellwig wrote: > These can only return 0 for failure or the number of entries, so turn > the return value into an unsigned int. > > Signed-off-by: Christoph Hellwig Makes sense to me. Reviewed-by: Logan Gunthorpe

Re: add support for the global coherent pool to the dma core

2021-08-12 Thread 'Christoph Hellwig'
On Wed, Jul 28, 2021 at 10:20:34AM -0500, Brian Cain wrote: > > this series adds support for using the global coherent (aka uncached) > > pool to the generic dma-direct code and then switches arm-nommu and > > hexagon over to it, together with a bunch of cleanups. > > Christoph, > > Thanks for

[PATCH] dma-mapping: return an unsigned int from dma_map_sg{,_attrs}

2021-08-12 Thread Christoph Hellwig
These can only return 0 for failure or the number of entries, so turn the return value into an unsigned int. Signed-off-by: Christoph Hellwig --- include/linux/dma-mapping.h | 9 + kernel/dma/mapping.c| 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git

Re: [RFC PATCH 2/3] iommu/dma-iommu: Support iovad->granule > PAGE_SIZE

2021-08-12 Thread Robin Murphy
On 2021-08-11 21:18, Sven Peter wrote: On Tue, Aug 10, 2021, at 11:51, Robin Murphy wrote: On 2021-08-09 21:45, Sven Peter wrote: On Mon, Aug 9, 2021, at 19:41, Robin Murphy wrote: On 2021-08-07 12:47, Sven Peter via iommu wrote: On Fri, Aug 6, 2021, at 20:04, Robin Murphy wrote: On

Re: [PATCH V3 10/13] x86/Swiotlb: Add Swiotlb bounce buffer remap function for HV IVM

2021-08-12 Thread Christoph Hellwig
This is still broken. You need to make sure the actual DMA allocations do have struct page backing. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH V3 09/13] DMA: Add dma_map_decrypted/dma_unmap_encrypted() function

2021-08-12 Thread Christoph Hellwig
On Mon, Aug 09, 2021 at 01:56:13PM -0400, Tianyu Lan wrote: > From: Tianyu Lan > > In Hyper-V Isolation VM with AMD SEV, swiotlb boucne buffer > needs to be mapped into address space above vTOM and so > introduce dma_map_decrypted/dma_unmap_encrypted() to map/unmap > bounce buffer memory. The

Re: [iommu:apple/dart 3/3] drivers/iommu/apple-dart.c:730:17: error: initialization of 'size_t (*)(struct iommu_domain *, long unsigned int, size_t, struct iommu_iotlb_gather *)' {aka 'long unsigned

2021-08-12 Thread Joerg Roedel
Hi Sven, On Tue, Aug 10, 2021 at 08:09:53AM +0200, Sven Peter wrote: > This happens because apple/dart is missing the "Optimizing iommu_[map/unmap] > performance" > series which is already in the core branch [1]. > The same commit works fine in iommu/next since that branch merges both >

Re: [PATCH] iommu: APPLE_DART should depend on ARCH_APPLE

2021-08-12 Thread Joerg Roedel
On Tue, Aug 10, 2021 at 03:47:19PM +0200, Geert Uytterhoeven wrote: > The Apple DART (Device Address Resolution Table) IOMMU is only present > on Apple ARM SoCs like the M1. Hence add a dependency on ARCH_APPLE, to > prevent asking the user about this driver when configuring a kernel > without

Re: [PATCH v3 2/5] dma-iommu: fix arch_sync_dma for map

2021-08-12 Thread Robin Murphy
On 2021-08-12 10:21, David Stevens wrote: On Thu, Aug 12, 2021 at 3:47 AM Robin Murphy wrote: On 2021-08-11 03:42, David Stevens wrote: From: David Stevens When calling arch_sync_dma, we need to pass it the memory that's actually being used for dma. When using swiotlb bounce buffers, this

Re: [PATCH 07/11] treewide: Replace the use of mem_encrypt_active() with prot_guest_has()

2021-08-12 Thread Kirill A. Shutemov
On Wed, Aug 11, 2021 at 10:52:55AM -0500, Tom Lendacky wrote: > On 8/11/21 7:19 AM, Kirill A. Shutemov wrote: > > On Tue, Aug 10, 2021 at 02:48:54PM -0500, Tom Lendacky wrote: > >> On 8/10/21 1:45 PM, Kuppuswamy, Sathyanarayanan wrote: > >>> > >>> > >>> On 7/27/21 3:26 PM, Tom Lendacky wrote: >

Re: [PATCH v3 5/5] dma-iommu: account for min_align_mask

2021-08-12 Thread Robin Murphy
On 2021-08-12 02:45, David Stevens wrote: On Thu, Aug 12, 2021 at 4:12 AM Robin Murphy wrote: On 2021-08-11 03:42, David Stevens wrote: From: David Stevens For devices which set min_align_mask, swiotlb preserves the offset of the original physical address within that mask. Since

Re: [PATCH v3 2/5] dma-iommu: fix arch_sync_dma for map

2021-08-12 Thread David Stevens
On Thu, Aug 12, 2021 at 3:47 AM Robin Murphy wrote: > > On 2021-08-11 03:42, David Stevens wrote: > > From: David Stevens > > > > When calling arch_sync_dma, we need to pass it the memory that's > > actually being used for dma. When using swiotlb bounce buffers, this is > > the bounce buffer.