- 25 Aug, 2015 2 commits
-
-
Joerg Roedel authored
There is a bug in iommu_context_addr() which will always use the lower context table, even when the upper context table needs to be used. Fix this issue. Fixes: 03ecc32c ("iommu/vt-d: support extended root and context entries") Reported-by: Xiao, Nan <nan.xiao@hp.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Xiao, Nan authored
According to "Intel Virtualization Technology for Directed I/O" specification, DRHD stands for "DMA Remapping Hardware Unit Definition" , not "DMA Engine Reporting Structure". Signed-off-by: Nan Xiao <nan.xiao@hp.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
- 13 Aug, 2015 4 commits
-
-
Joerg Roedel authored
This fixes wrong accesses to iomem introduced by the kdump fixing code. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
These functions are only used in that file and can be static. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
Found by a coccicheck script. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
The function return type is bool, so return false instead of 0. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
- 12 Aug, 2015 26 commits
-
-
Joerg Roedel authored
When a 'struct device_domain_info' is created as an alias for another device, this struct will not be re-used when the real device is encountered. Fix that to avoid duplicate device_domain_info structures being added. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
For devices without an PCI alias there will be two device_domain_info structures added. Prevent that by checking if the alias is different from the device. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
This struct contains all necessary information for the function already. Also handle the info->dev == NULL case while at it. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
The code in the locked section does not touch anything protected by the dmar_global_lock. Remove it from there. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
When this lock is held the device_domain_lock is also required to make sure the device_domain_info does not vanish while in use. So this lock can be removed as it gives no additional protection. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
There is no need to make a difference here between VM and non-VM domains, so simplify this code here. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
Move the code to attach/detach domains to iommus and vice verce into a single function to make sure there are no dangling references. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
This makes domain attachment more synchronous with domain deattachment. The domain<->iommu link is released in dmar_remove_one_dev_info. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
This allows to do domain->iommu attachment after domain_init has run. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
Rename this function and the ones further down its call-chain to domain_context_clear_*. In particular this means: iommu_detach_dependent_devices -> domain_context_clear iommu_detach_dev_cb -> domain_context_clear_one_cb iommu_detach_dev -> domain_context_clear_one These names match a lot better with its domain_context_mapping counterparts. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
Rename the function to dmar_remove_one_dev_info to match is name better with its dmar_insert_one_dev_info counterpart. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
Rename this function to dmar_insert_one_dev_info() to match the name better with its counter part function domain_remove_one_dev_info(). Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
Do the context-mapping of devices from a single place in the call-path and clean up the other call-sites. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
Just call domain_remove_one_dev_info() for all devices in the domain instead of reimplementing the functionality. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
Simplify this function as much as possible with the new iommu_refcnt field. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
We don't need to do an expensive search for domain-ids anymore, as we keep track of per-iommu domain-ids. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
This replaces the dmar_domain->iommu_bmp with a similar reference count array. This allows us to keep track of how many devices behind each iommu are attached to the domain. This is necessary for further simplifications and optimizations to the iommu<->domain attachment code. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
This field is now obsolete because all places use the per-iommu domain-ids. Kill the remaining uses of this field and remove it. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
There is no reason for this special handling of the si_domain. The per-iommu domain-id can be allocated on-demand like for any other domain. So remove the pre-allocation code. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
This function can figure out the domain-id to use itself from the iommu_did array. This is more reliable over different domain types and brings us one step further to remove the domain->id field. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
Get rid of the special cases for VM domains vs. non-VM domains and simplify the code further to just handle the hardware passthrough vs. page-table case. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
There is no reason to pass the translation type through multiple layers. It can also be determined in the domain_context_mapping_one function directly. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
The special case for VM domains is not needed, as other domains could be attached to the iommu in the same way. So get rid of this special case. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
This array is indexed by the domain-id and contains the pointers to the domains attached to this iommu. Modern systems support 65536 domain ids, so that this array has a size of 512kb, per iommu. This is a huge waste of space, as the array is usually sparsely populated. This patch makes the array two-dimensional and allocates the memory for the domain pointers on-demand. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
This makes it easier to change the layout of the data structure later. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Joerg Roedel authored
Instead of searching in the domain array for already allocated domain ids, keep track of them explicitly. Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
- 03 Aug, 2015 5 commits
-
-
Alex Williamson authored
Debugging domain ID leakage typically requires long running tests in order to exhaust the domain ID space or kernel instrumentation to track the setting and clearing of bits. A couple trivial intel-iommu specific sysfs extensions make it much easier to expose the IOMMU capabilities and current usage. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Dan Williams authored
iommu_load_old_irte() appears to leak the old_irte mapping after use. Cc: Joerg Roedel <jroedel@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Kees Cook authored
This makes sure it won't be possible to accidentally leak format strings into iommu device names. Current name allocations are safe, but this makes the "%s" explicit. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Joerg Roedel <jroedel@suse.de>
-
Linus Torvalds authored
-
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linuxLinus Torvalds authored
Pull powerpc fixes from Michael Ellerman: - TCE table memory calculation fix from Alexey - Build fix for ans-lcd from Luis - Unbalanced IRQ warning fix from Alistair * tag 'powerpc-4.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/eeh-powernv: Fix unbalanced IRQ warning macintosh/ans-lcd: fix build failure after module_init/exit relocation powerpc/powernv/ioda2: Fix calculation for memory allocated for TCE table
-
- 02 Aug, 2015 3 commits
-
-
Linus Torvalds authored
Ted Ts'o reports that his Lenovo T540p ThinkPad crashes at boot if attached to the docking station. This is a regression that he was able to bisect to commit 8c7b5ccb: "drm/i915: Use atomic helpers for computing changed flags:" The reason seems to be the new call to drm_atomic_helper_check_modeset() added to intel_modeset_compute_config(), which in turn calls update_connector_routing(), and somehow ends up picking a NULL crtc for the connector state, causing the subsequent drm_crtc_index() to OOPS. Daniel Vetter says that the fundamental issue seems to be confusion in the encoder selection, and this isn't the right fix, but while he chases down the proper fix, this at least avoids the NULL pointer dereference and makes Ted's docking station work again. Reported-bisected-and-tested-by: Theodore Ts'o <tytso@mit.edu> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Mani Nikula <jani.nikula@linux.intel.com> Cc: Dave Airlie <airlied@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds authored
Pull SCSI fixes from James Bottomley: "A set of three fixes for the ipr driver and one fairly major one for memory leaks in the mq path of SCSI" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: fix memory leak with scsi-mq ipr: Fix invalid array indexing for HRRQ ipr: Fix incorrect trace indexing ipr: Fix locking for unit attention handling
-
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds authored
Pull ARM SoC fixes from Olof Johansson: "Things are calming down nicely here w.r.t. fixes. This batch includes two week's worth since I missed to send before -rc4. Nothing particularly scary to point out, smaller fixes here and there. Shortlog describes it pretty well" * tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: dts: keystone: fix dt bindings to use post div register for mainpll ARM: nomadik: disable UART0 on Nomadik boards ARM: dts: i.MX35: Fix can support. ARM: OMAP2+: hwmod: Fix _wait_target_ready() for hwmods without sysc ARM: dts: add CPU OPP and regulator supply property for exynos4210 ARM: dts: Update video-phy node with syscon phandle for exynos3250 ARM: DRA7: hwmod: fix gpmc hwmod
-