Re: [PATCH] iommu: amd: Fix IOMMU perf counter clobbering during init

2020-01-20 Thread Suravee Suthikulpanit
On 1/17/2020 5:08 PM, Joerg Roedel wrote: Adding Suravee, who wrote the IOMMU Perf Counter code. On Tue, Jan 14, 2020 at 08:12:20AM -0700, Shuah Khan wrote: init_iommu_perf_ctr() clobbers the register when it checks write access to IOMMU perf counters and fails to restore when they are

Re: [PATCH v4 4/7] iommu/vt-d: Use pci_real_dma_dev() for mapping

2020-01-20 Thread Derrick, Jonathan
Good catch. Thanks Baolu. Will do v5 fixing this and Christoph's nit On Tue, 2020-01-21 at 09:06 +0800, Lu Baolu wrote: > Hi, > > On 1/18/20 12:27 AM, Jon Derrick wrote: > > The PCI device may have a DMA requester on another bus, such as VMD > > subdevices needing to use the VMD endpoint. This

Re: [PATCH v4 4/7] iommu/vt-d: Use pci_real_dma_dev() for mapping

2020-01-20 Thread Lu Baolu
Hi, On 1/18/20 12:27 AM, Jon Derrick wrote: The PCI device may have a DMA requester on another bus, such as VMD subdevices needing to use the VMD endpoint. This case requires the real DMA device when mapping to IOMMU. Signed-off-by: Jon Derrick --- drivers/iommu/intel-iommu.c | 9 +

Re: [RFC PATCH 0/4] iommu: Per-group default domain type

2020-01-20 Thread Lu Baolu
Hi John, On 1/20/20 5:44 PM, John Garry wrote: On 01/01/2020 05:26, Lu Baolu wrote: An IOMMU group represents the smallest set of devices that are considered to be isolated. All devices belonging to an IOMMU group share a default domain for DMA APIs. There are two types of default domain:

Re: [Patch v3 0/3] iommu: reduce spinlock contention on fast path

2020-01-20 Thread Cong Wang
On Tue, Dec 17, 2019 at 8:40 PM Cong Wang wrote: > > This patchset contains three small optimizations for the global spinlock > contention in IOVA cache. Our memcache perf test shows this reduced its > p999 latency down by 45% on AMD when IOMMU is enabled. > > (Resending v3 on Joerg's request.)

Re: [PATCH v4 0/7] Clean up VMD DMA Map Ops

2020-01-20 Thread Lorenzo Pieralisi
On Sun, Jan 19, 2020 at 11:25:23PM +0100, Christoph Hellwig wrote: > This series looks good to me (modulo the one minor nitpick which isn't > all that important): > > Reviewed-by: Christoph Hellwig Hi Bjorn, are you picking this up ? I can merge it too but since it is mostly x86 changes I

Re: [PATCH v4 6/7] PCI: vmd: Stop overriding dma_map_ops

2020-01-20 Thread Lorenzo Pieralisi
On Fri, Jan 17, 2020 at 09:27:28AM -0700, Jon Derrick wrote: > Devices on the VMD domain use the VMD endpoint's requester ID and have > been relying on the VMD endpoint's DMA operations. The problem with this > was that VMD domain devices would use the VMD endpoint's attributes when > doing DMA

Re: [RFC PATCH 0/4] iommu: Per-group default domain type

2020-01-20 Thread John Garry
On 01/01/2020 05:26, Lu Baolu wrote: An IOMMU group represents the smallest set of devices that are considered to be isolated. All devices belonging to an IOMMU group share a default domain for DMA APIs. There are two types of default domain: IOMMU_DOMAIN_DMA and IOMMU_DOMAIN_IDENTITY. The