[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 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 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

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 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 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 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

[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

[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 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 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 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 2/2] x86: Expose AVX512_FP16 for supported CPUID

2020-12-07 Thread Kyung Min Park
supported CPUID, then guest could make use of it. Signed-off-by: Cathy Zhang Signed-off-by: Kyung Min Park Acked-by: Dave Hansen Reviewed-by: Tony Luck --- arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index

[PATCH 0/2] Enumerate and expose AVX512_FP16 feature

2020-12-07 Thread Kyung Min Park
1]. https://software.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html Cathy Zhang (1): x86: Expose AVX512_FP16 for supported CPUID Kyung Min Park (1): Enumerate AVX512 FP16 CPUID feature flag arch/x86/include/asm/cpufeatures.h | 1 +

[PATCH 1/2] Enumerate AVX512 FP16 CPUID feature flag

2020-12-07 Thread Kyung Min Park
with AVX512BW. The only in-kernel usage of this is kvm passthrough. The CPU feature flag is shown as "avx512_fp16" in /proc/cpuinfo. Signed-off-by: Kyung Min Park Acked-by: Dave Hansen Reviewed-by: Tony Luck --- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/cpuid-deps.c

[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 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 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 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

[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 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 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

[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

[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 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

[tip: x86/misc] Documentation/x86: Add documentation for /proc/cpuinfo feature flags

2020-09-01 Thread tip-bot2 for Kyung Min Park
The following commit has been merged into the x86/misc branch of tip: Commit-ID: ea4e3bef4c94d5b5d8e790f37b48b7641172bcf5 Gitweb: https://git.kernel.org/tip/ea4e3bef4c94d5b5d8e790f37b48b7641172bcf5 Author:Kyung Min Park AuthorDate:Mon, 31 Aug 2020 11:35:00 -07:00

[PATCH v3] Documentation/x86: Add documentation for /proc/cpuinfo feature flags

2020-08-31 Thread Kyung Min Park
Neri Signed-off-by: Ricardo Neri Signed-off-by: Kyung Min Park --- ChangeLog: - Change from v2 to v3: 1. Changed the CPUID custom tool to the one that will be in the kernel source as suggested by Borislav Petkov. 2. Some change of wording as suggested by Borislav petkov. - Change from

Re: [PATCH v2] Documentation/x86: Add documentation for /proc/cpuinfo feature flags

2020-08-30 Thread Kyung Min Park
On Sun, 2020-08-30 at 13:50 +0200, Borislav Petkov wrote: > On Fri, Aug 28, 2020 at 03:30:32PM -0700, Kyung Min Park wrote: > > Should I mention the tool specifically although the tool is WIP? > > Well, if you wanna look at it that way, the whole kernel is > constantly

[tip: x86/cpu] x86/cpufeatures: Enumerate TSX suspend load address tracking instructions

2020-08-30 Thread tip-bot2 for Kyung Min Park
The following commit has been merged into the x86/cpu branch of tip: Commit-ID: 18ec63faefb3fd311822556cd9b949f66b1eecee Gitweb: https://git.kernel.org/tip/18ec63faefb3fd311822556cd9b949f66b1eecee Author:Kyung Min Park AuthorDate:Tue, 25 Aug 2020 08:47:57 +08:00 Committer

Re: [PATCH v2] Documentation/x86: Add documentation for /proc/cpuinfo feature flags

2020-08-28 Thread Kyung Min Park
Hi Boris, On Fri, 2020-08-28 at 20:42 +0200, Borislav Petkov wrote: > On Mon, Aug 24, 2020 at 11:04:12AM -0700, Kyung Min Park wrote: > > +If the expected flag does not appear in /proc/cpuinfo, things are > > murkier. > > +Users need to find out the reason why the fla

[PATCH v2] Documentation/x86: Add documentation for /proc/cpuinfo feature flags

2020-08-24 Thread Kyung Min Park
Neri Signed-off-by: Ricardo Neri Signed-off-by: Kyung Min Park --- ChangeLog: - Change from v1 to v2: 1. Removed patches of adding feature flags (TSXLDTRK, SERIALIZE) from this patchset. 2. Removed the cover letter. 3. Some change of wording in Documentation/x86/cpuinfo.rst

Re: [PATCH v2 2/4] x86/cpufeatures: Enumerate TSX suspend load address tracking instructions

2020-07-06 Thread Kyung Min Park
t; > Detailed information on the instructions and CPUID feature flag > TSXLDTRK > can be found in the latest Intel Architecture Instruction Set > Extensions > and Future Features Programming Reference and Intel 64 and IA-32 > Architectures Software Developer's Manual. > > Sign

Re: [RFC PATCH 1/3] Documentation/x86: Add documentation for /proc/cpuinfo feature flags

2020-06-15 Thread Kyung Min Park
Hi Borislav, On Mon, 2020-06-15 at 20:15 +0200, Borislav Petkov wrote: > On Wed, Jun 10, 2020 at 01:06:59PM -0700, Kyung Min Park wrote: > > Add documentation for /proc/cpuinfo feature flags enumeration. > > Document how and when x86 feature flags are used. Also discuss what >

[RFC PATCH 0/3] Add Documentation for /proc/cpuinfo flags

2020-06-10 Thread Kyung Min Park
to users. Include two instances of features for which there are not implemented use cases in the kernel. Patch 1 creates a new documentation for /proc/cpuinfo flags bits. Patch 2 adds X86_FEATURE_SERIALIZE. Patch 3 adds X86_FEATURE_TSXLDTRK. This RFC series has been reviewed by Dave Hansen. Kyung Min

[RFC PATCH 1/3] Documentation/x86: Add documentation for /proc/cpuinfo feature flags

2020-06-10 Thread Kyung Min Park
-off-by: Kyung Min Park --- Documentation/x86/cpuinfo.rst | 152 ++ Documentation/x86/index.rst | 1 + 2 files changed, 153 insertions(+) create mode 100644 Documentation/x86/cpuinfo.rst diff --git a/Documentation/x86/cpuinfo.rst b/Documentation/x86/cpuinfo.rst

[RFC PATCH 3/3] x86/cpufeatures: Enumerate TSX suspend load address tracking instructions

2020-06-10 Thread Kyung Min Park
uction Set Extensions and Future Features Programming Reference and Intel 64 and IA-32 Architectures Software Developer's Manual. Signed-off-by: Kyung Min Park --- arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x

[RFC PATCH 2/3] x86/cpufeatures: Add enumeration for SERIALIZE instruction

2020-06-10 Thread Kyung Min Park
From: Ricardo Neri This instruction gives software a way to force the processor to complete all modifications to flags, registers and memory from previous instructions and drain all buffered writes to memory before the next instruction is fetched and executed. The same effect can be obtained

[tip: x86/timers] x86/delay: Refactor delay_mwaitx() for TPAUSE support

2020-05-07 Thread tip-bot2 for Kyung Min Park
The following commit has been merged into the x86/timers branch of tip: Commit-ID: 46f90c7aad62be1af76588108c730d826308a801 Gitweb: https://git.kernel.org/tip/46f90c7aad62be1af76588108c730d826308a801 Author:Kyung Min Park AuthorDate:Fri, 24 Apr 2020 12:37:55 -07:00

[tip: x86/timers] x86/delay: Introduce TPAUSE delay

2020-05-07 Thread tip-bot2 for Kyung Min Park
The following commit has been merged into the x86/timers branch of tip: Commit-ID: cec5f268cd02d25d2d74807843d8ae0292fe0fb7 Gitweb: https://git.kernel.org/tip/cec5f268cd02d25d2d74807843d8ae0292fe0fb7 Author:Kyung Min Park AuthorDate:Fri, 24 Apr 2020 12:37:56 -07:00

[PATCH] x86/cpu: Add Atom Tremont (Elkhart Lake)

2019-08-12 Thread Kyung Min Park
Add the Atom Tremont model number to the Intel family list. Signed-off-by: Kyung Min Park --- arch/x86/include/asm/intel-family.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/intel-family.h b/arch/x86/include/asm/intel-family.h index 0278aa6..02d675d 100644