On Mon, Feb 10, 2014 at 06:32:32PM +, Will Deacon wrote:
> The following changes since commit b28a960c42fcd9cfc987441fa6d1c1a471f0f9ed:
>
> Linux 3.14-rc2 (2014-02-09 18:15:47 -0800)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.
On Mon, Feb 10, 2014 at 06:32:32PM +, Will Deacon wrote:
> - Andreas Herrmann took the driver for a run with a real SATA
> controller, which caused the new mutex-based locking to explode
> since we require mappings in atomic context
I just did quick review of the changes. Was the SAT
Hi Joerg,
On Tue, Feb 18, 2014 at 05:50:27PM +, Joerg Roedel wrote:
> On Mon, Feb 10, 2014 at 06:32:32PM +, Will Deacon wrote:
> > - Andreas Herrmann took the driver for a run with a real SATA
> > controller, which caused the new mutex-based locking to explode
> > since we requir
On Tue, Feb 18, 2014 at 06:36:26PM +, Will Deacon wrote:
> On Tue, Feb 18, 2014 at 05:50:27PM +, Joerg Roedel wrote:
> > I just did quick review of the changes. Was the SATA controller using
> > the IOMMU through the DMA-API? In this case you would need the IRQ-safe
> > spinlocks to avoid d
This is v2 of my rework of part of Stephen's patch [1]. My v1 posting,
with a little discussion, is here [2].
This removes SR-IOV migration support, which seems to be unused.
Changes since v1:
- Drop the removal of MMIO exclusivity.
- Add a few includes of . The SR-IOV migration
support
We currently include in , but I'm about to
remove that from linux/pci.h, so add explicit includes where needed.
Signed-off-by: Bjorn Helgaas
---
drivers/misc/mic/card/mic_device.h |1 +
drivers/misc/mic/host/mic_device.h |1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/misc/
We currently include in , but I'm about to
remove that from linux/pci.h, so add explicit includes where needed.
Signed-off-by: Bjorn Helgaas
---
drivers/misc/mei/hw-me.h |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/misc/mei/hw-me.h b/drivers/misc/mei/hw-me.h
index 80bd829fbd9a
We currently include in , but I'm about to
remove that from linux/pci.h, so add explicit includes where needed.
Signed-off-by: Bjorn Helgaas
---
drivers/iommu/amd_iommu_types.h |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types
This reverts commit 74bb1bcc7dbb ("PCI: handle SR-IOV Virtual Function
Migration"), removing this exported interface:
pci_sriov_migration()
Since pci_sriov_migration() is unused, it is impossible to schedule
sriov_migration_task() or use any of the other migration infrastructure.
This is based
Array 'g_iommus' may be freed twice on error recovery path in function
init_dmars() and free_dmar_iommu(), thus cause random system crash as
below.
[6.774301] IOMMU: dmar init failed
[6.778310] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[6.785615] software IO TLB [mem 0x
Function device_notifier() in intel-iommu.c fails to remove
device_domain_info data structures for PCI devices if they are
associated with si_domain because iommu_no_mapping() returns true
for those PCI devices. This will cause memory leak and caching of
stale information in domain->devices list.
Factor out function dmar_alloc_dev_scope() from dmar_parse_dev_scope()
for later reuse.
Signed-off-by: Jiang Liu
---
drivers/iommu/dmar.c | 28
include/linux/dmar.h |1 +
2 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/drivers/iommu/dmar.c b/dr
Intel DMA/interrupt remapping drivers scan available PCI/memory devices
at startup and cache discovered hardware topologies. They don't update
cached information if PCI/memory hotplug event happens at runtime, then
the stale information may break DMA/interrupt remapping logic.
This patchset first
Function device_notifier() in intel-iommu.c only remove domain_device_info
data structure associated with a PCI device when handling PCI device
driver unbinding events. If a PCI device has never been bound to a PCI
device driver, there won't be BUS_NOTIFY_UNBOUND_DRIVER event when
hot-removing the
Function get_domain_for_dev() is a little complex, simplify it
by factoring out dmar_search_domain_by_dev_info() and
dmar_insert_dev_info().
Signed-off-by: Jiang Liu
---
drivers/iommu/intel-iommu.c | 142 ---
1 file changed, 66 insertions(+), 76 deletions
Enhance function get_domain_for_dev() to release allocated resources
if failed to create domain for PCIe endpoint, otherwise the allocated
resources will get lost.
Signed-off-by: Jiang Liu
---
drivers/iommu/intel-iommu.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
di
Domain id 0 will be assigned to invalid translation without allocating
domain data structure if DMAR unit supports caching mode. So in function
free_dmar_iommu(), we should check whether the domain pointer is NULL,
otherwise it will cause system crash as below:
[6.790519] BUG: unable to handle
Current Intel DMAR/IOMMU driver assumes that all PCI devices associated
with DMAR/RMRR/ATSR device scope arrays are created at boot time and
won't change at runtime, so it caches pointers of associated PCI device
object. That assumption may be wrong now due to:
1) introduction of PCI host bridge ho
The iommu_count field in si_domain(static identity domain) is
initialized to zero and never increases. It will underflow
when tearing down iommu unit in function free_dmar_iommu()
and leak memory. So refine code to correctly manage
si_domain->iommu_count.
Warning message caused by si_domain memory
Introduce a global rwsem dmar_global_lock, which will be used to
protect DMAR related global data structures from DMAR/PCI/memory
device hotplug operations in process context.
DMA and interrupt remapping related data structures are read most,
and only change when memory/PCI/DMAR hotplug event happ
Current Intel IOMMU driver only matches a PCIe root port with the first
DRHD unit with the samge segment number. It will report false result
if there are multiple DRHD units with the same segment number, thus fail
to detect ATS capability for some PCIe devices.
This patch refines function dmar_fin
Introduce for_each_dev_scope()/for_each_active_dev_scope() to walk
{active} device scope entries. This will help following RCU lock
related patches.
Signed-off-by: Jiang Liu
---
drivers/iommu/dmar.c| 14 +++---
drivers/iommu/intel-iommu.c | 100 +---
Move private structures and variables into intel-iommu.c, which will
help to simplify locking policy for hotplug. Also delete redundant
declarations.
Signed-off-by: Jiang Liu
---
drivers/iommu/intel-iommu.c | 31 +--
include/linux/dmar.h| 23 +-
Global DMA and interrupt remapping resources may be accessed in
interrupt context, so use RCU instead of rwsem to protect them
in such cases.
Signed-off-by: Jiang Liu
---
drivers/iommu/dmar.c| 33 -
drivers/iommu/intel-iommu.c | 20
Now we have a PCI bus notification based mechanism to update DMAR
device scope array, we could extend the mechanism to support boot
time initialization too, which will help to unify and simplify
the implementation.
Signed-off-by: Jiang Liu
---
drivers/iommu/dmar.c| 163 -
Reduce duplicated code to handle virtual machine domains, there's no
functionality changes. It also improves code readability.
Signed-off-by: Jiang Liu
---
drivers/iommu/intel-iommu.c | 177 +++
1 file changed, 45 insertions(+), 132 deletions(-)
diff --g
If static identity domain is created, IOMMU driver needs to update
si_domain page table when memory hotplug event happens. Otherwise
PCI device DMA operations can't access the hot-added memory regions.
Signed-off-by: Jiang Liu
---
drivers/iommu/intel-iommu.c | 71 ++
27 matches
Mail list logo