diff options
author | Suravee Suthikulpanit <[email protected]> | 2020-09-03 09:38:22 +0000 |
---|---|---|
committer | Joerg Roedel <[email protected]> | 2020-09-04 11:53:18 +0200 |
commit | e52d58d54a321d4fe9d0ecdabe4f8774449f0d6e (patch) | |
tree | a005c83c9c2642a824c826065233931d37fa363c /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 26e495f341075c09023ba16dee9a7f37a021e745 (diff) |
iommu/amd: Use cmpxchg_double() when updating 128-bit IRTE
When using 128-bit interrupt-remapping table entry (IRTE) (a.k.a GA mode),
current driver disables interrupt remapping when it updates the IRTE
so that the upper and lower 64-bit values can be updated safely.
However, this creates a small window, where the interrupt could
arrive and result in IO_PAGE_FAULT (for interrupt) as shown below.
IOMMU Driver Device IRQ
============ ===========
irte.RemapEn=0
...
change IRTE IRQ from device ==> IO_PAGE_FAULT !!
...
irte.RemapEn=1
This scenario has been observed when changing irq affinity on a system
running I/O-intensive workload, in which the destination APIC ID
in the IRTE is updated.
Instead, use cmpxchg_double() to update the 128-bit IRTE at once without
disabling the interrupt remapping. However, this means several features,
which require GA (128-bit IRTE) support will also be affected if cmpxchg16b
is not supported (which is unprecedented for AMD processors w/ IOMMU).
Fixes: 880ac60e2538 ("iommu/amd: Introduce interrupt remapping ops structure")
Reported-by: Sean Osborne <[email protected]>
Signed-off-by: Suravee Suthikulpanit <[email protected]>
Tested-by: Erik Rockstrom <[email protected]>
Reviewed-by: Joao Martins <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions