2019-05-29 16:57:35 -07:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-23 15:23:35 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
|
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
2012-06-08 17:13:11 -04:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
2008-09-09 18:37:29 +03:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
2009-09-01 18:25:07 -07:00
|
|
|
|
2009-07-06 23:40:19 -04:00
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
iommu/vt-d: Make use of IOMMU sysfs support
Register our DRHD IOMMUs, cross link devices, and provide a base set
of attributes for the IOMMU. Note that IRQ remapping support parses
the DMAR table very early in boot, well before the iommu_class can
reasonably be setup, so our registration is split between
intel_iommu_init(), which occurs later, and alloc_iommu(), which
typically occurs much earlier, but may happen at any time later
with IOMMU hot-add support.
On a typical desktop system, this provides the following (pruned):
$ find /sys | grep dmar
/sys/devices/virtual/iommu/dmar0
/sys/devices/virtual/iommu/dmar0/devices
/sys/devices/virtual/iommu/dmar0/devices/0000:00:02.0
/sys/devices/virtual/iommu/dmar0/intel-iommu
/sys/devices/virtual/iommu/dmar0/intel-iommu/cap
/sys/devices/virtual/iommu/dmar0/intel-iommu/ecap
/sys/devices/virtual/iommu/dmar0/intel-iommu/address
/sys/devices/virtual/iommu/dmar0/intel-iommu/version
/sys/devices/virtual/iommu/dmar1
/sys/devices/virtual/iommu/dmar1/devices
/sys/devices/virtual/iommu/dmar1/devices/0000:00:00.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:01.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:16.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:1a.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:1b.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:1c.0
...
/sys/devices/virtual/iommu/dmar1/intel-iommu
/sys/devices/virtual/iommu/dmar1/intel-iommu/cap
/sys/devices/virtual/iommu/dmar1/intel-iommu/ecap
/sys/devices/virtual/iommu/dmar1/intel-iommu/address
/sys/devices/virtual/iommu/dmar1/intel-iommu/version
/sys/class/iommu/dmar0
/sys/class/iommu/dmar1
(devices also link back to the dmar units)
This makes address, version, capabilities, and extended capabilities
available, just like printed on boot. I've tried not to duplicate
data that can be found in the DMAR table, with the exception of the
address, which provides an easy way to associate the sysfs device with
a DRHD entry in the DMAR. It's tempting to add scopes and RMRR data
here, but the full DMAR table is already exposed under /sys/firmware/
and therefore already provides a way for userspace to learn such
details.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-06-12 16:12:31 -06:00
|
|
|
|
2019-03-05 15:42:58 -08:00
|
|
|
|
2020-03-12 14:09:55 +08:00
|
|
|
|
2012-03-30 11:47:08 -07:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
2022-07-12 08:08:50 +08:00
|
|
|
|
2020-06-09 15:03:03 +02:00
|
|
|
|
2024-04-13 00:25:12 +00:00
|
|
|
|
2021-06-10 10:01:07 +08:00
|
|
|
|
2022-07-12 08:08:44 +08:00
|
|
|
|
2023-01-31 15:37:35 +08:00
|
|
|
|
2012-09-26 12:44:43 +02:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iommu/vt-d: Introduce a rwsem to protect global data structures
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 happens.
So a global rwsem solution is adopted for balance between simplicity
and performance.
For interrupt remapping driver, function intel_irq_remapping_supported(),
dmar_table_init(), intel_enable_irq_remapping(), disable_irq_remapping(),
reenable_irq_remapping() and enable_drhd_fault_handling() etc
are called during booting, suspending and resuming with interrupt
disabled, so no need to take the global lock.
For interrupt remapping entry allocation, the locking model is:
down_read(&dmar_global_lock);
/* Find corresponding iommu */
iommu = map_hpet_to_ir(id);
if (iommu)
/*
* Allocate remapping entry and mark entry busy,
* the IOMMU won't be hot-removed until the
* allocated entry has been released.
*/
index = alloc_irte(iommu, irq, 1);
up_read(&dmar_global_lock);
For DMA remmaping driver, we only uses the dmar_global_lock rwsem to
protect functions which are only called in process context. For any
function which may be called in interrupt context, we will use RCU
to protect them in following patches.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
2014-02-19 14:07:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
iommu/vt-d: Introduce a rwsem to protect global data structures
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 happens.
So a global rwsem solution is adopted for balance between simplicity
and performance.
For interrupt remapping driver, function intel_irq_remapping_supported(),
dmar_table_init(), intel_enable_irq_remapping(), disable_irq_remapping(),
reenable_irq_remapping() and enable_drhd_fault_handling() etc
are called during booting, suspending and resuming with interrupt
disabled, so no need to take the global lock.
For interrupt remapping entry allocation, the locking model is:
down_read(&dmar_global_lock);
/* Find corresponding iommu */
iommu = map_hpet_to_ir(id);
if (iommu)
/*
* Allocate remapping entry and mark entry busy,
* the IOMMU won't be hot-removed until the
* allocated entry has been released.
*/
index = alloc_irte(iommu, irq, 1);
up_read(&dmar_global_lock);
For DMA remmaping driver, we only uses the dmar_global_lock rwsem to
protect functions which are only called in process context. For any
function which may be called in interrupt context, we will use RCU
to protect them in following patches.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
2014-02-19 14:07:33 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
2011-08-23 17:05:18 -07:00
|
|
|
|
2014-02-19 14:07:36 +08:00
|
|
|
|
2022-07-12 08:09:04 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
2014-01-06 14:18:16 +08:00
|
|
|
|
2014-01-06 14:18:20 +08:00
|
|
|
|
2014-01-06 14:18:16 +08:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:34 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
2014-02-19 14:07:34 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:24 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-30 12:21:00 +08:00
|
|
|
|
2014-03-07 14:39:27 +00:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
2013-04-23 12:26:45 -06:00
|
|
|
|
|
|
|
|
|
2012-06-08 17:13:11 -04:00
|
|
|
|
2010-04-08 19:58:22 +01:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:24 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2014-02-19 14:07:24 +08:00
|
|
|
|
|
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
2014-01-06 14:18:09 +08:00
|
|
|
|
2014-02-19 14:07:32 +08:00
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
2014-02-19 14:07:32 +08:00
|
|
|
|
2014-01-06 14:18:09 +08:00
|
|
|
|
2014-02-19 14:07:32 +08:00
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
2014-01-06 14:18:09 +08:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-06 14:18:09 +08:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-12 14:09:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-18 13:46:24 -05:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:36 +08:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-15 10:35:35 +08:00
|
|
|
|
|
|
|
|
|
2014-10-02 11:50:25 +02:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-22 16:30:22 +02:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
2014-09-22 16:30:22 +02:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-22 16:30:22 +02:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-22 16:30:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-02 17:46:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-15 11:03:55 +08:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
2023-04-13 12:06:45 +08:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
2014-08-18 15:20:56 +03:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-16 16:23:54 +02:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:36 +08:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
2020-08-26 13:16:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-12 20:14:16 +01:00
|
|
|
|
|
|
|
|
|
2020-11-19 13:51:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-12 20:14:16 +01:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-10-21 15:32:05 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-12 20:14:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
2020-11-12 20:14:16 +01:00
|
|
|
|
|
|
|
|
|
2016-02-29 23:49:47 +01:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-29 23:49:47 +01:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-20 17:21:15 -07:00
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-05 15:15:02 -05:00
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-28 19:08:58 +02:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-16 16:23:53 +02:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
2009-04-10 22:27:48 -07:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
2009-04-04 01:45:37 +01:00
|
|
|
|
2023-01-31 15:37:34 +08:00
|
|
|
|
|
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
2014-03-07 14:39:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:36 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
2008-07-10 11:16:37 -07:00
|
|
|
|
|
|
|
|
|
2014-03-07 14:39:27 +00:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:37 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:37 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-06 14:18:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
2014-03-07 14:34:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-30 12:21:00 +08:00
|
|
|
|
iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint
Quoting from the comment describing the WARN functions in
include/asm-generic/bug.h:
* WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report
* significant kernel issues that need prompt attention if they should ever
* appear at runtime.
*
* Do not use these macros when checking for invalid external inputs
The (buggy) firmware tables which the dmar code was calling WARN_TAINT
for really are invalid external inputs. They are not under the kernel's
control and the issues in them cannot be fixed by a kernel update.
So logging a backtrace, which invites bug reports to be filed about this,
is not helpful.
Some distros, e.g. Fedora, have tools watching for the kernel backtraces
logged by the WARN macros and offer the user an option to file a bug for
this when these are encountered. The WARN_TAINT in warn_invalid_dmar()
+ another iommu WARN_TAINT, addressed in another patch, have lead to over
a 100 bugs being filed this way.
This commit replaces the WARN_TAINT("...") calls, with
pr_warn(FW_BUG "...") + add_taint(TAINT_FIRMWARE_WORKAROUND, ...) calls
avoiding the backtrace and thus also avoiding bug-reports being filed
about this against the kernel.
Fixes: fd0c8894893c ("intel-iommu: Set a more specific taint flag for invalid BIOS DMAR tables")
Fixes: e625b4a95d50 ("iommu/vt-d: Parse ANDD records")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200309140138.3753-2-hdegoede@redhat.com
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1564895
2020-03-09 15:01:37 +01:00
|
|
|
|
2014-03-07 14:34:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint
Quoting from the comment describing the WARN functions in
include/asm-generic/bug.h:
* WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report
* significant kernel issues that need prompt attention if they should ever
* appear at runtime.
*
* Do not use these macros when checking for invalid external inputs
The (buggy) firmware tables which the dmar code was calling WARN_TAINT
for really are invalid external inputs. They are not under the kernel's
control and the issues in them cannot be fixed by a kernel update.
So logging a backtrace, which invites bug reports to be filed about this,
is not helpful.
Some distros, e.g. Fedora, have tools watching for the kernel backtraces
logged by the WARN macros and offer the user an option to file a bug for
this when these are encountered. The WARN_TAINT in warn_invalid_dmar()
+ another iommu WARN_TAINT, addressed in another patch, have lead to over
a 100 bugs being filed this way.
This commit replaces the WARN_TAINT("...") calls, with
pr_warn(FW_BUG "...") + add_taint(TAINT_FIRMWARE_WORKAROUND, ...) calls
avoiding the backtrace and thus also avoiding bug-reports being filed
about this against the kernel.
Fixes: fd0c8894893c ("intel-iommu: Set a more specific taint flag for invalid BIOS DMAR tables")
Fixes: e625b4a95d50 ("iommu/vt-d: Parse ANDD records")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200309140138.3753-2-hdegoede@redhat.com
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1564895
2020-03-09 15:01:37 +01:00
|
|
|
|
2014-03-07 14:34:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-30 12:21:00 +08:00
|
|
|
|
2014-03-07 14:34:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-07 12:18:00 +01:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
2009-10-02 11:01:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-07 12:18:00 +01:00
|
|
|
|
2009-10-02 11:01:21 -07:00
|
|
|
|
ACPI: Do not create new NUMA domains from ACPI static tables that are not SRAT
Several ACPI static tables contain references to proximity domains.
ACPI 6.3 has clarified that only entries in SRAT may define a new
domain (sec 5.2.16).
Those tables described in the ACPI spec have additional clarifying text.
NFIT: Table 5-132,
"Integer that represents the proximity domain to which the memory
belongs. This number must match with corresponding entry in the
SRAT table."
HMAT: Table 5-145,
"... This number must match with the corresponding entry in the SRAT
table's processor affinity structure ... if the initiator is a processor,
or the Generic Initiator Affinity Structure if the initiator is a generic
initiator".
IORT and DMAR are defined by external specifications.
Intel Virtualization Technology for Directed I/O Rev 3.1 does not make any
explicit statements, but the general SRAT statement above will still apply.
https://software.intel.com/sites/default/files/managed/c5/15/vt-directed-io-spec.pdf
IO Remapping Table, Platform Design Document rev D, also makes not explicit
statement, but refers to ACPI SRAT table for more information and again the
generic SRAT statement above applies.
https://developer.arm.com/documentation/den0049/d/
In conclusion, any proximity domain specified in these tables, should be a
reference to a proximity domain also found in SRAT, and they should not be
able to instantiate a new domain. Hence we switch to pxm_to_node() which
will only return existing nodes.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Barry Song <song.bao.hua@hisilicon.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-08-18 22:24:26 +08:00
|
|
|
|
2009-10-02 11:01:21 -07:00
|
|
|
|
2022-07-12 17:38:36 +02:00
|
|
|
|
2019-03-05 15:42:58 -08:00
|
|
|
|
2009-10-02 11:01:21 -07:00
|
|
|
|
2009-10-07 12:18:00 +01:00
|
|
|
|
|
|
|
|
|
2009-10-02 11:01:21 -07:00
|
|
|
|
iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint
Quoting from the comment describing the WARN functions in
include/asm-generic/bug.h:
* WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report
* significant kernel issues that need prompt attention if they should ever
* appear at runtime.
*
* Do not use these macros when checking for invalid external inputs
The (buggy) firmware tables which the dmar code was calling WARN_TAINT
for really are invalid external inputs. They are not under the kernel's
control and the issues in them cannot be fixed by a kernel update.
So logging a backtrace, which invites bug reports to be filed about this,
is not helpful.
Some distros, e.g. Fedora, have tools watching for the kernel backtraces
logged by the WARN macros and offer the user an option to file a bug for
this when these are encountered. The WARN_TAINT in warn_invalid_dmar()
+ another iommu WARN_TAINT, addressed in another patch, have lead to over
a 100 bugs being filed this way.
This commit replaces the WARN_TAINT("...") calls, with
pr_warn(FW_BUG "...") + add_taint(TAINT_FIRMWARE_WORKAROUND, ...) calls
avoiding the backtrace and thus also avoiding bug-reports being filed
about this against the kernel.
Fixes: fd0c8894893c ("intel-iommu: Set a more specific taint flag for invalid BIOS DMAR tables")
Fixes: e625b4a95d50 ("iommu/vt-d: Parse ANDD records")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200309140138.3753-2-hdegoede@redhat.com
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1564895
2020-03-09 15:01:37 +01:00
|
|
|
|
2010-04-03 19:38:43 +01:00
|
|
|
|
|
|
|
|
|
2020-03-12 14:09:54 +08:00
|
|
|
|
2010-04-03 19:38:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint
Quoting from the comment describing the WARN functions in
include/asm-generic/bug.h:
* WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report
* significant kernel issues that need prompt attention if they should ever
* appear at runtime.
*
* Do not use these macros when checking for invalid external inputs
The (buggy) firmware tables which the dmar code was calling WARN_TAINT
for really are invalid external inputs. They are not under the kernel's
control and the issues in them cannot be fixed by a kernel update.
So logging a backtrace, which invites bug reports to be filed about this,
is not helpful.
Some distros, e.g. Fedora, have tools watching for the kernel backtraces
logged by the WARN macros and offer the user an option to file a bug for
this when these are encountered. The WARN_TAINT in warn_invalid_dmar()
+ another iommu WARN_TAINT, addressed in another patch, have lead to over
a 100 bugs being filed this way.
This commit replaces the WARN_TAINT("...") calls, with
pr_warn(FW_BUG "...") + add_taint(TAINT_FIRMWARE_WORKAROUND, ...) calls
avoiding the backtrace and thus also avoiding bug-reports being filed
about this against the kernel.
Fixes: fd0c8894893c ("intel-iommu: Set a more specific taint flag for invalid BIOS DMAR tables")
Fixes: e625b4a95d50 ("iommu/vt-d: Parse ANDD records")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200309140138.3753-2-hdegoede@redhat.com
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1564895
2020-03-09 15:01:37 +01:00
|
|
|
|
2009-10-02 11:01:21 -07:00
|
|
|
|
2009-10-07 12:18:00 +01:00
|
|
|
|
2009-10-02 11:01:21 -07:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
2009-10-07 12:18:00 +01:00
|
|
|
|
2009-10-02 11:01:21 -07:00
|
|
|
|
2017-09-12 22:10:21 +02:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-18 13:51:34 +08:00
|
|
|
|
2009-09-24 12:14:00 -07:00
|
|
|
|
2021-02-04 09:44:00 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-18 13:51:34 +08:00
|
|
|
|
|
|
|
|
|
2012-06-08 17:13:11 -04:00
|
|
|
|
2009-05-18 13:51:34 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
2009-05-18 13:51:34 +08:00
|
|
|
|
|
|
|
|
|
2012-06-08 17:13:11 -04:00
|
|
|
|
2008-10-16 18:02:32 -07:00
|
|
|
|
|
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
2014-07-30 12:21:00 +08:00
|
|
|
|
2009-05-18 13:51:34 +08:00
|
|
|
|
2012-06-08 17:13:11 -04:00
|
|
|
|
2009-05-18 13:51:34 +08:00
|
|
|
|
2014-07-30 12:21:00 +08:00
|
|
|
|
2009-09-24 12:14:00 -07:00
|
|
|
|
2012-06-08 17:13:11 -04:00
|
|
|
|
2009-09-24 12:14:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-30 12:21:00 +08:00
|
|
|
|
2014-03-07 14:34:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-04 09:44:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-09-03 16:58:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-12-14 15:04:39 +08:00
|
|
|
|
2008-09-03 16:58:32 -07:00
|
|
|
|
|
|
|
|
|
2012-06-08 17:13:11 -04:00
|
|
|
|
2008-09-03 16:58:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-16 16:23:51 +02:00
|
|
|
|
2008-09-03 16:58:32 -07:00
|
|
|
|
2008-07-10 11:16:38 -07:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-16 16:23:52 +02:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
2017-03-16 16:23:52 +02:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-16 16:23:52 +02:00
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
2017-03-16 16:23:52 +02:00
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-16 16:23:52 +02:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-16 16:23:52 +02:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-20 15:57:32 +08:00
|
|
|
|
2017-03-16 16:23:53 +02:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-04 09:44:00 +08:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
2008-09-03 16:58:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-30 19:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-16 18:02:32 -07:00
|
|
|
|
2012-06-08 17:13:11 -04:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-08 17:13:11 -04:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
2013-05-20 15:57:32 +08:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
|
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:32 +08:00
|
|
|
|
2014-03-07 15:08:36 +00:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:34 +08:00
|
|
|
|
2008-12-22 16:54:58 +08:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2010-04-09 01:07:55 +01:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:34 +08:00
|
|
|
|
2013-10-31 17:25:16 +08:00
|
|
|
|
2008-12-22 16:54:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:34 +08:00
|
|
|
|
2008-12-22 16:54:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:34 +08:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2014-02-19 14:07:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2014-02-19 14:07:34 +08:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
|
|
|
|
|
2014-03-07 23:15:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-30 12:21:00 +08:00
|
|
|
|
2014-03-07 23:15:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-25 20:16:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-01 14:58:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-30 12:21:00 +08:00
|
|
|
|
2014-03-07 23:15:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-30 12:21:00 +08:00
|
|
|
|
2014-03-07 23:15:42 +00:00
|
|
|
|
|
|
|
|
|
2014-07-30 12:21:00 +08:00
|
|
|
|
2014-03-07 23:15:42 +00:00
|
|
|
|
|
|
|
|
|
2022-02-01 19:11:40 +01:00
|
|
|
|
|
|
|
|
|
2014-03-07 23:15:42 +00:00
|
|
|
|
2014-07-30 12:21:00 +08:00
|
|
|
|
2014-03-07 23:15:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:37 -07:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:36 +08:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:37 -07:00
|
|
|
|
2014-02-19 14:07:36 +08:00
|
|
|
|
|
|
|
|
|
2011-08-23 17:05:19 -07:00
|
|
|
|
2014-02-19 14:07:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-23 17:05:20 -07:00
|
|
|
|
2014-03-28 11:28:40 +00:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-01 12:01:27 +08:00
|
|
|
|
2014-02-19 14:07:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:37 -07:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:36 +08:00
|
|
|
|
2008-07-10 11:16:37 -07:00
|
|
|
|
|
|
|
|
|
2018-02-12 16:48:20 +00:00
|
|
|
|
2017-10-06 15:00:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:37 -07:00
|
|
|
|
2007-11-21 15:07:14 -08:00
|
|
|
|
|
|
|
|
|
2014-01-06 14:18:24 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
2014-01-06 14:18:24 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:37 -07:00
|
|
|
|
2014-01-06 14:18:24 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-21 15:07:14 -08:00
|
|
|
|
|
|
|
|
|
2014-01-06 14:18:24 +08:00
|
|
|
|
2007-10-21 16:41:41 -07:00
|
|
|
|
|
|
|
|
|
2010-04-03 19:37:23 +01:00
|
|
|
|
|
|
|
|
|
iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint
Quoting from the comment describing the WARN functions in
include/asm-generic/bug.h:
* WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report
* significant kernel issues that need prompt attention if they should ever
* appear at runtime.
*
* Do not use these macros when checking for invalid external inputs
The (buggy) firmware tables which the dmar code was calling WARN_TAINT
for really are invalid external inputs. They are not under the kernel's
control and the issues in them cannot be fixed by a kernel update.
So logging a backtrace, which invites bug reports to be filed about this,
is not helpful.
Some distros, e.g. Fedora, have tools watching for the kernel backtraces
logged by the WARN macros and offer the user an option to file a bug for
this when these are encountered. The WARN_TAINT in warn_invalid_dmar()
+ another iommu WARN_TAINT, addressed in another patch, have lead to over
a 100 bugs being filed this way.
This commit replaces the WARN_TAINT("...") calls, with
pr_warn(FW_BUG "...") + add_taint(TAINT_FIRMWARE_WORKAROUND, ...) calls
avoiding the backtrace and thus also avoiding bug-reports being filed
about this against the kernel.
Fixes: fd0c8894893c ("intel-iommu: Set a more specific taint flag for invalid BIOS DMAR tables")
Fixes: e625b4a95d50 ("iommu/vt-d: Parse ANDD records")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200309140138.3753-2-hdegoede@redhat.com
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1564895
2020-03-09 15:01:37 +01:00
|
|
|
|
2010-04-03 19:38:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint
Quoting from the comment describing the WARN functions in
include/asm-generic/bug.h:
* WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report
* significant kernel issues that need prompt attention if they should ever
* appear at runtime.
*
* Do not use these macros when checking for invalid external inputs
The (buggy) firmware tables which the dmar code was calling WARN_TAINT
for really are invalid external inputs. They are not under the kernel's
control and the issues in them cannot be fixed by a kernel update.
So logging a backtrace, which invites bug reports to be filed about this,
is not helpful.
Some distros, e.g. Fedora, have tools watching for the kernel backtraces
logged by the WARN macros and offer the user an option to file a bug for
this when these are encountered. The WARN_TAINT in warn_invalid_dmar()
+ another iommu WARN_TAINT, addressed in another patch, have lead to over
a 100 bugs being filed this way.
This commit replaces the WARN_TAINT("...") calls, with
pr_warn(FW_BUG "...") + add_taint(TAINT_FIRMWARE_WORKAROUND, ...) calls
avoiding the backtrace and thus also avoiding bug-reports being filed
about this against the kernel.
Fixes: fd0c8894893c ("intel-iommu: Set a more specific taint flag for invalid BIOS DMAR tables")
Fixes: e625b4a95d50 ("iommu/vt-d: Parse ANDD records")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200309140138.3753-2-hdegoede@redhat.com
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1564895
2020-03-09 15:01:37 +01:00
|
|
|
|
2010-04-03 19:37:23 +01:00
|
|
|
|
2009-12-02 09:20:27 +00:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
2009-11-09 22:15:15 +00:00
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
2009-11-09 22:15:15 +00:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-09 22:15:15 +00:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
2026-04-02 14:57:28 +08:00
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-09 22:15:15 +00:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-09 22:15:15 +00:00
|
|
|
|
2009-12-02 09:17:13 +00:00
|
|
|
|
|
|
|
|
|
2009-11-09 22:15:15 +00:00
|
|
|
|
|
|
|
|
|
2022-02-14 14:11:44 +01:00
|
|
|
|
2008-07-10 11:16:43 -07:00
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:43 -07:00
|
|
|
|
iommu/vt-d: Introduce a rwsem to protect global data structures
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 happens.
So a global rwsem solution is adopted for balance between simplicity
and performance.
For interrupt remapping driver, function intel_irq_remapping_supported(),
dmar_table_init(), intel_enable_irq_remapping(), disable_irq_remapping(),
reenable_irq_remapping() and enable_drhd_fault_handling() etc
are called during booting, suspending and resuming with interrupt
disabled, so no need to take the global lock.
For interrupt remapping entry allocation, the locking model is:
down_read(&dmar_global_lock);
/* Find corresponding iommu */
iommu = map_hpet_to_ir(id);
if (iommu)
/*
* Allocate remapping entry and mark entry busy,
* the IOMMU won't be hot-removed until the
* allocated entry has been released.
*/
index = alloc_irte(iommu, irq, 1);
up_read(&dmar_global_lock);
For DMA remmaping driver, we only uses the dmar_global_lock rwsem to
protect functions which are only called in process context. For any
function which may be called in interrupt context, we will use RCU
to protect them in following patches.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
2014-02-19 14:07:33 +08:00
|
|
|
|
2008-09-03 16:58:32 -07:00
|
|
|
|
2017-03-16 16:23:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-23 07:13:43 +08:00
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-23 17:05:22 -07:00
|
|
|
|
2019-11-10 09:27:44 -08:00
|
|
|
|
2014-11-09 22:47:56 +08:00
|
|
|
|
2019-11-10 09:27:44 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-05 02:13:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iommu/vt-d: Introduce a rwsem to protect global data structures
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 happens.
So a global rwsem solution is adopted for balance between simplicity
and performance.
For interrupt remapping driver, function intel_irq_remapping_supported(),
dmar_table_init(), intel_enable_irq_remapping(), disable_irq_remapping(),
reenable_irq_remapping() and enable_drhd_fault_handling() etc
are called during booting, suspending and resuming with interrupt
disabled, so no need to take the global lock.
For interrupt remapping entry allocation, the locking model is:
down_read(&dmar_global_lock);
/* Find corresponding iommu */
iommu = map_hpet_to_ir(id);
if (iommu)
/*
* Allocate remapping entry and mark entry busy,
* the IOMMU won't be hot-removed until the
* allocated entry has been released.
*/
index = alloc_irte(iommu, irq, 1);
up_read(&dmar_global_lock);
For DMA remmaping driver, we only uses the dmar_global_lock rwsem to
protect functions which are only called in process context. For any
function which may be called in interrupt context, we will use RCU
to protect them in following patches.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
2014-02-19 14:07:33 +08:00
|
|
|
|
2008-07-10 11:16:43 -07:00
|
|
|
|
|
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-31 15:37:34 +08:00
|
|
|
|
2012-06-08 17:13:11 -04:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
2012-06-08 17:13:11 -04:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
2023-01-31 15:37:34 +08:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
2023-01-31 15:37:34 +08:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-31 15:37:34 +08:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
|
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-02 14:57:28 +08:00
|
|
|
|
|
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-31 15:37:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-02 14:57:28 +08:00
|
|
|
|
|
|
|
|
|
2023-01-31 15:37:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-06 14:18:16 +08:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2008-07-10 11:16:36 -07:00
|
|
|
|
2013-04-23 17:35:03 +09:00
|
|
|
|
2020-09-24 15:08:42 +01:00
|
|
|
|
|
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
2008-07-10 11:16:36 -07:00
|
|
|
|
2009-12-02 09:20:27 +00:00
|
|
|
|
2010-04-03 19:37:23 +01:00
|
|
|
|
2009-12-02 09:20:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2008-07-10 11:16:36 -07:00
|
|
|
|
2008-07-10 11:16:37 -07:00
|
|
|
|
2008-07-10 11:16:36 -07:00
|
|
|
|
2022-07-12 08:09:04 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
2022-07-12 08:09:04 +08:00
|
|
|
|
2014-11-09 22:47:57 +08:00
|
|
|
|
|
|
|
|
|
2024-11-04 09:40:29 +08:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2023-01-31 15:37:34 +08:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
2014-11-09 22:47:57 +08:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2009-08-04 09:17:20 +01:00
|
|
|
|
2023-03-29 21:47:20 +08:00
|
|
|
|
|
|
|
|
|
2020-09-24 15:08:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-24 17:30:20 -07:00
|
|
|
|
2020-09-24 15:08:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-12-08 15:34:06 +08:00
|
|
|
|
|
|
|
|
|
2009-04-24 17:30:20 -07:00
|
|
|
|
2014-03-09 13:49:45 -07:00
|
|
|
|
2024-02-27 10:14:40 +08:00
|
|
|
|
|
|
|
|
|
2024-02-27 10:14:41 +08:00
|
|
|
|
2019-03-05 15:42:58 -08:00
|
|
|
|
2025-05-13 11:07:36 +08:00
|
|
|
|
|
|
|
|
|
2025-05-13 11:07:37 +08:00
|
|
|
|
2009-10-02 11:01:21 -07:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
|
|
|
|
|
2008-10-16 18:02:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2013-04-23 17:35:03 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-31 15:37:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2022-10-31 08:59:05 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-24 15:08:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-01 16:56:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-07 12:16:51 +01:00
|
|
|
|
iommu/vt-d: Make use of IOMMU sysfs support
Register our DRHD IOMMUs, cross link devices, and provide a base set
of attributes for the IOMMU. Note that IRQ remapping support parses
the DMAR table very early in boot, well before the iommu_class can
reasonably be setup, so our registration is split between
intel_iommu_init(), which occurs later, and alloc_iommu(), which
typically occurs much earlier, but may happen at any time later
with IOMMU hot-add support.
On a typical desktop system, this provides the following (pruned):
$ find /sys | grep dmar
/sys/devices/virtual/iommu/dmar0
/sys/devices/virtual/iommu/dmar0/devices
/sys/devices/virtual/iommu/dmar0/devices/0000:00:02.0
/sys/devices/virtual/iommu/dmar0/intel-iommu
/sys/devices/virtual/iommu/dmar0/intel-iommu/cap
/sys/devices/virtual/iommu/dmar0/intel-iommu/ecap
/sys/devices/virtual/iommu/dmar0/intel-iommu/address
/sys/devices/virtual/iommu/dmar0/intel-iommu/version
/sys/devices/virtual/iommu/dmar1
/sys/devices/virtual/iommu/dmar1/devices
/sys/devices/virtual/iommu/dmar1/devices/0000:00:00.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:01.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:16.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:1a.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:1b.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:1c.0
...
/sys/devices/virtual/iommu/dmar1/intel-iommu
/sys/devices/virtual/iommu/dmar1/intel-iommu/cap
/sys/devices/virtual/iommu/dmar1/intel-iommu/ecap
/sys/devices/virtual/iommu/dmar1/intel-iommu/address
/sys/devices/virtual/iommu/dmar1/intel-iommu/version
/sys/class/iommu/dmar0
/sys/class/iommu/dmar1
(devices also link back to the dmar units)
This makes address, version, capabilities, and extended capabilities
available, just like printed on boot. I've tried not to duplicate
data that can be found in the DMAR table, with the exception of the
address, which provides an easy way to associate the sysfs device with
a DRHD entry in the DMAR. It's tempting to add scopes and RMRR data
here, but the full DMAR table is already exposed under /sys/firmware/
and therefore already provides a way for userspace to learn such
details.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-06-12 16:12:31 -06:00
|
|
|
|
2021-04-01 14:56:26 +01:00
|
|
|
|
2017-02-01 13:23:08 +01:00
|
|
|
|
2021-05-25 15:08:02 +08:00
|
|
|
|
2023-01-31 15:37:40 +08:00
|
|
|
|
|
|
|
|
|
2016-01-04 18:27:57 -05:00
|
|
|
|
|
|
|
|
|
2016-01-07 12:16:51 +01:00
|
|
|
|
2020-07-23 09:34:37 +08:00
|
|
|
|
2016-01-07 12:16:51 +01:00
|
|
|
|
2008-07-10 11:16:37 -07:00
|
|
|
|
2009-08-04 09:17:20 +01:00
|
|
|
|
2021-05-25 15:08:02 +08:00
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:57 +08:00
|
|
|
|
2023-01-31 15:37:35 +08:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
2014-11-09 22:47:57 +08:00
|
|
|
|
2022-07-12 08:09:04 +08:00
|
|
|
|
2014-11-09 22:47:57 +08:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
|
|
|
|
|
2014-01-06 14:18:20 +08:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2020-10-13 09:30:55 +02:00
|
|
|
|
2023-01-31 15:37:40 +08:00
|
|
|
|
2017-02-15 16:42:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iommu/vt-d: Make use of IOMMU sysfs support
Register our DRHD IOMMUs, cross link devices, and provide a base set
of attributes for the IOMMU. Note that IRQ remapping support parses
the DMAR table very early in boot, well before the iommu_class can
reasonably be setup, so our registration is split between
intel_iommu_init(), which occurs later, and alloc_iommu(), which
typically occurs much earlier, but may happen at any time later
with IOMMU hot-add support.
On a typical desktop system, this provides the following (pruned):
$ find /sys | grep dmar
/sys/devices/virtual/iommu/dmar0
/sys/devices/virtual/iommu/dmar0/devices
/sys/devices/virtual/iommu/dmar0/devices/0000:00:02.0
/sys/devices/virtual/iommu/dmar0/intel-iommu
/sys/devices/virtual/iommu/dmar0/intel-iommu/cap
/sys/devices/virtual/iommu/dmar0/intel-iommu/ecap
/sys/devices/virtual/iommu/dmar0/intel-iommu/address
/sys/devices/virtual/iommu/dmar0/intel-iommu/version
/sys/devices/virtual/iommu/dmar1
/sys/devices/virtual/iommu/dmar1/devices
/sys/devices/virtual/iommu/dmar1/devices/0000:00:00.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:01.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:16.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:1a.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:1b.0
/sys/devices/virtual/iommu/dmar1/devices/0000:00:1c.0
...
/sys/devices/virtual/iommu/dmar1/intel-iommu
/sys/devices/virtual/iommu/dmar1/intel-iommu/cap
/sys/devices/virtual/iommu/dmar1/intel-iommu/ecap
/sys/devices/virtual/iommu/dmar1/intel-iommu/address
/sys/devices/virtual/iommu/dmar1/intel-iommu/version
/sys/class/iommu/dmar0
/sys/class/iommu/dmar1
(devices also link back to the dmar units)
This makes address, version, capabilities, and extended capabilities
available, just like printed on boot. I've tried not to duplicate
data that can be found in the DMAR table, with the exception of the
address, which provides an easy way to associate the sysfs device with
a DRHD entry in the DMAR. It's tempting to add scopes and RMRR data
here, but the full DMAR table is already exposed under /sys/firmware/
and therefore already provides a way for userspace to learn such
details.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2014-06-12 16:12:31 -06:00
|
|
|
|
2023-01-31 15:37:35 +08:00
|
|
|
|
|
|
|
|
|
2014-01-06 14:18:20 +08:00
|
|
|
|
2015-10-07 15:37:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-06 14:18:20 +08:00
|
|
|
|
2014-05-07 15:44:11 +00:00
|
|
|
|
2015-04-13 14:11:41 +08:00
|
|
|
|
2014-01-06 14:18:20 +08:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2014-01-06 14:18:23 +08:00
|
|
|
|
2025-04-08 13:53:54 -03:00
|
|
|
|
2014-01-06 14:18:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
2012-06-04 17:29:02 -04:00
|
|
|
|
|
|
|
|
|
2025-05-13 11:07:36 +08:00
|
|
|
|
2022-07-12 08:09:04 +08:00
|
|
|
|
2008-07-10 11:16:35 -07:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iommu/vt-d: Fix potential lockup if qi_submit_sync called with 0 count
If qi_submit_sync() is invoked with 0 invalidation descriptors (for
instance, for DMA draining purposes), we can run into a bug where a
submitting thread fails to detect the completion of invalidation_wait.
Subsequently, this led to a soft lockup. Currently, there is no impact
by this bug on the existing users because no callers are submitting
invalidations with 0 descriptors. This fix will enable future users
(such as DMA drain) calling qi_submit_sync() with 0 count.
Suppose thread T1 invokes qi_submit_sync() with non-zero descriptors, while
concurrently, thread T2 calls qi_submit_sync() with zero descriptors. Both
threads then enter a while loop, waiting for their respective descriptors
to complete. T1 detects its completion (i.e., T1's invalidation_wait status
changes to QI_DONE by HW) and proceeds to call reclaim_free_desc() to
reclaim all descriptors, potentially including adjacent ones of other
threads that are also marked as QI_DONE.
During this time, while T2 is waiting to acquire the qi->q_lock, the IOMMU
hardware may complete the invalidation for T2, setting its status to
QI_DONE. However, if T1's execution of reclaim_free_desc() frees T2's
invalidation_wait descriptor and changes its status to QI_FREE, T2 will
not observe the QI_DONE status for its invalidation_wait and will
indefinitely remain stuck.
This soft lockup does not occur when only non-zero descriptors are
submitted.In such cases, invalidation descriptors are interspersed among
wait descriptors with the status QI_IN_USE, acting as barriers. These
barriers prevent the reclaim code from mistakenly freeing descriptors
belonging to other submitters.
Considered the following example timeline:
T1 T2
========================================
ID1
WD1
while(WD1!=QI_DONE)
unlock
lock
WD1=QI_DONE* WD2
while(WD2!=QI_DONE)
unlock
lock
WD1==QI_DONE?
ID1=QI_DONE WD2=DONE*
reclaim()
ID1=FREE
WD1=FREE
WD2=FREE
unlock
soft lockup! T2 never sees QI_DONE in WD2
Where:
ID = invalidation descriptor
WD = wait descriptor
* Written by hardware
The root of the problem is that the descriptor status QI_DONE flag is used
for two conflicting purposes:
1. signal a descriptor is ready for reclaim (to be freed)
2. signal by the hardware that a wait descriptor is complete
The solution (in this patch) is state separation by using QI_FREE flag
for #1.
Once a thread's invalidation descriptors are complete, their status would
be set to QI_FREE. The reclaim_free_desc() function would then only
free descriptors marked as QI_FREE instead of those marked as
QI_DONE. This change ensures that T2 (from the previous example) will
correctly observe the completion of its invalidation_wait (marked as
QI_DONE).
Signed-off-by: Sanjay K Kumar <sanjay.k.kumar@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20240728210059.1964602-1-jacob.jun.pan@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2024-09-02 10:27:18 +08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-18 08:53:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-02 14:57:28 +08:00
|
|
|
|
|
|
|
|
|
2021-03-18 08:53:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
|
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
2024-03-05 20:21:16 +08:00
|
|
|
|
|
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
2021-03-18 08:53:40 +08:00
|
|
|
|
|
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
2021-03-18 08:53:40 +08:00
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
2024-03-05 20:21:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-02 14:57:28 +08:00
|
|
|
|
2024-03-05 20:21:16 +08:00
|
|
|
|
|
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
2021-03-18 08:53:40 +08:00
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-16 15:16:39 +08:00
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
|
|
|
|
|
2024-03-05 20:21:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-18 08:53:40 +08:00
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
2021-03-18 08:53:40 +08:00
|
|
|
|
|
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
2021-06-10 10:01:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
|
|
|
|
|
2021-06-10 10:01:07 +08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2021-06-10 10:01:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-19 17:02:07 +02:00
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-19 17:02:07 +02:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2011-07-19 17:02:07 +02:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-14 17:04:00 +08:00
|
|
|
|
|
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
|
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2024-07-02 21:08:33 +08:00
|
|
|
|
2008-10-16 16:31:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
2011-07-19 17:02:07 +02:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2011-07-19 17:02:07 +02:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
iommu/vt-d: Fix potential lockup if qi_submit_sync called with 0 count
If qi_submit_sync() is invoked with 0 invalidation descriptors (for
instance, for DMA draining purposes), we can run into a bug where a
submitting thread fails to detect the completion of invalidation_wait.
Subsequently, this led to a soft lockup. Currently, there is no impact
by this bug on the existing users because no callers are submitting
invalidations with 0 descriptors. This fix will enable future users
(such as DMA drain) calling qi_submit_sync() with 0 count.
Suppose thread T1 invokes qi_submit_sync() with non-zero descriptors, while
concurrently, thread T2 calls qi_submit_sync() with zero descriptors. Both
threads then enter a while loop, waiting for their respective descriptors
to complete. T1 detects its completion (i.e., T1's invalidation_wait status
changes to QI_DONE by HW) and proceeds to call reclaim_free_desc() to
reclaim all descriptors, potentially including adjacent ones of other
threads that are also marked as QI_DONE.
During this time, while T2 is waiting to acquire the qi->q_lock, the IOMMU
hardware may complete the invalidation for T2, setting its status to
QI_DONE. However, if T1's execution of reclaim_free_desc() frees T2's
invalidation_wait descriptor and changes its status to QI_FREE, T2 will
not observe the QI_DONE status for its invalidation_wait and will
indefinitely remain stuck.
This soft lockup does not occur when only non-zero descriptors are
submitted.In such cases, invalidation descriptors are interspersed among
wait descriptors with the status QI_IN_USE, acting as barriers. These
barriers prevent the reclaim code from mistakenly freeing descriptors
belonging to other submitters.
Considered the following example timeline:
T1 T2
========================================
ID1
WD1
while(WD1!=QI_DONE)
unlock
lock
WD1=QI_DONE* WD2
while(WD2!=QI_DONE)
unlock
lock
WD1==QI_DONE?
ID1=QI_DONE WD2=DONE*
reclaim()
ID1=FREE
WD1=FREE
WD2=FREE
unlock
soft lockup! T2 never sees QI_DONE in WD2
Where:
ID = invalidation descriptor
WD = wait descriptor
* Written by hardware
The root of the problem is that the descriptor status QI_DONE flag is used
for two conflicting purposes:
1. signal a descriptor is ready for reclaim (to be freed)
2. signal by the hardware that a wait descriptor is complete
The solution (in this patch) is state separation by using QI_FREE flag
for #1.
Once a thread's invalidation descriptors are complete, their status would
be set to QI_FREE. The reclaim_free_desc() function would then only
free descriptors marked as QI_FREE instead of those marked as
QI_DONE. This change ensures that T2 (from the previous example) will
correctly observe the completion of its invalidation_wait (marked as
QI_DONE).
Signed-off-by: Sanjay K Kumar <sanjay.k.kumar@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20240728210059.1964602-1-jacob.jun.pan@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2024-09-02 10:27:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
2011-07-19 17:02:07 +02:00
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-10 10:01:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2009-01-04 16:28:52 +08:00
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
2009-05-10 17:16:06 +01:00
|
|
|
|
|
|
|
|
|
2008-10-16 16:31:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
2008-10-16 16:31:55 -07:00
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-16 16:31:55 -07:00
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
2008-10-16 16:31:55 -07:00
|
|
|
|
|
|
|
|
|
2009-05-10 19:58:49 +01:00
|
|
|
|
|
|
|
|
|
2008-10-16 16:31:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-02 10:27:21 +08:00
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
2008-10-16 16:31:55 -07:00
|
|
|
|
|
|
|
|
|
2018-06-07 09:57:00 -07:00
|
|
|
|
|
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-22 11:26:03 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-02 10:27:21 +08:00
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
2009-05-18 13:51:35 +08:00
|
|
|
|
|
|
|
|
|
2026-04-02 14:57:30 +08:00
|
|
|
|
|
|
|
|
|
2020-01-02 08:18:18 +08:00
|
|
|
|
2026-04-02 14:57:30 +08:00
|
|
|
|
2020-01-02 08:18:18 +08:00
|
|
|
|
2026-04-02 14:57:30 +08:00
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
2020-01-02 08:18:18 +08:00
|
|
|
|
|
|
|
|
|
2020-05-16 14:20:48 +08:00
|
|
|
|
|
|
|
|
|
2020-07-24 09:49:15 +08:00
|
|
|
|
2020-05-16 14:20:48 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-22 11:26:03 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-02 10:27:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
2020-05-16 14:20:48 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-15 09:30:05 -07:00
|
|
|
|
2020-05-16 14:20:48 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-16 14:20:55 +08:00
|
|
|
|
2020-05-16 14:20:48 +08:00
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2009-03-16 17:04:56 -07:00
|
|
|
|
2016-01-13 21:15:03 +00:00
|
|
|
|
2009-03-16 17:04:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2009-03-16 17:04:56 -07:00
|
|
|
|
|
|
|
|
|
2009-03-27 14:22:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-10 20:30:58 +01:00
|
|
|
|
2009-03-27 14:22:43 -07:00
|
|
|
|
|
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
2009-03-27 14:22:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-13 12:06:39 +08:00
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2009-03-27 14:22:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-02 14:57:29 +08:00
|
|
|
|
2009-03-27 14:22:43 -07:00
|
|
|
|
|
|
|
|
|
2009-05-10 20:30:58 +01:00
|
|
|
|
2009-03-27 14:22:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2009-03-27 14:22:43 -07:00
|
|
|
|
|
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-13 00:25:12 +00:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-10 09:58:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-08 13:54:07 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-13 00:25:12 +00:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2014-01-06 14:18:26 +08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-13 00:25:12 +00:00
|
|
|
|
2009-10-02 11:01:22 -07:00
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2025-04-08 13:53:54 -03:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2014-01-06 14:18:26 +08:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-19 17:02:07 +02:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
2009-03-27 14:22:43 -07:00
|
|
|
|
2008-07-10 11:16:42 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-06 10:43:17 +08:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
2019-09-06 11:14:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-30 11:47:07 -07:00
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-12-18 12:01:46 +05:30
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2012-05-13 20:09:38 +03:00
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
2012-03-30 11:47:07 -07:00
|
|
|
|
2019-09-06 11:14:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
2015-10-07 15:37:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-31 15:37:39 +08:00
|
|
|
|
|
|
|
|
|
2015-10-07 15:37:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-09-28 17:15:11 +02:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2011-03-28 17:49:12 +02:00
|
|
|
|
2015-10-07 15:37:03 +01:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2015-10-07 15:37:03 +01:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2015-10-07 15:37:03 +01:00
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
2010-09-28 17:15:11 +02:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2011-03-28 17:49:12 +02:00
|
|
|
|
2015-10-07 15:37:03 +01:00
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2015-10-07 15:37:03 +01:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2015-10-07 15:37:03 +01:00
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-28 17:49:12 +02:00
|
|
|
|
2015-10-07 15:37:03 +01:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2015-10-07 15:37:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-15 09:30:05 -07:00
|
|
|
|
2019-09-06 11:14:02 -07:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2021-10-14 13:38:32 +08:00
|
|
|
|
2026-06-04 14:03:09 +08:00
|
|
|
|
|
|
|
|
|
2021-06-10 10:00:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-14 13:38:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-22 13:08:02 -07:00
|
|
|
|
2026-06-04 14:03:09 +08:00
|
|
|
|
2016-03-17 14:12:31 -06:00
|
|
|
|
2026-06-04 14:03:09 +08:00
|
|
|
|
2016-03-17 14:12:31 -06:00
|
|
|
|
2021-06-10 10:00:55 +08:00
|
|
|
|
2019-09-06 11:14:02 -07:00
|
|
|
|
2021-06-10 10:00:55 +08:00
|
|
|
|
2026-06-04 14:03:09 +08:00
|
|
|
|
2021-06-10 10:00:55 +08:00
|
|
|
|
2026-06-04 14:03:09 +08:00
|
|
|
|
2021-06-10 10:00:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-14 13:38:32 +08:00
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:57 -07:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-17 14:12:25 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2018-03-31 01:33:11 +01:00
|
|
|
|
2012-06-04 17:29:01 -04:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-25 16:20:52 +08:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-31 01:33:11 +01:00
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-15 09:30:05 -07:00
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2019-09-06 11:14:02 -07:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-17 14:12:25 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2019-09-06 11:14:02 -07:00
|
|
|
|
2016-03-17 14:12:25 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-06 11:14:02 -07:00
|
|
|
|
2026-04-02 14:57:28 +08:00
|
|
|
|
|
|
|
|
|
2016-03-17 14:12:25 -06:00
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2016-03-17 14:12:25 -06:00
|
|
|
|
2019-09-06 11:14:02 -07:00
|
|
|
|
2016-03-17 14:12:25 -06:00
|
|
|
|
2023-03-22 13:08:02 -07:00
|
|
|
|
2016-03-17 14:12:25 -06:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
2009-08-19 15:26:11 -06:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
2017-11-03 10:51:33 -06:00
|
|
|
|
|
|
|
|
|
2013-03-25 16:20:52 +08:00
|
|
|
|
|
|
|
|
|
2011-07-19 16:19:51 +02:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-13 14:11:41 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-19 16:25:42 +02:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
2015-06-12 09:57:06 +02:00
|
|
|
|
2009-03-16 17:04:54 -07:00
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
2024-04-24 15:16:29 +08:00
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
|
|
|
|
|
2014-01-06 14:18:18 +08:00
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-02-28 18:27:26 +08:00
|
|
|
|
2014-01-06 14:18:18 +08:00
|
|
|
|
2013-03-25 16:20:52 +08:00
|
|
|
|
2024-04-24 15:16:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
|
|
|
|
|
2012-06-08 17:13:11 -04:00
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-11-30 22:22:29 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-25 16:20:52 +08:00
|
|
|
|
|
|
|
|
|
2009-03-16 17:04:55 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-27 14:22:43 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-09 12:05:39 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-16 22:59:29 +00:00
|
|
|
|
2009-09-09 12:05:39 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-25 18:02:58 +00:00
|
|
|
|
|
|
|
|
|
2009-09-09 12:05:39 -04:00
|
|
|
|
|
|
|
|
|
2014-01-06 14:18:16 +08:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-06 14:18:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
2014-01-06 14:18:20 +08:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:36 +08:00
|
|
|
|
|
|
|
|
|
2014-02-19 14:07:35 +08:00
|
|
|
|
iommu/vt-d: Introduce a rwsem to protect global data structures
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 happens.
So a global rwsem solution is adopted for balance between simplicity
and performance.
For interrupt remapping driver, function intel_irq_remapping_supported(),
dmar_table_init(), intel_enable_irq_remapping(), disable_irq_remapping(),
reenable_irq_remapping() and enable_drhd_fault_handling() etc
are called during booting, suspending and resuming with interrupt
disabled, so no need to take the global lock.
For interrupt remapping entry allocation, the locking model is:
down_read(&dmar_global_lock);
/* Find corresponding iommu */
iommu = map_hpet_to_ir(id);
if (iommu)
/*
* Allocate remapping entry and mark entry busy,
* the IOMMU won't be hot-removed until the
* allocated entry has been released.
*/
index = alloc_irte(iommu, irq, 1);
up_read(&dmar_global_lock);
For DMA remmaping driver, we only uses the dmar_global_lock rwsem to
protect functions which are only called in process context. For any
function which may be called in interrupt context, we will use RCU
to protect them in following patches.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
2014-02-19 14:07:33 +08:00
|
|
|
|
2014-01-06 14:18:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
iommu/vt-d: Introduce a rwsem to protect global data structures
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 happens.
So a global rwsem solution is adopted for balance between simplicity
and performance.
For interrupt remapping driver, function intel_irq_remapping_supported(),
dmar_table_init(), intel_enable_irq_remapping(), disable_irq_remapping(),
reenable_irq_remapping() and enable_drhd_fault_handling() etc
are called during booting, suspending and resuming with interrupt
disabled, so no need to take the global lock.
For interrupt remapping entry allocation, the locking model is:
down_read(&dmar_global_lock);
/* Find corresponding iommu */
iommu = map_hpet_to_ir(id);
if (iommu)
/*
* Allocate remapping entry and mark entry busy,
* the IOMMU won't be hot-removed until the
* allocated entry has been released.
*/
index = alloc_irte(iommu, irq, 1);
up_read(&dmar_global_lock);
For DMA remmaping driver, we only uses the dmar_global_lock rwsem to
protect functions which are only called in process context. For any
function which may be called in interrupt context, we will use RCU
to protect them in following patches.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
2014-02-19 14:07:33 +08:00
|
|
|
|
2014-01-06 14:18:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-05 19:40:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-04 09:44:00 +08:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-05 19:40:46 +03:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-04 09:44:00 +08:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-05 19:40:46 +03:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-27 20:03:31 -07:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-27 20:03:31 -07:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:59 +08:00
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-09 22:47:59 +08:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
2014-11-09 22:47:59 +08:00
|
|
|
|
2014-11-09 22:47:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-23 15:45:01 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|