[patch -next] iommu: checking for NULL instead of IS_ERR

2015-06-10 Thread Dan Carpenter
The iommu_group_alloc() and iommu_group_get_for_dev() functions return error pointers, they never return NULL. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index c520c0c..9c25e6be 100644 --- a/drivers/iommu/iommu.c +++

re: iommu: Introduce iommu_request_dm_for_dev()

2015-06-10 Thread Dan Carpenter
Hello Joerg Roedel, This is a semi-automatic email about new static checker warnings. The patch eeae3fba3afe: iommu: Introduce iommu_request_dm_for_dev() from May 28, 2015, leads to the following Smatch complaint: drivers/iommu/iommu.c:1581 iommu_request_dm_for_dev() error: we

Re: [PATCH v11 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-06-10 Thread Joerg Roedel
On Tue, Jun 09, 2015 at 01:55:50PM +0100, David Woodhouse wrote: On Mon, 2015-06-08 at 18:13 +0200, Joerg Roedel wrote: So I think we need to read out that bit when we find translation enabled and if it is different from what we would set it to, we bail out of any copying, disable

[PATCH] iommu/vt-d: Don't copy translation tables if we find unexpected RTT setting

2015-06-10 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de The RTT bit in the RTADDR_REG can not be changed while translation is enabled. So check its value if we boot into a kdump kernel and find translation enabled, and if it is different from what we would set it to, bail out and don't try to copy over the

Re: [PATCH v11 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-06-10 Thread Li, ZhenHua
On 06/10/2015 05:21 PM, Joerg Roedel wrote: On Tue, Jun 09, 2015 at 01:55:50PM +0100, David Woodhouse wrote: On Mon, 2015-06-08 at 18:13 +0200, Joerg Roedel wrote: So I think we need to read out that bit when we find translation enabled and if it is different from what we would set it to, we

Re: Master-aware devices and sideband ID data

2015-06-10 Thread Will Deacon
On Tue, Jun 09, 2015 at 11:17:54AM +0100, Mark Rutland wrote: On Fri, Jun 05, 2015 at 10:05:34AM +0100, Will Deacon wrote: On Thu, Jun 04, 2015 at 11:19:30PM +0100, Chalamarla, Tirumalesh wrote: On Jun 1, 2015, at 3:22 AM, Mark Rutland mark.rutl...@arm.com wrote: It's possible to

Re: [PATCH v11 0/10] iommu/vt-d: Fix intel vt-d faults in kdump kernel

2015-06-10 Thread David Woodhouse
On Wed, 2015-06-10 at 17:32 +0800, Li, ZhenHua wrote: Is PASID part of new specs? Is there any plan to upgrade the driver to support the latest vt-d specs? Yes, and yes. I'm currently working on the latter — and the extended page table support in 4.1 is the precursor to that work. -- dwmw2

re: iommu/amd: Put IOMMUv2 devices in a direct mapped domain

2015-06-10 Thread Dan Carpenter
Hello Joerg Roedel, This is a semi-automatic email about new static checker warnings. The patch 0a3da4517107: iommu/amd: Put IOMMUv2 devices in a direct mapped domain from May 28, 2015, leads to the following Smatch complaint: drivers/iommu/amd_iommu.c:2285 amd_iommu_add_device()

re: iommu/amd: Implement dm_region call-backs

2015-06-10 Thread Dan Carpenter
Hello Joerg Roedel, The patch b61238c4a5e1: iommu/amd: Implement dm_region call-backs from May 28, 2015, leads to the following static checker warning: drivers/iommu/amd_iommu.c:3153 amd_iommu_get_dm_regions() error: potential null dereference 'region'. (kzalloc returns null)