Re: [PATCH] iommu/amd: Add sanity check for interrupt remapping table length macros

2020-12-10 Thread Jerry Snitselaar
,7 +3191,7 @@ static void set_dte_irq_entry(u16 devid, struct > irq_remap_table *table) > dte &= ~DTE_IRQ_PHYS_ADDR_MASK; > dte |= iommu_virt_to_phys(table->table); > dte |= DTE_IRQ_REMAP_INTCTL; > - dte |= DTE_IRQ_TABLE_LEN; > + dte |= DTE_INTTABLEN; > dte |= DTE_IRQ_REMAP_ENABLE; > > amd_iommu_dev_table[devid].data[2] = dte; Reviewed-by: Jerry Snitselaar

Re: [GIT PULL] IOMMU fix for 5.10 (-final)

2020-12-09 Thread Jerry Snitselaar
On Wed, Dec 9, 2020 at 12:18 PM Linus Torvalds wrote: > > On Wed, Dec 9, 2020 at 11:12 AM Jerry Snitselaar wrote: > > > > Since the field in the device table entry format expects it to be n > > where there are 2^n entries in the table I guess it should be: > > &

Re: [GIT PULL] IOMMU fix for 5.10 (-final)

2020-12-09 Thread Jerry Snitselaar
On Wed, Dec 9, 2020 at 12:12 PM Jerry Snitselaar wrote: > > > Will Deacon @ 2020-12-09 11:50 MST: > > > On Wed, Dec 09, 2020 at 10:07:46AM -0800, Linus Torvalds wrote: > >> On Wed, Dec 9, 2020 at 6:12 AM Will Deacon wrote: > >> > > >> > Plea

Re: [GIT PULL] IOMMU fix for 5.10 (-final)

2020-12-09 Thread Jerry Snitselaar
Will Deacon @ 2020-12-09 11:50 MST: > On Wed, Dec 09, 2020 at 10:07:46AM -0800, Linus Torvalds wrote: >> On Wed, Dec 9, 2020 at 6:12 AM Will Deacon wrote: >> > >> > Please pull this one-liner AMD IOMMU fix for 5.10. It's actually a fix >> > for a fix, where the size of the interrupt remapping

Re: [PATCH] iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs

2020-12-07 Thread Jerry Snitselaar
e device table mapping entry (DTE). > > Fixes: 73db2fc595f3 ("iommu/amd: Increase interrupt remapping table limit to > 512 entries") > Reported-by: Jerry Snitselaar > Signed-off-by: Suravee Suthikulpanit > --- > drivers/iommu/amd/amd_iommu_types.h | 2 +- > 1 fi

Re: [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-06 Thread Jerry Snitselaar
Thomas Gleixner @ 2020-12-06 09:38 MST: > On Fri, Dec 04 2020 at 18:43, Jerry Snitselaar wrote: > >> Now that kstat_irqs is exported, get rid of count_interrupts in >> i915_pmu.c >> --- a/drivers/gpu/drm/i915/i915_pmu.c >> +++ b/drivers/gpu/drm/i915/i915_pmu.c

Re: [PATCH v3 1/4] irq: export kstat_irqs

2020-12-06 Thread Jerry Snitselaar
Thomas Gleixner @ 2020-12-06 10:54 MST: > Jerry, > > On Fri, Dec 04 2020 at 18:43, Jerry Snitselaar wrote: > > The proper prefix is 'genirq:' git log kernel/irq/irqdesc.c would have > told you. > >> To try and detect potential interrupt storms that >> have be

[PATCH v3 0/4] tpm_tis: Detect interrupt storms

2020-12-04 Thread Jerry Snitselaar
. Changes from v1: - drop tpm_tis specific workqueue and use just system_w. Jerry Snitselaar (4): irq: export kstat_irqs drm/i915/pmu: Use kstat_irqs to get interrupt count tpm_tis: Disable interrupts if interrupt storm detected tpm_tis: Disable Interrupts on the ThinkPad L490 Cc

[PATCH v3 3/4] tpm_tis: Disable interrupts if interrupt storm detected

2020-12-04 Thread Jerry Snitselaar
the problem occurring, disable interrupts, and revert to polling when it happens. Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Cc: Peter Huewe Cc: James Bottomley Cc: Matthew Garrett Cc: Hans de Goede Signed-off-by: Jerry Snitselaar --- v3: - Change include from linux/kernel_stat.h to linux/irq.h v2

[PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count

2020-12-04 Thread Jerry Snitselaar
Huewe Cc: James Bottomley Cc: Matthew Garrett Cc: Hans de Goede Signed-off-by: Jerry Snitselaar --- drivers/gpu/drm/i915/i915_pmu.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c index

[PATCH v3 1/4] irq: export kstat_irqs

2020-12-04 Thread Jerry Snitselaar
Sakkinen Cc: Jason Gunthorpe Cc: Peter Huewe Cc: James Bottomley Cc: Matthew Garrett Cc: Hans de Goede Signed-off-by: Jerry Snitselaar --- include/linux/irqdesc.h | 1 + kernel/irq/irqdesc.c| 1 + 2 files changed, 2 insertions(+) diff --git a/include/linux/irqdesc.h b/include/linux

[PATCH v3 4/4] tpm_tis: Disable Interrupts on the ThinkPad L490

2020-12-04 Thread Jerry Snitselaar
Signed-off-by: Jerry Snitselaar --- drivers/char/tpm/tpm_tis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 4ed6e660273a..7322e0986a83 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c

Re: [PATCH v2] tpm_tis: Disable interrupts if interrupt storm detected

2020-12-04 Thread Jerry Snitselaar
James Bottomley @ 2020-12-03 14:05 MST: > On Thu, 2020-12-03 at 13:14 -0700, Jerry Snitselaar wrote: >> Jerry Snitselaar @ 2020-12-02 23:11 MST: > [...] >> > The interrupt storm detection code works on the T490s. I'm not sure >> > what is going on with the L490.

Re: [PATCH v2] tpm_tis: Disable interrupts if interrupt storm detected

2020-12-03 Thread Jerry Snitselaar
Jerry Snitselaar @ 2020-12-02 23:11 MST: > Jerry Snitselaar @ 2020-12-02 17:02 MST: > >> Jarkko Sakkinen @ 2020-12-02 09:49 MST: >> >>> On Tue, Dec 01, 2020 at 12:59:23PM -0700, Jerry Snitselaar wrote: >>>> >>>> Jerry Snitselaar @ 2020-11-30

Re: [PATCH v2] tpm_tis: Disable interrupts if interrupt storm detected

2020-12-02 Thread Jerry Snitselaar
Jerry Snitselaar @ 2020-12-02 17:02 MST: > Jarkko Sakkinen @ 2020-12-02 09:49 MST: > >> On Tue, Dec 01, 2020 at 12:59:23PM -0700, Jerry Snitselaar wrote: >>> >>> Jerry Snitselaar @ 2020-11-30 20:26 MST: >>> >>> > Jerry Snitselaar

Re: [PATCH v2] tpm_tis: Disable interrupts if interrupt storm detected

2020-12-02 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2020-12-02 09:49 MST: > On Tue, Dec 01, 2020 at 12:59:23PM -0700, Jerry Snitselaar wrote: >> >> Jerry Snitselaar @ 2020-11-30 20:26 MST: >> >> > Jerry Snitselaar @ 2020-11-30 19:58 MST: >> > >> >> When enabling the interrup

Re: [PATCH] iommu/amd: Increase interrupt remapping table limit to 512 entries

2020-12-01 Thread Jerry Snitselaar
Suravee Suthikulpanit @ 2020-10-14 19:50 MST: > Certain device drivers allocate IO queues on a per-cpu basis. > On AMD EPYC platform, which can support up-to 256 cpu threads, > this can exceed the current MAX_IRQ_PER_TABLE limit of 256, > and result in the error message: > > AMD-Vi: Failed

Re: [PATCH v2] tpm_tis: Disable interrupts if interrupt storm detected

2020-12-01 Thread Jerry Snitselaar
Jerry Snitselaar @ 2020-11-30 20:26 MST: > Jerry Snitselaar @ 2020-11-30 19:58 MST: > >> When enabling the interrupt code for the tpm_tis driver we have >> noticed some systems have a bios issue causing an interrupt storm to >> occur. The issue isn't limited t

Re: [PATCH v2] tpm_tis: Disable interrupts if interrupt storm detected

2020-11-30 Thread Jerry Snitselaar
Jerry Snitselaar @ 2020-11-30 19:58 MST: > When enabling the interrupt code for the tpm_tis driver we have > noticed some systems have a bios issue causing an interrupt storm to > occur. The issue isn't limited to a single tpm or system manufacturer > so keeping a denylis

[PATCH v2] tpm_tis: Disable interrupts if interrupt storm detected

2020-11-30 Thread Jerry Snitselaar
the problem occurring, disable interrupts, and revert to polling when it happens. Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Cc: Peter Huewe Cc: James Bottomley Cc: Matthew Garrett Cc: Hans de Goede Signed-off-by: Jerry Snitselaar --- v2: drop tpm_tis specific workqueue and use just system_wq drivers

[PATCH] tpm_tis: Disable interrupts if interrupt storm detected

2020-11-30 Thread Jerry Snitselaar
occurring, disable interrupts, and revert to polling when it happens. Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Cc: Peter Huewe Cc: James Bottomley Cc: Matthew Garrett Cc: Hans de Goede Signed-off-by: Jerry Snitselaar --- drivers/char/tpm/tpm_tis_core.c | 34

Re: Question about domain_init (v5.3-v5.7)

2020-11-30 Thread Jerry Snitselaar
Jerry Snitselaar @ 2020-11-30 10:50 MST: > Lu Baolu @ 2020-11-26 19:12 MST: > >> Hi Jerry, >> >> On 11/27/20 5:35 AM, Jerry Snitselaar wrote: >>> Lu Baolu @ 2020-11-26 04:01 MST: >>> >>>> Hi Jerry, >>>> >>>>

Re: Question about domain_init (v5.3-v5.7)

2020-11-30 Thread Jerry Snitselaar
Lu Baolu @ 2020-11-26 19:12 MST: > Hi Jerry, > > On 11/27/20 5:35 AM, Jerry Snitselaar wrote: >> Lu Baolu @ 2020-11-26 04:01 MST: >> >>> Hi Jerry, >>> >>> On 2020/11/26 4:27, Jerry Snitselaar wrote: >>>> Is there a reason we check the

Re: Question about domain_init (v5.3-v5.7)

2020-11-26 Thread Jerry Snitselaar
Lu Baolu @ 2020-11-26 19:12 MST: > Hi Jerry, > > On 11/27/20 5:35 AM, Jerry Snitselaar wrote: >> Lu Baolu @ 2020-11-26 04:01 MST: >> >>> Hi Jerry, >>> >>> On 2020/11/26 4:27, Jerry Snitselaar wrote: >>>> Is there a reason we check the

Re: Question about domain_init (v5.3-v5.7)

2020-11-26 Thread Jerry Snitselaar
Lu Baolu @ 2020-11-26 04:01 MST: > Hi Jerry, > > On 2020/11/26 4:27, Jerry Snitselaar wrote: >> Is there a reason we check the requested guest address width against >> the >> iommu's mgaw, instead of the agaw that we already know for the iommu? >> I've run in

Question about domain_init (v5.3-v5.7)

2020-11-25 Thread Jerry Snitselaar
Is there a reason we check the requested guest address width against the iommu's mgaw, instead of the agaw that we already know for the iommu? I've run into a case with a new system where the mgaw reported is 57, but if they set PAE to 46 instead of 52 in the bios, then sagaw reports the highest

Re: [PATCH] tpm_tis: Disable interrupts on ThinkPad T490s

2020-11-24 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2020-11-23 20:26 MST: > On Wed, Nov 18, 2020 at 11:36:20PM -0700, Jerry Snitselaar wrote: >> >> Matthew Garrett @ 2020-10-15 15:39 MST: >> >> > On Thu, Oct 15, 2020 at 2:44 PM Jerry Snitselaar >> > wrote: >> >> >> &

Re: [PATCH] tpm_tis: Disable interrupts on ThinkPad T490s

2020-11-19 Thread Jerry Snitselaar
Hans de Goede @ 2020-11-19 07:42 MST: > Hi, > > On 11/19/20 7:36 AM, Jerry Snitselaar wrote: >> >> Matthew Garrett @ 2020-10-15 15:39 MST: >> >>> On Thu, Oct 15, 2020 at 2:44 PM Jerry Snitselaar >>> wrote: >>>> >>

Re: [PATCH] tpm_tis: Disable interrupts on ThinkPad T490s

2020-11-18 Thread Jerry Snitselaar
Matthew Garrett @ 2020-10-15 15:39 MST: > On Thu, Oct 15, 2020 at 2:44 PM Jerry Snitselaar wrote: >> >> There is a misconfiguration in the bios of the gpio pin used for the >> interrupt in the T490s. When interrupts are enabled in the tpm_tis >> driver code this re

Re: [PATCH] tpm_tis: Disable interrupts on ThinkPad T490s

2020-10-15 Thread Jerry Snitselaar
James should this get tacked on the end of your patchset? Regards, Jerry

[PATCH] tpm_tis: Disable interrupts on ThinkPad T490s

2020-10-15 Thread Jerry Snitselaar
Signed-off-by: Jerry Snitselaar --- drivers/char/tpm/tpm_tis.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 0b214963539d..4ed6e660273a 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b

kdump boot failing with IVRS checksum failure

2020-09-21 Thread Jerry Snitselaar
Hello Joerg, We are seeing a kdump kernel boot failure in test on an HP DL325 Gen10 and it was tracked down to 387caf0b759a ("iommu/amd: Treat per-device exclusion ranges as r/w unity-mapped regions"). Reproduced on 5.9-rc5 and goes away with revert of the commit. There is a follow on commit

Re: [PATCH v2 0/2] iommu: Move AMD and Intel Kconfig + Makefile bits into their directories

2020-07-27 Thread Jerry Snitselaar
Jerry Snitselaar @ 2020-06-30 13:06 MST: > This patchset imeplements the suggestion from Linus to move the > Kconfig and Makefile bits for AMD and Intel into their respective > directories. > > v2: Rebase against v5.8-rc3. Dropped ---help--- changes from Kconfig as that &g

Re: [PATCH v9 2/2] tpm: Add support for event log pointer found in TPM2 ACPI table

2020-07-06 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2020-07-06 16:09 MST: > On Mon, Jul 06, 2020 at 02:19:53PM -0400, Stefan Berger wrote: >> From: Stefan Berger >> >> In case a TPM2 is attached, search for a TPM2 ACPI table when trying >> to get the event log from ACPI. If one is found, use it to get the >> start and length

Re: [PATCH v9 2/2] tpm: Add support for event log pointer found in TPM2 ACPI table

2020-07-06 Thread Jerry Snitselaar
s SeaBIOS, to pass an event log when using a TPM2. > > Signed-off-by: Stefan Berger Reviewed-by: Jerry Snitselaar > --- > drivers/char/tpm/eventlog/acpi.c | 63 +--- > 1 file changed, 42 insertions(+), 21 deletions(-) > > diff --git a/drivers/cha

Re: [PATCH v9 1/2] acpi: Extend TPM2 ACPI table with missing log fields

2020-07-06 Thread Jerry Snitselaar
1.2, Revision 8 > > https://trustedcomputinggroup.org/wp-content/uploads/TCG_ACPIGeneralSpecification_v1.20_r8.pdf > > Signed-off-by: Stefan Berger > Cc: linux-a...@vger.kernel.org > Acked-by: Rafael J. Wysocki > Reviewed-by: Jarkko Sakkinen Reviewed-by: Jerry Snitselaar

Re: [PATCH] Revert commit e918e570415c ("tpm_tis: Remove the HID IFX0102")

2020-07-06 Thread Jerry Snitselaar
eter"). > > Fixes: e918e570415c ("tpm_tis: Remove the HID IFX0102") > Reported-by: Peter Huewe > Signed-off-by: Jarkko Sakkinen Reviewed-by: Jerry Snitselaar > --- > drivers/char/tpm/tpm_tis.c | 8 > 1 file changed, 8 insertions(+) > > diff --gi

Re: [PATCH] tpm: Define TPM2_SPACE_BUFFER_SIZE to replace the use of PAGE_SIZE

2020-07-02 Thread Jerry Snitselaar
o Sakkinen Reviewed-by: Jerry Snitselaar --- v2: Also use the new buffer size for chip->work_buffer (reported by stefanb) drivers/char/tpm/tpm-chip.c | 9 ++--- drivers/char/tpm/tpm.h| 5 - drivers/char/tpm/tpm2-space.c | 26 -- drivers/char/tpm/tpmr

[PATCH v2 1/2] iommu/vt-d: Move Kconfig and Makefile bits down into intel directory

2020-06-30 Thread Jerry Snitselaar
Move Intel Kconfig and Makefile bits down into intel directory with the rest of the Intel specific files. Cc: Joerg Roedel Cc: Lu Baolu Signed-off-by: Jerry Snitselaar --- drivers/iommu/Kconfig| 86 +--- drivers/iommu/Makefile | 8 +--- drivers

[PATCH v2 0/2] iommu: Move AMD and Intel Kconfig + Makefile bits into their directories

2020-06-30 Thread Jerry Snitselaar
This patchset imeplements the suggestion from Linus to move the Kconfig and Makefile bits for AMD and Intel into their respective directories. v2: Rebase against v5.8-rc3. Dropped ---help--- changes from Kconfig as that was dealt with in systemwide cleanup. Jerry Snitselaar (2): iommu

[PATCH v2 2/2] iommu/amd: Move Kconfig and Makefile bits down into amd directory

2020-06-30 Thread Jerry Snitselaar
Move AMD Kconfig and Makefile bits down into the amd directory with the rest of the AMD specific files. Cc: Joerg Roedel Cc: Suravee Suthikulpanit Signed-off-by: Jerry Snitselaar --- drivers/iommu/Kconfig | 45 +- drivers/iommu/Makefile | 5

Re: [PATCH v2] tpm_tis: Remove the HID IFX0102

2020-06-30 Thread Jerry Snitselaar
On Fri Jun 26 20, Jarkko Sakkinen wrote: On Thu, Jun 25, 2020 at 02:19:23PM -0700, Jerry Snitselaar wrote: On Fri Jun 26 20, Jarkko Sakkinen wrote: > On Wed, Jun 24, 2020 at 11:21:50PM -0700, Jerry Snitselaar wrote: > > On Thu Jun 25 20, Jarkko Sakkinen wrote: > > > Acer C720

Re: [PATCH 00/13] iommu: Remove usage of dev->archdata.iommu

2020-06-25 Thread Jerry Snitselaar
/s5p-mfc/s5p_mfc_iommu.h| 4 +++- 17 files changed, 64 insertions(+), 71 deletions(-) -- 2.27.0 Reviewed-by: Jerry Snitselaar

Re: [PATCH v2] tpm: tpm2-space: Resize session and context buffers dynamically

2020-06-25 Thread Jerry Snitselaar
On Thu Jun 25 20, Jarkko Sakkinen wrote: Re-allocate context and session buffers when needed. Scale them in page increments so that the reallocation is only seldomly required, and thus causes minimal stress to the system. Add a static maximum limit of four pages for buffer sizes. Cc: James

Re: [PATCH v2] tpm_tis: Remove the HID IFX0102

2020-06-25 Thread Jerry Snitselaar
On Fri Jun 26 20, Jarkko Sakkinen wrote: On Wed, Jun 24, 2020 at 11:21:50PM -0700, Jerry Snitselaar wrote: On Thu Jun 25 20, Jarkko Sakkinen wrote: > Acer C720 running Linux v5.3 reports this in klog: > > tpm_tis: 1.2 TPM (device-id 0xB, rev-id 16) > tpm tpm0: tpm_try_transmit: send

Re: [PATCH v2] tpm_tis: Remove the HID IFX0102

2020-06-25 Thread Jerry Snitselaar
IS driver by mistake. Fixes: 93e1b7d42e1e ("[PATCH] tpm: add HID module parameter") Link: https://bugzilla.kernel.org/show_bug.cgi?id=203877 Cc: Kylene Jo Hall Reported-by: Ferry Toth: Signed-off-by: Jarkko Sakkinen Reviewed-by: Jerry Snitselaar

Re: [PATCHv2] tpm: ibmvtpm: Wait for ready buffer before probing for TPM2 attributes

2020-06-18 Thread Jerry Snitselaar
will ensure the buffer is allocated. Fixes: 18b3670d79ae9 ("tpm: ibmvtpm: Add support for TPM2") Signed-off-by: David Gibson --- Reviewed-by: Jerry Snitselaar Changes from v1: * Fixed a formatting error in the commit message * Added some more detail to the commit message driver

Re: [PATCH 1/1] iommu/vt-d: Fix misuse of iommu_domain_identity_map()

2020-06-18 Thread Jerry Snitselaar
d-by: Alex Williamson Signed-off-by: Lu Baolu Reviewed-by: Jerry Snitselaar

[PATCH 0/2] iommu: Move AMD and Intel Kconfig + Makefile bits into their directories

2020-06-12 Thread Jerry Snitselaar
This patchset imeplements the suggestion from Linus to move the Kconfig and Makefile bits for AMD and Intel into their respective directories. It also cleans up a couple Kconfig entries to use the newer help attribute instead of ---help--- (complaint from checkpatch). Jerry Snitselaar (2

[PATCH 2/2] iommu/amd: Move Kconfig and Makefile bits down into amd directory

2020-06-12 Thread Jerry Snitselaar
Move AMD Kconfig and Makefile bits down into the amd directory with the rest of the AMD specific files. Cc: Joerg Roedel Cc: Suravee Suthikulpanit Signed-off-by: Jerry Snitselaar --- drivers/iommu/Kconfig | 45 +- drivers/iommu/Makefile | 5

[PATCH 1/2] iommu/vt-d: Move Kconfig and Makefile bits down into intel directory

2020-06-12 Thread Jerry Snitselaar
Move Intel Kconfig and Makefile bits down into intel directory with the rest of the Intel specific files. Cc: Joerg Roedel Cc: Lu Baolu Signed-off-by: Jerry Snitselaar --- drivers/iommu/Kconfig| 86 +--- drivers/iommu/Makefile | 8 +--- drivers

Re: [PATCH] ima: Remove __init annotation from ima_pcrread()

2020-06-07 Thread Jerry Snitselaar
_boot_aggregate() in ima_eventdigest_init()") Reported-by: Linus Torvalds Signed-off-by: Roberto Sassu Reviewed-by: Jerry Snitselaar --- security/integrity/ima/ima_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/integrity/ima/ima_crypto.c b/se

[PATCH] iommu: add include/uapi/linux/iommu.h to MAINTAINERS file

2020-06-05 Thread Jerry Snitselaar
When include/uapi/linux/iommu.h was created it was never added to the file list in MAINTAINERS. Cc: Joerg Roedel Signed-off-by: Jerry Snitselaar --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index e1897ed32930..061648b6e393 100644

[PATCH] iommu: Don't attach deferred device in iommu_group_do_dma_attach

2020-06-04 Thread Jerry Snitselaar
Attaching a deferred device should be delayed until dma api is called. Cc: io...@lists.linux-foundation.org Suggested-by: Joerg Roedel Signed-off-by: Jerry Snitselaar --- If you already have thrown a patch together, then ignore this. Also feel free to swap out the signed-off-by with your's

Re: [PATCH 0/2] iommu: Move Intel and AMD drivers into their own subdirectory

2020-06-03 Thread Jerry Snitselaar
On Thu Jun 04 20, Lu Baolu wrote: Hi Joerg, On 6/2/20 5:26 PM, Joerg Roedel wrote: Hi, two small patches to move the Intel and AMD IOMMU drivers into their own subdirectory under drivers/iommu/ to make the file structure a bit less cluttered. Does the MAINTAINERS file need to update? Best

Re: [PATCH 0/2] iommu: Move Intel and AMD drivers into their own subdirectory

2020-06-03 Thread Jerry Snitselaar
el-pasid.c => intel/pasid.c} (100%) rename drivers/iommu/{intel-svm.c => intel/svm.c} (100%) rename drivers/iommu/{intel-trace.c => intel/trace.c} (100%) -- 2.17.1 Reviewed-by: Jerry Snitselaar

Re: [PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code

2020-06-02 Thread Jerry Snitselaar
On Tue Jun 02 20, Jerry Snitselaar wrote: On Tue Jun 02 20, Joerg Roedel wrote: Hi Jerry, On Mon, Jun 01, 2020 at 05:02:36PM -0700, Jerry Snitselaar wrote: Yeah, that will solve the panic. If you still see the kdump faults, can you please try with the attached diff? I was not able

Re: [PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code

2020-06-02 Thread Jerry Snitselaar
On Tue Jun 02 20, Joerg Roedel wrote: Hi Jerry, On Mon, Jun 01, 2020 at 05:02:36PM -0700, Jerry Snitselaar wrote: Yeah, that will solve the panic. If you still see the kdump faults, can you please try with the attached diff? I was not able to reproduce them in my setup. Regards

Re: [PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code

2020-06-01 Thread Jerry Snitselaar
On Tue Jun 02 20, Lu Baolu wrote: Hi Jerry, On 6/1/20 6:42 PM, Jerry Snitselaar wrote: Hi Joerg, With this patchset, I have an epyc system where if I boot with iommu=nopt and force a dump I will see some io page faults for a nic on the system. The vmcore is harvested and the system reboots

Re: [PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code

2020-06-01 Thread Jerry Snitselaar
On Mon Jun 01 20, Jerry Snitselaar wrote: On Fri May 29 20, Jerry Snitselaar wrote: On Tue Apr 14 20, Joerg Roedel wrote: Hi, here is the second version of this patch-set. The first version with some more introductory text can be found here: https://lore.kernel.org/lkml

Re: [PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code

2020-06-01 Thread Jerry Snitselaar
On Fri May 29 20, Jerry Snitselaar wrote: On Tue Apr 14 20, Joerg Roedel wrote: Hi, here is the second version of this patch-set. The first version with some more introductory text can be found here: https://lore.kernel.org/lkml/20200407183742.4344-1-j...@8bytes.org/ Changes v1->

Re: [PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code

2020-05-29 Thread Jerry Snitselaar
On Tue Apr 14 20, Joerg Roedel wrote: Hi, here is the second version of this patch-set. The first version with some more introductory text can be found here: https://lore.kernel.org/lkml/20200407183742.4344-1-j...@8bytes.org/ Changes v1->v2: * Rebased to v5.7-rc1 *

Re: [PATCH] iommu: Implement deferred domain attachment

2020-05-19 Thread Jerry Snitselaar
On Mon May 18 20, Joerg Roedel wrote: On Fri, May 15, 2020 at 08:23:13PM +0100, Robin Murphy wrote: But that's not what this is; this is (supposed to be) the exact same "don't actually perform the attach yet" logic as before, just restricting it to default domains in the one place that it

Re: [PATCH] iommu: Implement deferred domain attachment

2020-05-18 Thread Jerry Snitselaar
On Mon May 18 20, Joerg Roedel wrote: On Fri, May 15, 2020 at 08:23:13PM +0100, Robin Murphy wrote: But that's not what this is; this is (supposed to be) the exact same "don't actually perform the attach yet" logic as before, just restricting it to default domains in the one place that it

Re: amd kdump failure with iommu=nopt

2020-05-14 Thread Jerry Snitselaar
eferred(domain, dev)) + __iommu_attach_device_no_defer(domain, dev); + + return domain; } /* ___ iommu mailing list io...@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu Yes, that works. Tested-by: Jerry Snitselaar

amd kdump failure with iommu=nopt

2020-05-13 Thread Jerry Snitselaar
We've seen kdump failures with recent kernels (5.5, 5.6, 5.7-rc1) on amd systems when iommu is enabled in translation mode. In the cases so far there has been mpt3sas involved, but I'm also seeing io page faults for ahci right before mpt3sas has an io page fault: [ 15.156620] ahci

Re: [PATCH v4 0/3] Replace private domain with per-group default domain

2020-05-12 Thread Jerry Snitselaar
o use DMA domain iommu/vt-d: Apply per-device dma_ops drivers/iommu/intel-iommu.c | 396 +++- 1 file changed, 26 insertions(+), 370 deletions(-) -- 2.17.1 Reviewed-by: Jerry Snitselaar

Re: [PATCH v4 1/7] ima: Switch to ima_hash_algo for boot aggregate

2020-05-07 Thread Jerry Snitselaar
rieve digest size of unknown algorithms with PCR read") Reported-by: Jerry Snitselaar Suggested-by: James Bottomley Signed-off-by: Roberto Sassu Thank you!  This patch set is now queued in next-integrity-testing during the open window.  Jerry, I assume this works for you.  Could we get your ta

Re: [PATCH] efi/tpm: fix section mismatch warning

2020-04-30 Thread Jerry Snitselaar
On Thu Apr 30 20, Ard Biesheuvel wrote: On Thu, 30 Apr 2020 at 23:21, Arnd Bergmann wrote: On Thu, Apr 30, 2020 at 11:15 PM Jerry Snitselaar wrote: > > On Wed Apr 29 20, Arnd Bergmann wrote: > >Building with gcc-10 causes a harmless warning about a section mismatch: > > &

Re: [PATCH] efi/tpm: fix section mismatch warning

2020-04-30 Thread Jerry Snitselaar
On Wed Apr 29 20, Arnd Bergmann wrote: Building with gcc-10 causes a harmless warning about a section mismatch: WARNING: modpost: vmlinux.o(.text.unlikely+0x5e191): Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap() The

Re: [PATCH] iommu/amd: Check PM_LEVEL_SIZE() condition in locked section

2019-10-18 Thread Jerry Snitselaar
On Fri Oct 18 19, Joerg Roedel wrote: On Thu, Oct 17, 2019 at 07:36:51AM -0400, Qian Cai wrote: > On Oct 16, 2019, at 6:59 PM, Jerry Snitselaar wrote: > > I guess the mode level 6 check is really for other potential callers > increase_address_space, none exist a

Re: [PATCH -next] iommu/amd: fix a warning in increase_address_space

2019-10-16 Thread Jerry Snitselaar
On Wed Oct 16 19, Qian Cai wrote: After the commit 754265bcab78 ("iommu/amd: Fix race in increase_address_space()"), it could still possible trigger a race condition under some heavy memory pressure below. The race to trigger a warning is, CPU0: CPU1: in alloc_pte():

Re: [Patch v7 0/4] Create and consolidate trusted keys subsystem

2019-10-11 Thread Jerry Snitselaar
On Fri Oct 11 19, Jarkko Sakkinen wrote: On Mon, Oct 07, 2019 at 10:55:31AM +0530, Sumit Garg wrote: This patch-set does restructuring of trusted keys code to create and consolidate trusted keys subsystem. Also, patch #2 replaces tpm1_buf code used in security/keys/trusted.c and

Re: [PATCH 0/2] iommu/vt-d: Select PCI_PRI for INTEL_IOMMU_SVM

2019-10-09 Thread Jerry Snitselaar
changed, 31 insertions(+), 36 deletions(-) -- 2.23.0.581.g78d2f28ef7-goog ___ iommu mailing list io...@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu Reviewed-by: Jerry Snitselaar

Re: [PATCH] tpm: add check after commands attribs tab allocation

2019-10-07 Thread Jerry Snitselaar
, 4, nr_commands, GFP_KERNEL); + if (!chip->cc_attrs_tbl) { + rc = -ENOMEM; + goto out; + } rc = tpm_buf_init(, TPM2_ST_NO_SESSIONS, TPM2_CC_GET_CAPABILITY); if (rc) Reviewed-by: Jerry Snitselaar

Re: [PATCH v3 1/2] tpm: Use GFP_KERNEL for allocating struct tpm_buf

2019-10-07 Thread Jerry Snitselaar
. Fixes: a74f8b36352e (tpm: introduce tpm_buf) Signed-off-by: James Bottomley --- Reviewed-by: Jerry Snitselaar

[tip: efi/urgent] efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing

2019-10-07 Thread tip-bot2 for Jerry Snitselaar
The following commit has been merged into the efi/urgent branch of tip: Commit-ID: e658c82be5561412c5e83b5e74e9da4830593f3e Gitweb: https://git.kernel.org/tip/e658c82be5561412c5e83b5e74e9da4830593f3e Author:Jerry Snitselaar AuthorDate:Wed, 02 Oct 2019 18:59:02 +02:00

Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes()

2019-10-04 Thread Jerry Snitselaar
On Fri Oct 04 19, Jerry Snitselaar wrote: On Fri Oct 04 19, James Bottomley wrote: On Fri, 2019-10-04 at 11:33 -0700, Jerry Snitselaar wrote: On Fri Oct 04 19, James Bottomley wrote: On Fri, 2019-10-04 at 21:22 +0300, Jarkko Sakkinen wrote: > On Thu, Oct 03, 2019 at 04:59:37PM -0700, Ja

Re: [PATCH v3 2/2] tpm: Detach page allocation from tpm_buf

2019-10-04 Thread Jerry Snitselaar
On Fri Oct 04 19, James Bottomley wrote: On Fri, 2019-10-04 at 13:37 -0400, Mimi Zohar wrote: On Fri, 2019-10-04 at 09:37 -0700, James Bottomley wrote: > On Thu, 2019-10-03 at 21:51 +0300, Jarkko Sakkinen wrote: > > As has been seen recently, binding the buffer allocation and > > tpm_buf > >

Re: [PATCH v4 0/4] tpm: add update_durations class op to allow override of chip supplied values

2019-10-03 Thread Jerry Snitselaar
On Wed Oct 02 19, Jarkko Sakkinen wrote: On Mon, Sep 02, 2019 at 07:27:32AM -0700, Jerry Snitselaar wrote: We've run into a case where a customer has an STM TPM 1.2 chip (version 1.2.8.28), that is getting into an inconsistent state and they end up getting tpm transmit errors. In really old

Re: [PATCH 3/3] tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations

2019-10-02 Thread Jerry Snitselaar
On Wed Oct 02 19, Jerry Snitselaar wrote: On Wed Oct 02 19, Sasha Levin wrote: On Wed, Oct 02, 2019 at 03:57:58PM +0200, Greg KH wrote: On Wed, Oct 02, 2019 at 04:14:44PM +0300, Jarkko Sakkinen wrote: From: Vadim Sukhomlinov commit db4d8cb9c9f2af71c4d087817160d866ed572cc9 upstream TPM 2.0

Re: [PATCH 3/3] tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations

2019-10-02 Thread Jerry Snitselaar
On Wed Oct 02 19, Sasha Levin wrote: On Wed, Oct 02, 2019 at 03:57:58PM +0200, Greg KH wrote: On Wed, Oct 02, 2019 at 04:14:44PM +0300, Jarkko Sakkinen wrote: From: Vadim Sukhomlinov commit db4d8cb9c9f2af71c4d087817160d866ed572cc9 upstream TPM 2.0 Shutdown involve sending TPM2_Shutdown to

Re: [PATCH v4 0/4] tpm: add update_durations class op to allow override of chip supplied values

2019-09-28 Thread Jerry Snitselaar
On Mon Sep 02 19, Jerry Snitselaar wrote: We've run into a case where a customer has an STM TPM 1.2 chip (version 1.2.8.28), that is getting into an inconsistent state and they end up getting tpm transmit errors. In really old tpm code this wasn't seen because the code that grabbed the duration

Re: [PATCH] tpm: Detach page allocation from tpm_buf

2019-09-28 Thread Jerry Snitselaar
(e.g. power events)> Take allocation out of the tpm_buf framework and make it purely a wrapper for the data buffer. Link: https://patchwork.kernel.org/patch/11146585/ Cc: Mimi Zohar Cc: Jerry Snitselaar Cc: James Bottomley Cc: Sumit Garg Cc: Stefan Berger Signed-off-by: Jarkko Sakki

Re: [PATCH] tpm: Wrap the buffer from the caller to tpm_buf in tpm_send()

2019-09-16 Thread Jerry Snitselaar
On Mon Sep 16 19, Jerry Snitselaar wrote: On Mon Sep 16 19, Jarkko Sakkinen wrote: tpm_send() does not give anymore the result back to the caller. This would require another memcpy(), which kind of tells that the whole approach is somewhat broken. Instead, as Mimi suggested, this commit just

Re: [PATCH] tpm: Wrap the buffer from the caller to tpm_buf in tpm_send()

2019-09-16 Thread Jerry Snitselaar
rc = tpm_transmit_cmd(chip, , 0, "attempting to a send a command"); - tpm_buf_destroy(); + out: tpm_put_ops(chip); return rc; -- 2.20.1 Nothing uses the out label any longer so it should be dropped as well, but other than that... Acked-by: Jerry Snitselaar

Re: [PATCH] tpm: Call tpm_put_ops() when the validation for @digests fails

2019-09-10 Thread Jerry Snitselaar
On Tue Sep 10 19, Jarkko Sakkinen wrote: The chip is not released when the validation for @digests fails. Add tpm_put_ops() to the failure path. Cc: sta...@vger.kernel.org Reported-by: Roberto Sassu Signed-off-by: Jarkko Sakkinen Reviewed-by: Jerry Snitselaar --- drivers/char/tpm/tpm

Re: [PATCH v4] tpm: Parse event log from TPM2 ACPI table

2019-09-03 Thread Jerry Snitselaar
On Fri Aug 30 19, Jordan Hand wrote: For systems with a TPM2 chip which use ACPI to expose event logs, retrieve the crypto-agile event log from the TPM2 ACPI table. The TPM2 table is defined in section 7.3 of the TCG ACPI Specification (see link). The TPM2 table is used by SeaBIOS in place of

Re: [PATCH AUTOSEL 4.19 126/167] tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations

2019-09-03 Thread Jerry Snitselaar
On Tue Sep 03 19, Doug Anderson wrote: Hi, On Tue, Sep 3, 2019 at 9:28 AM Sasha Levin wrote: From: Vadim Sukhomlinov [ Upstream commit db4d8cb9c9f2af71c4d087817160d866ed572cc9 ] TPM 2.0 Shutdown involve sending TPM2_Shutdown to TPM chip and disabling future TPM operations. TPM 1.2

[PATCH v4 2/3] tpm: provide a way to override the chip returned durations

2019-09-02 Thread Jerry Snitselaar
Patch adds method ->update_durations to override returned durations in case TPM chip misbehaves for TPM 1.2 drivers. Cc: Peter Huewe Cc: Jason Gunthorpe Signed-off-by: Alexey Klimov Signed-off-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen --- drivers/char/tpm/tpm1-cmd.c |

[PATCH v4 3/3] tpm_tis: override durations for STM tpm with firmware 1.2.8.28

2019-09-02 Thread Jerry Snitselaar
implementation of ->update_durations method that matches only STM devices with specific firmware version. Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Signed-off-by: Alexey Klimov Signed-off-by: Jerry Snitselaar Reviewed-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c |

[PATCH v4 1/3] tpm: Remove duplicate code from caps_show() in tpm-sysfs.c

2019-09-02 Thread Jerry Snitselaar
-by: Jerry Snitselaar Tested-by: Jerry Snitselaar --- drivers/char/tpm/tpm-sysfs.c | 45 ++-- drivers/char/tpm/tpm.h | 23 -- 2 files changed, 33 insertions(+), 35 deletions(-) diff --git a/drivers/char/tpm/tpm-sysfs.c b/drivers/char/tpm/tpm

[PATCH v4 0/4] tpm: add update_durations class op to allow override of chip supplied values

2019-09-02 Thread Jerry Snitselaar
tpm: Remove duplicate code from caps_show() in tpm-sysfs.c Jerry Snitselaar (2): tpm: provide a way to override the chip returned durations tpm_tis: override durations for STM tpm with firmware 1.2.8.28

Re: [PATCH 1/3 v3] tpm: Remove duplicate code from caps_show() in tpm-sysfs.c

2019-08-30 Thread Jerry Snitselaar
On Thu Aug 29 19, Jerry Snitselaar wrote: From: Jarkko Sakkinen Replace existing TPM 1.x version structs with new structs that consolidate the common parts into a single struct so that code duplication is no longer needed in caps_show(). Cc: Peter Huewe Cc: Jason Gunthorpe Cc: Alexey Klimov

Re: [PATCH] tpm: Remove duplicate code from caps_show() in tpm-sysfs.c

2019-08-30 Thread Jerry Snitselaar
On Thu Aug 29 19, Jarkko Sakkinen wrote: Replace existing TPM 1.x version structs with new structs that consolidate the common parts into a single struct so that code duplication is no longer needed in caps_show(). Cc: Alexey Klimov Cc: Jerry Snitselaar Signed-off-by: Jarkko Sakkinen

[PATCH 2/3 v3] tpm: provide a way to override the chip returned durations

2019-08-29 Thread Jerry Snitselaar
Patch adds method ->update_durations to override returned durations in case TPM chip misbehaves for TPM 1.2 drivers. Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Signed-off-by: Alexey Klimov Signed-off-by: Jerry Snitselaar --- v3: no changes v2: newline cleanup as reques

[PATCH 1/3 v3] tpm: Remove duplicate code from caps_show() in tpm-sysfs.c

2019-08-29 Thread Jerry Snitselaar
-by: Jerry Snitselaar Tested-by: Jerry Snitselaar --- drivers/char/tpm/tpm-sysfs.c | 44 ++-- drivers/char/tpm/tpm.h | 23 --- 2 files changed, 32 insertions(+), 35 deletions(-) diff --git a/drivers/char/tpm/tpm-sysfs.c b/drivers/char/tpm/tpm

[PATCH 0/3 v3] tpm: add update_durations class op to allow override of chip supplied values

2019-08-29 Thread Jerry Snitselaar
We've run into a case where a customer has an STM TPM 1.2 chip (version 1.2.8.28), that is getting into an inconsistent state and they end up getting tpm transmit errors. In really old tpm code this wasn't seen because the code that grabbed the duration values from the chip could fail silently,

[PATCH 3/3 v3] tpm_tis: override durations for STM tpm with firmware 1.2.8.28

2019-08-29 Thread Jerry Snitselaar
implementation of ->update_durations method that matches only STM devices with specific firmware version. Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Signed-off-by: Alexey Klimov Signed-off-by: Jerry Snitselaar --- v3: Rework update_durations to make use of new version structs from

Re: [PATCH] tpm: Remove duplicate code from caps_show() in tpm-sysfs.c

2019-08-29 Thread Jerry Snitselaar
On Thu Aug 29 19, Jarkko Sakkinen wrote: Replace existing TPM 1.x version structs with new structs that consolidate the common parts into a single struct so that code duplication is no longer needed in caps_show(). Cc: Alexey Klimov Cc: Jerry Snitselaar Signed-off-by: Jarkko Sakkinen

  1   2   3   >