[PATCH] iommu/vt-d: Add Scalable Mode fault information

2019-09-06 Thread Kyung Min Park
Reviewed-by: Sohil Mehta Signed-off-by: Kyung Min Park --- drivers/iommu/dmar.c| 77 ++--- include/linux/intel-iommu.h | 2 ++ 2 files changed, 75 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 1207e05

[PATCH] iommu/vt-d: Dump DMAR translation structure

2021-05-26 Thread Kyung Min Park
not available when the kernel failed to boot. Dump the DMAR translation structure, pagewalk the IO page table and print the page table entry when the fault happens. Signed-off-by: Kyung Min Park --- drivers/iommu/intel/dmar.c | 7 ++- drivers/iommu/intel/iommu.c | 108

[PATCH v2] iommu/vt-d: Dump DMAR translation structure

2021-07-21 Thread Kyung Min Park
not available when the kernel failed to boot. Dump the DMAR translation structure, pagewalk the IO page table and print the page table entry when the fault happens. Signed-off-by: Kyung Min Park --- ChangeLog: - Change from v1 to v2: 1. fix compilation issue with different IOMMU config option

Re: [PATCH v2] iommu/vt-d: Dump DMAR translation structure

2021-07-30 Thread Kyung Min Park
Hi Joerg, On Mon, 2021-07-26 at 14:25 +0200, Joerg Roedel wrote: > On Wed, Jul 21, 2021 at 09:24:53PM -0700, Kyung Min Park wrote: > > When the dmar translation fault happens, the kernel prints a single > > line > > fault reason with corresponding hexadecimal code defined

[PATCH v3] iommu/vt-d: Dump DMAR translation structure

2021-08-15 Thread Kyung Min Park
not available when the kernel failed to boot. Dump the DMAR translation structure, pagewalk the IO page table and print the page table entry when the fault happens. This is enabled by CONFIG_IOMMU_DEBUGFS. Signed-off-by: Kyung Min Park --- ChangeLog: - Change from v2 to v3: 1. Add config

[PATCH v2 2/3] iommu/vt-d: Move capability check code to cap_audit files

2020-12-05 Thread Kyung Min Park
Move IOMMU capability check and sanity check code to cap_audit files. Also implement some helper functions for sanity checks. Signed-off-by: Kyung Min Park --- drivers/iommu/intel/cap_audit.c | 20 + drivers/iommu/intel/cap_audit.h | 20 + drivers/iommu/intel/iommu.c | 76

[PATCH v2 0/3] Audit Capability and Extended Capability among IOMMUs

2020-12-05 Thread Kyung Min Park
message. Kyung Min Park (3): iommu/vt-d: Audit IOMMU Capabilities and add helper functions iommu/vt-d: Move capability check code to cap_audit files iommu/vt-d: Disable SVM in the platform when IOMMUs have inconsistencies drivers/iommu/intel/Makefile| 2 +- drivers/iommu/intel

[PATCH v2 1/3] iommu/vt-d: Audit IOMMU Capabilities and add helper functions

2020-12-05 Thread Kyung Min Park
) - IOTLB Register Offset (IRO) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/Makefile| 2 +- drivers/iommu/intel/cap_audit.c | 188 drivers/iommu/intel/cap_audit.h | 106 drivers/iommu/intel/iommu.c | 9

[PATCH v2 3/3] iommu/vt-d: Disable SVM in the platform when IOMMUs have inconsistencies

2020-12-05 Thread Kyung Min Park
(ERS) - Page Request Support (PRS) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/cap_audit.c | 11 +++ drivers/iommu/intel/cap_audit.h | 6 ++ drivers/iommu/intel/svm.c | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel

[PATCH v3 0/3] Audit Capability and Extended Capability among IOMMUs

2020-12-22 Thread Kyung Min Park
by Lu, Baolu. 2. Skip audit for gfx dedicated IOMMU. 3. Change commit message. Kyung Min Park (3): iommu/vt-d: Audit IOMMU Capabilities and add helper functions iommu/vt-d: Move capability check code to cap_audit files iommu/vt-d: Disable SVM in the platform when IOMMUs have

[PATCH v3 3/3] iommu/vt-d: Disable SVM in the platform when IOMMUs have inconsistencies

2020-12-22 Thread Kyung Min Park
(ERS) - Page Request Support (PRS) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/cap_audit.c | 11 +++ drivers/iommu/intel/cap_audit.h | 6 ++ drivers/iommu/intel/svm.c | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel

[PATCH v3 2/3] iommu/vt-d: Move capability check code to cap_audit files

2020-12-22 Thread Kyung Min Park
Move IOMMU capability check and sanity check code to cap_audit files. Also implement some helper functions for sanity checks. Signed-off-by: Kyung Min Park --- drivers/iommu/intel/cap_audit.c | 20 + drivers/iommu/intel/cap_audit.h | 20 + drivers/iommu/intel/iommu.c | 76

[PATCH v3 1/3] iommu/vt-d: Audit IOMMU Capabilities and add helper functions

2020-12-22 Thread Kyung Min Park
) - IOTLB Register Offset (IRO) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/Makefile| 2 +- drivers/iommu/intel/cap_audit.c | 188 drivers/iommu/intel/cap_audit.h | 106 drivers/iommu/intel/iommu.c | 9

[PATCH v4 0/3] Audit Capability and Extended Capability among IOMMUs

2021-01-05 Thread Kyung Min Park
: 1. Add missing cap/ecaps for audit. 2. Refactor function/macros overal suggested by Lu, Baolu. 2. Skip audit for gfx dedicated IOMMU. 3. Change commit message. Kyung Min Park (3): iommu/vt-d: Audit IOMMU Capabilities and add helper functions iommu/vt-d: Move capability check code to

[PATCH v4 3/3] iommu/vt-d: Disable SVM in the platform when IOMMUs have inconsistencies

2021-01-05 Thread Kyung Min Park
(ERS) - Page Request Support (PRS) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/cap_audit.c | 11 +++ drivers/iommu/intel/cap_audit.h | 6 ++ drivers/iommu/intel/svm.c | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel

[PATCH v4 1/3] iommu/vt-d: Audit IOMMU Capabilities and add helper functions

2021-01-05 Thread Kyung Min Park
) - IOTLB Register Offset (IRO) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/Makefile| 4 +- drivers/iommu/intel/cap_audit.c | 188 drivers/iommu/intel/cap_audit.h | 106 drivers/iommu/intel/iommu.c | 9

[PATCH v4 2/3] iommu/vt-d: Move capability check code to cap_audit files

2021-01-05 Thread Kyung Min Park
Move IOMMU capability check and sanity check code to cap_audit files. Also implement some helper functions for sanity checks. Signed-off-by: Kyung Min Park --- drivers/iommu/intel/cap_audit.c | 20 + drivers/iommu/intel/cap_audit.h | 20 + drivers/iommu/intel/iommu.c | 76

Re: [PATCH v4 1/3] iommu/vt-d: Audit IOMMU Capabilities and add helper functions

2021-01-30 Thread Kyung Min Park
Hi Allen, On Tue, 2021-01-19 at 09:55 +0800, Lu Baolu wrote: > Hi, > > On 1/6/21 9:30 AM, Kyung Min Park wrote: > > Audit IOMMU Capability/Extended Capability and check if the IOMMUs > > have > > the consistent value for features. Report out or scale to the > >

[PATCH v5 1/2] iommu/vt-d: Audit IOMMU Capabilities and add helper functions

2021-01-30 Thread Kyung Min Park
) - IOTLB Register Offset (IRO) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/Makefile| 4 +- drivers/iommu/intel/cap_audit.c | 185 drivers/iommu/intel/cap_audit.h | 110 + drivers/iommu/intel/iommu.c | 9

[PATCH v5 0/2] Audit Capability and Extended Capability among IOMMUs

2021-01-30 Thread Kyung Min Park
and rebase to v5.10. - Change from v1 to v2: 1. Add missing cap/ecaps for audit. 2. Refactor function/macros overal suggested by Lu, Baolu. 2. Skip audit for gfx dedicated IOMMU. 3. Change commit message. Kyung Min Park (2): iommu/vt-d: Audit IOMMU Capabilities and add helper functions

[PATCH v5 2/2] iommu/vt-d: Move capability check code to cap_audit files

2021-01-30 Thread Kyung Min Park
Move IOMMU capability check and sanity check code to cap_audit files. Also implement some helper functions for sanity checks. Signed-off-by: Kyung Min Park --- drivers/iommu/intel/cap_audit.c | 20 + drivers/iommu/intel/cap_audit.h | 20 + drivers/iommu/intel/iommu.c | 76

[PATCH] iommu/vt-d: Disable SVM when ATS/PRI/PASID are not enabled in the device

2021-03-14 Thread Kyung Min Park
Identifier (PASID) capabilities to be enabled to support IO page fault. Disable SVM when ATS, PRI and PASID are not enabled in the device. Signed-off-by: Kyung Min Park --- drivers/iommu/intel/iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel

[PATCH 2/4] iommu/vt-d: Report out when IOMMU features have inconsistencies

2020-09-22 Thread Kyung Min Park
) - Nested Translation Support (NEST) - Snoop Control (SC) - Pass Through (PT) - Device TLB Support (DT) - Queued Invalidation (QI) - Page walk Coherency (C) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/audit.c | 48 + drivers/iommu/intel/audit.h | 43

[PATCH 4/4] iommu/vt-d: Scale capability to the lowest supported between the IOMMUs

2020-09-22 Thread Kyung Min Park
) - Pasid Size Supported (PSS) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/audit.c | 23 +++ drivers/iommu/intel/audit.h | 27 +++ include/linux/intel-iommu.h | 1 + 3 files changed, 51 insertions(+) diff --git a/drivers/iommu/intel/audit.c b

[PATCH 3/4] iommu/vt-d: Audit IOMMUs for Interrupt Remapping features

2020-09-22 Thread Kyung Min Park
plugged. Report out features when below features are mismatched: - Posted Interrupts (PI) - Extended Interrupt Mode (EIM) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/Makefile| 2 +- drivers/iommu/intel/audit.c | 39 - drivers/iommu/intel

[PATCH 0/4] Audit Capability and Extended Capability among IOMMUs

2020-09-22 Thread Kyung Min Park
Specification. Link: https://software.intel.com/sites/default/files/managed/c5/15/vt-directed-io-spec.pdf Kyung Min Park (4): iommu/vt-d: Disable SVM in the platform when IOMMUs have inconsistencies iommu/vt-d: Report out when IOMMU features have inconsistencies iommu/vt-d: Audit IOMMUs for

[PATCH 1/4] iommu/vt-d: Disable SVM in the platform when IOMMUs have inconsistencies

2020-09-22 Thread Kyung Min Park
(ERS) - Page Request Support (PRS) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/Makefile | 2 +- drivers/iommu/intel/audit.c | 95 drivers/iommu/intel/audit.h | 29 +++ drivers/iommu/intel/iommu.c | 12 - 4 files changed, 136

[RESEND PATCH 0/4] Audit Capability and Extended Capability among IOMMUs

2020-09-30 Thread Kyung Min Park
Specification. Link: https://software.intel.com/sites/default/files/managed/c5/15/vt-directed-io-spec.pdf Kyung Min Park (4): iommu/vt-d: Disable SVM in the platform when IOMMUs have inconsistencies iommu/vt-d: Report out when IOMMU features have inconsistencies iommu/vt-d: Audit IOMMUs for

[RESEND PATCH 2/4] iommu/vt-d: Report out when IOMMU features have inconsistencies

2020-09-30 Thread Kyung Min Park
) - Nested Translation Support (NEST) - Snoop Control (SC) - Pass Through (PT) - Device TLB Support (DT) - Queued Invalidation (QI) - Page walk Coherency (C) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/audit.c | 48 + drivers/iommu/intel/audit.h | 43

[RESEND PATCH 4/4] iommu/vt-d: Scale capability to the lowest supported between the IOMMUs

2020-09-30 Thread Kyung Min Park
) - Pasid Size Supported (PSS) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/audit.c | 23 +++ drivers/iommu/intel/audit.h | 27 +++ include/linux/intel-iommu.h | 1 + 3 files changed, 51 insertions(+) diff --git a/drivers/iommu/intel/audit.c b

[RESEND PATCH 1/4] iommu/vt-d: Disable SVM in the platform when IOMMUs have inconsistencies

2020-09-30 Thread Kyung Min Park
(ERS) - Page Request Support (PRS) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/Makefile | 2 +- drivers/iommu/intel/audit.c | 95 drivers/iommu/intel/audit.h | 29 +++ drivers/iommu/intel/iommu.c | 12 - 4 files changed, 136

[RESEND PATCH 3/4] iommu/vt-d: Audit IOMMUs for Interrupt Remapping features

2020-09-30 Thread Kyung Min Park
plugged. Report out features when below features are mismatched: - Posted Interrupts (PI) - Extended Interrupt Mode (EIM) Signed-off-by: Kyung Min Park --- drivers/iommu/intel/Makefile| 2 +- drivers/iommu/intel/audit.c | 39 - drivers/iommu/intel