Re: [PATCH 1/6] mmput: use notifier chain to call subsystem exit handler.

2014-07-01 Thread Joerg Roedel
On Mon, Jun 30, 2014 at 02:35:57PM -0400, Jerome Glisse wrote: We do intend to tear down all secondary mapping inside the relase callback but still we can not cleanup all the resources associated with it. And why can't you cleanup the other resources in the file close path? Tearing down the

Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-07-01 Thread Will Deacon
Hi Olav, On Mon, Jun 30, 2014 at 05:51:51PM +0100, Olav Haugan wrote: Mapping and unmapping are more often than not in the critical path. map_range and unmap_range allows SMMU driver implementations to optimize the process of mapping and unmapping buffers into the SMMU page tables. Instead of

Re: [RFC/PATCH 3/7] iopoll: Introduce memory-mapped IO polling macros

2014-07-01 Thread Will Deacon
Hi Matt, On Mon, Jun 30, 2014 at 05:51:52PM +0100, Olav Haugan wrote: From: Matt Wagantall ma...@codeaurora.org It is sometimes necessary to poll a memory-mapped register until its value satisfies some condition. Introduce a family of convenience macros that do this. Tight-loop and sleeping

Re: [PATCH 1/6] mmput: use notifier chain to call subsystem exit handler.

2014-07-01 Thread Joerg Roedel
Hi Andrew, On Mon, Jun 30, 2014 at 06:57:48PM +, Lewycky, Andrew wrote: As an aside we found another small issue: amd_iommu_bind_pasid calls get_task_mm. This bumps the mm_struct use count and it will never be released. This would prevent the buggy code path described above from ever

Re: [PATCH 1/6] mmput: use notifier chain to call subsystem exit handler.

2014-07-01 Thread Joerg Roedel
On Tue, Jul 01, 2014 at 09:29:49AM +, Gabbay, Oded wrote: In the KFD, we need to maintain a notion of each compute process. Therefore, we have an object called kfd_process that is created for each process that uses the KFD. Naturally, we need to be able to track the process's shutdown in

Re: [RFC 04/10] memory: Add Tegra124 memory controller support

2014-07-01 Thread Hiroshi Doyu
Thierry Reding thierry.red...@gmail.com writes: diff --git a/include/dt-bindings/memory/tegra124-mc.h b/include/dt-bindings/memory/tegra124-mc.h new file mode 100644 index ..6b1617ce022f --- /dev/null +++ b/include/dt-bindings/memory/tegra124-mc.h @@ -0,0 +1,30 @@ +#ifndef

[RFC PATCH 1/3] iommu: introduce IOMMU_DOMAIN_HYP domain type for hypervisor allocation

2014-07-01 Thread Will Deacon
Some IOMMUs, such as the ARM SMMU, support two stages of translation. The idea behind such a scheme is to allow a guest operating system to use the IOMMU for DMA mappings in the first stage of translation, with the hypervisor then installing mappings in the second stage to provide isolation of the

[RFC PATCH 2/3] vfio/iommu_type1: add new VFIO_TYPE1_HYP_IOMMU IOMMU type

2014-07-01 Thread Will Deacon
VFIO allows devices to be safely handed off to userspace by putting them behind an IOMMU configured to ensure DMA and interrupt isolation. This enables userspace KVM clients, such as kvmtool and qemu, to further map the device into a virtual machine. With IOMMUs such as the ARM SMMU, it is then

Re: [RFC PATCH 1/3] iommu: introduce IOMMU_DOMAIN_HYP domain type for hypervisor allocation

2014-07-01 Thread Alex Williamson
On Tue, 2014-07-01 at 17:10 +0100, Will Deacon wrote: Some IOMMUs, such as the ARM SMMU, support two stages of translation. The idea behind such a scheme is to allow a guest operating system to use the IOMMU for DMA mappings in the first stage of translation, with the hypervisor then

Re: [RFC PATCH 1/3] iommu: introduce IOMMU_DOMAIN_HYP domain type for hypervisor allocation

2014-07-01 Thread Will Deacon
Hi Alex, Thanks for having a look. On Tue, Jul 01, 2014 at 06:42:33PM +0100, Alex Williamson wrote: On Tue, 2014-07-01 at 17:10 +0100, Will Deacon wrote: Some IOMMUs, such as the ARM SMMU, support two stages of translation. The idea behind such a scheme is to allow a guest operating system

Re: [PATCH 1/6] mmput: use notifier chain to call subsystem exit handler.

2014-07-01 Thread Jerome Glisse
On Tue, Jul 01, 2014 at 01:00:18PM +0200, Joerg Roedel wrote: On Tue, Jul 01, 2014 at 09:29:49AM +, Gabbay, Oded wrote: In the KFD, we need to maintain a notion of each compute process. Therefore, we have an object called kfd_process that is created for each process that uses the KFD.

Re: [PATCH 1/6] mmput: use notifier chain to call subsystem exit handler.

2014-07-01 Thread Jerome Glisse
On Tue, Jul 01, 2014 at 11:06:20PM +0200, Joerg Roedel wrote: On Tue, Jul 01, 2014 at 03:33:44PM -0400, Jerome Glisse wrote: On Tue, Jul 01, 2014 at 01:00:18PM +0200, Joerg Roedel wrote: No, its not in this case. The file descriptor is used to connect a process address space with a device