Re: [RFC PATCH 14/20] intel_iommu: add FOR_EACH_ASSIGN_DEVICE macro

2017-04-28 Thread Lan Tianyu
On 2017年04月26日 18:06, Liu, Yi L wrote: > Add FOR_EACH_ASSIGN_DEVICE. It would be used to loop all assigned > devices when processing guest pasid table linking and iommu cache > invalidate propagation. > > Signed-off-by: Liu, Yi L > --- > hw/i386/intel_iommu.c | 32 ++

[PATCH 1/1] iommu/vt-d: Don't print the failure message when booting non-kdump kernel

2017-04-28 Thread Qiuxu Zhuo
When booting a new non-kdump kernel, we have below failure message: [0.004000] DMAR-IR: IRQ remapping was enabled on dmar2 but we are not in kdump mode [0.004000] DMAR-IR: Failed to copy IR table for dmar2 from previous kernel [0.004000] DMAR-IR: IRQ remapping was enabled on dmar1 but

Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function

2017-04-28 Thread Liu, Yi L
On Thu, Apr 27, 2017 at 11:12:45AM +0100, Jean-Philippe Brucker wrote: > On 27/04/17 07:36, Liu, Yi L wrote: > > On Wed, Apr 26, 2017 at 05:56:45PM +0100, Jean-Philippe Brucker wrote: > >> Hi Yi, Jacob, > >> > >> On 26/04/17 11:11, Liu, Yi L wrote: > >>> From: Jacob Pan > >>> > >>> Virtual IOMMU w

RE: Does a new booting kernel by "kexec -l" need to copy IR table from previous kernel?

2017-04-28 Thread Zhuo, Qiuxu
Hi Joerg Roedel, > From: j...@8bytes.org [mailto:j...@8bytes.org] > Yes, that is true. But the messages are harmless and you are safe to ignore > them in your usecase. > We only care about the kdump case when copying the old IR and DMAR tables > into the new kernel, > because in the kdump ca

Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function

2017-04-28 Thread Liu, Yi L
On Wed, Apr 26, 2017 at 05:56:45PM +0100, Jean-Philippe Brucker wrote: > Hi Yi, Jacob, > > On 26/04/17 11:11, Liu, Yi L wrote: > > From: Jacob Pan > > > > Virtual IOMMU was proposed to support Shared Virtual Memory (SVM) use > > case in the guest: > > https://lists.gnu.org/archive/html/qemu-deve

Re: [Qemu-devel] [RFC PATCH 02/20] intel_iommu: exposed extended-context mode to guest

2017-04-28 Thread Liu, Yi L
On Thu, Apr 27, 2017 at 06:32:21PM +0800, Peter Xu wrote: > On Wed, Apr 26, 2017 at 06:06:32PM +0800, Liu, Yi L wrote: > > VT-d implementations reporting PASID or PRS fields as "Set", must also > > report ecap.ECS as "Set". Extended-Context is required for SVM. > > > > When ECS is reported, intel

Re: [RFC PATCH 02/20] intel_iommu: exposed extended-context mode to guest

2017-04-28 Thread Liu, Yi L
On Fri, Apr 28, 2017 at 02:00:15PM +0800, Lan Tianyu wrote: > On 2017年04月27日 18:32, Peter Xu wrote: > > On Wed, Apr 26, 2017 at 06:06:32PM +0800, Liu, Yi L wrote: > >> VT-d implementations reporting PASID or PRS fields as "Set", must also > >> report ecap.ECS as "Set". Extended-Context is required

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-28 Thread Gerald Schaefer
Hi Joerg, I guess we are a bit special on s390 (again), see below. Sebastian is more familiar with the base s390 PCI code, he may correct me if I'm wrong. On Thu, 27 Apr 2017 23:03:25 +0200 Joerg Roedel wrote: > > Well, there is a separate zpci_dev for each pci_dev on s390, > > and each of thos

Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function

2017-04-28 Thread Jean-Philippe Brucker
On 28/04/17 10:04, Liu, Yi L wrote: > On Wed, Apr 26, 2017 at 05:56:45PM +0100, Jean-Philippe Brucker wrote: >> Hi Yi, Jacob, >> >> On 26/04/17 11:11, Liu, Yi L wrote: >>> From: Jacob Pan >>> >>> Virtual IOMMU was proposed to support Shared Virtual Memory (SVM) use >>> case in the guest: >>> https

Re: [PATCH] drivers/of_iommu: ignore SMMU DT nodes with status 'disabled'

2017-04-28 Thread Will Deacon
Hi Ard, [+ devicetree@] On Fri, Apr 14, 2017 at 01:43:15PM +0100, Ard Biesheuvel wrote: > DT nodes may have a status property, and if they do, such nodes should > only be considered present if the status property is set to 'okay'. > > Currently, we call the init function of IOMMUs described by t

Re: [PATCH] drivers/of_iommu: ignore SMMU DT nodes with status 'disabled'

2017-04-28 Thread Ard Biesheuvel
On 28 April 2017 at 14:11, Will Deacon wrote: > Hi Ard, > > [+ devicetree@] > > On Fri, Apr 14, 2017 at 01:43:15PM +0100, Ard Biesheuvel wrote: >> DT nodes may have a status property, and if they do, such nodes should >> only be considered present if the status property is set to 'okay'. >> >> Cur

Re: [PATCH] drivers/of_iommu: ignore SMMU DT nodes with status 'disabled'

2017-04-28 Thread Will Deacon
On Fri, Apr 28, 2017 at 02:14:49PM +0100, Ard Biesheuvel wrote: > On 28 April 2017 at 14:11, Will Deacon wrote: > > Hi Ard, > > > > [+ devicetree@] > > > > On Fri, Apr 14, 2017 at 01:43:15PM +0100, Ard Biesheuvel wrote: > >> DT nodes may have a status property, and if they do, such nodes should >

Re: [PATCH 1/2] iommu/s390: Fix IOMMU groups

2017-04-28 Thread Gerald Schaefer
On Thu, 27 Apr 2017 23:12:32 +0200 Joerg Roedel wrote: > On Thu, Apr 27, 2017 at 08:11:42PM +0200, Gerald Schaefer wrote: > > > +void zpci_destroy_iommu(struct zpci_dev *zdev) > > > +{ > > > + iommu_group_put(zdev->group); > > > + zdev->group = NULL; > > > +} > > > > While the rest of this pat

Re: [PATCH] drivers/of_iommu: ignore SMMU DT nodes with status 'disabled'

2017-04-28 Thread Ard Biesheuvel
On 28 April 2017 at 14:17, Will Deacon wrote: > On Fri, Apr 28, 2017 at 02:14:49PM +0100, Ard Biesheuvel wrote: >> On 28 April 2017 at 14:11, Will Deacon wrote: >> > Hi Ard, >> > >> > [+ devicetree@] >> > >> > On Fri, Apr 14, 2017 at 01:43:15PM +0100, Ard Biesheuvel wrote: >> >> DT nodes may have

Re: [PATCH 1/2] iommu/s390: Fix IOMMU groups

2017-04-28 Thread Joerg Roedel
On Fri, Apr 28, 2017 at 03:20:17PM +0200, Gerald Schaefer wrote: > On Thu, 27 Apr 2017 23:12:32 +0200 > Joerg Roedel wrote: > > This is the way to free an iommu-group. It was missing before probably > > because it was unclear whether the add_device function allocated a group > > or not. So there

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-28 Thread Joerg Roedel
Hi Gerald, On Fri, Apr 28, 2017 at 02:46:34PM +0200, Gerald Schaefer wrote: > On Thu, 27 Apr 2017 23:03:25 +0200 > Joerg Roedel wrote: > > > > Well, there is a separate zpci_dev for each pci_dev on s390, > > > and each of those has its own separate dma-table (thus not shared). > > > > Is that

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-28 Thread Sebastian Ott
On Fri, 28 Apr 2017, Joerg Roedel wrote: > On Fri, Apr 28, 2017 at 02:46:34PM +0200, Gerald Schaefer wrote: > > On Thu, 27 Apr 2017 23:03:25 +0200 > > Joerg Roedel wrote: > > > > > > Well, there is a separate zpci_dev for each pci_dev on s390, > > > > and each of those has its own separate dma-ta

[PATCH] ACPI/IORT: Fix CONFIG_IOMMU_API dependency

2017-04-28 Thread Lorenzo Pieralisi
The IOMMU probe deferral IORT rework had to add code in iort_iommu_configure() and iort_iommu_xlate() that requires the IOMMU_API to be selected in order to compile and work. Stub out the pieces of code that depend on CONFIG_IOMMU_API to be selected to prevent compilation failures such as: driver

Re: [PATCH 1/2] iommu/s390: Fix IOMMU groups

2017-04-28 Thread kbuild test robot
Hi Joerg, [auto build test ERROR on s390/features] [also build test ERROR on v4.11-rc8 next-20170428] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Joerg-Roedel/iommu-s390-Fix-iommu-groups-and

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-28 Thread Gerald Schaefer
On Fri, 28 Apr 2017 16:55:13 +0200 Joerg Roedel wrote: > > I am however a bit confused now, about how we would have allowed group > > sharing with the current s390 IOMMU code, or IOW in which scenario would > > iommu_group_get() in the add_device callback find a shareable iommu-group? > > The

Re: [PATCH 1/1] iommu/vt-d: Don't print the failure message when booting non-kdump kernel

2017-04-28 Thread Joerg Roedel
On Fri, Apr 28, 2017 at 01:16:15AM +0800, Qiuxu Zhuo wrote: > When booting a new non-kdump kernel, we have below failure message: > > [0.004000] DMAR-IR: IRQ remapping was enabled on dmar2 but we are not in > kdump mode > [0.004000] DMAR-IR: Failed to copy IR table for dmar2 from previous

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-28 Thread Joerg Roedel
On Fri, Apr 28, 2017 at 05:25:20PM +0200, Sebastian Ott wrote: > On Fri, 28 Apr 2017, Joerg Roedel wrote: > > That sounds special :) So will every function of a single device end up > > as a seperate device on a seperate root-bus? > > Yes. That's true even for multi-function and SRIOV. Okay, so i

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-28 Thread Joerg Roedel
Hi Gerald, On Fri, Apr 28, 2017 at 08:06:12PM +0200, Gerald Schaefer wrote: > On Fri, 28 Apr 2017 16:55:13 +0200 > Joerg Roedel wrote: > Also, IIRC, add_device will get called before attach_dev. Currently we > allow to attach more than one device (apparently from different buses) to > one domain

Re: [PATCH 2/2] iommu/s390: Add support for iommu_device handling

2017-04-28 Thread kbuild test robot
Hi Joerg, [auto build test ERROR on s390/features] [also build test ERROR on v4.11-rc8 next-20170428] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Joerg-Roedel/iommu-s390-Fix-iommu-groups-and