Subject: Re: [PATCH 1/1] iommu/vt-d: Skip TE disabling on quirky gfx dedicated iommu

2020-07-22 Thread Miao, Jun
Hi Lu,  limonciello.

Yestoday i just verified the issue with the patch. and just iommu Subscription 
today.This is my test log.

[Hardware info]

 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz   1.20GHz
 ICLSFWR1.R00.3162.A00.1904162000
 BIOS Information

 BIOS Vendo Intel

   Core Version 1.5.2.0 RP01
   Client Silicon Version   0.2.0.15
   Project Version  ICLSFWR1.R00.3162.A00.1904162000
   Build Date   20:00 04/16/2019

   Board Name   IceLake U DDR4 SODIMM PD RVP TLC

   Processor Information
   Name IceLake UL

[S3(mem) failed]

$ echo deep > /sys/power/mem_sleep

$ rtcwake -m mem -s 10

ACPI: EC: interrupt blocked
e1000e :00:1f.6: pci_pm_suspend_noirq+0x0/0x250 returned 0 after 14317
usecs
ec PNP0C09:00: acpi_ec_suspend_noirq+0x0/0x50 returned 0 after 355319 usecs
wdat_wdt wdat_wdt: calling wdat_wdt_suspend_noirq+0x0/0x66 [wdat_wdt] @ 347,
parent: platform
ahci :00:17.0: pci_pm_suspend_noirq+0x0/0x250 returned 0 after 383843
usecs
intel-lpss :00:1e.3: pci_pm_suspend_noirq+0x0/0x250 returned 0 after
384062 usecs
wdat_wdt wdat_wdt: wdat_wdt_suspend_noirq+0x0/0x66 [wdat_wdt] returned 0
after 11 usecs
intel-lpss :00:1e.0: pci_pm_suspend_noirq+0x0/0x250 returned 0 after
414466 usecs
xhci_hcd :00:14.0: pci_pm_suspend_noirq+0x0/0x250 returned 0 after
414023 usecs
sdhci-pci :00:14.5: pci_pm_suspend_noirq+0x0/0x250 returned 0 after
429325 usecs
pcieport :00:07.3: pci_pm_suspend_noirq+0x0/0x250 returned 0 after
429026 usecs
pcieport :00:07.1: pci_pm_suspend_noirq+0x0/0x250 returned 0 after
429675 usecs
pcieport :00:07.2: pci_pm_suspend_noirq+0x0/0x250 returned 0 after
430309 usecs
pcieport :00:07.0: pci_pm_suspend_noirq+0x0/0x250 returned 0 after
430213 usecs
thunderbolt :00:0d.2: pci_pm_suspend_noirq+0x0/0x250 returned 0 after
432523 usecs
thunderbolt :00:0d.3: pci_pm_suspend_noirq+0x0/0x250 returned 0 after
432815 usecs
ACPI: Preparing to enter system sleep state S3
ACPI: EC: event blocked
ACPI: EC: EC stopped
PM: Saving platform NVS memory
Disabling non-boot CPUs ...
smpboot: CPU 1 is now offline
smpboot: CPU 2 is now offline
smpboot: CPU 3 is now offline
smpboot: CPU 4 is now offline
smpboot: CPU 5 is now offline
smpboot: CPU 6 is now offline
smpboot: CPU 7 is now offline
PM: Calling mce_syscore_suspend+0x0/0x20
PM: Calling nmi_suspend+0x0/0x20
PM: Calling timekeeping_suspend+0x0/0x2d0
PM: Calling save_ioapic_entries+0x0/0x90
PM: Calling i8259A_suspend+0x0/0x30
PM: Calling iommu_suspend+0x0/0x1b0
Kernel panic - not syncing: DMAR hardware is malfunctioning
CPU: 0 PID: 347 Comm: rtcwake Not tainted 5.4.0-yocto-standard #124
Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4
SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3162.A00.1904162000 04/16/2019
Call Trace:
  dump_stack+0x59/0x75
  panic+0xff/0x2d4
  iommu_disable_translation+0x88/0x90
  iommu_suspend+0x12f/0x1b0
  syscore_suspend+0x6c/0x220
  suspend_devices_and_enter+0x313/0x840
  pm_suspend+0x30d/0x390
  state_store+0x82/0xf0
  kobj_attr_store+0x12/0x20
  sysfs_kf_write+0x3c/0x50
  kernfs_fop_write+0x11d/0x190
  __vfs_write+0x1b/0x40
  vfs_write+0xc6/0x1d0
  ksys_write+0x5e/0xe0
  __x64_sys_write+0x1a/0x20
  do_syscall_64+0x4d/0x150
  entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f97b8080113
Code: 8b 15 81 bd 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00
64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff
77 55 c3 0f 1f 40 00 48 83 ec 28 48 89 54 24 18
RSP: 002b:7ffcfa6f48b8 EFLAGS: 0246 ORIG_RAX: 0001
RAX: ffda RBX: 0004 RCX: 7f97b8080113
RDX: 0004 RSI: 55e7db03b700 RDI: 0004
RBP: 55e7db03b700 R08: 55e7db03b700 R09: 0004
R10: 0004 R11: 0246 R12: 0004
R13: 55e7db039380 R14: 0004 R15: 7f97b814d700
Kernel Offset: 0x38a0 from 0x8100 (relocation range:
0x8000-0xbfff)
---[ end Kernel panic - not syncing: DMAR hardware is malfunctioning ]---

[S3 successfully with the patch]

sh-5.0# uname -a
Linux intel-x86-64 5.8.0-rc6-yoctodev-standard+ #128 SMP PREEMPT Tue Jul 21 
12:14:39 CST 2020 x86_64 x86_64 x86_64 GNU/Linux
sh-5.0#

sh-5.0# lsmod |grep -i thunderbolt
intel_wmi_thunderbolt16384  0
thunderbolt   167936  0
wmi24576  2 intel_wmi_thunderbolt,wmi_bmof
sh-5.0#
sh-5.0#
sh-5.0#
sh-5.0# modinfo thunderbolt
filename: 
/lib/modules/5.8.0-rc6-yoctodev-standard+/kernel/drivers/thunderbolt/thunderbolt.ko
license:GPL
alias:  pci:v*d*sv*sd*bc0Csc03i40*
alias:  pci:v8086d9A1Dsv*sd*bc*sc*i*
alias:  pci:v8086d9A1Bsv*sd*bc*sc*i*
alias:  pci:v8086d8A0Dsv*sd*bc*sc*i*
alias:  pci:v8086d8A17sv*sd*bc*sc*i*
alias:  

Re: Subject: Re: [PATCH 1/1] iommu/vt-d: Skip TE disabling on quirky gfx dedicated iommu

2020-07-22 Thread Jun Miao

On 7/22/20 11:07 AM, Lu Baolu wrote:

On 7/22/20 11:03 AM, Jun Miao wrote:

On 7/22/20 10:40 AM, Lu Baolu wrote:

Hi Jun,

On 7/22/20 10:26 AM, Miao, Jun wrote:

Kernel panic - not syncing: DMAR hardware is malfunctioning
CPU: 0 PID: 347 Comm: rtcwake Not tainted 5.4.0-yocto-standard #124
Hardware name: Intel Corporation Ice Lake Client Platform/IceLake 
U DDR4

SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3162.A00.1904162000 04/16/2019
Call Trace:
   dump_stack+0x59/0x75
   panic+0xff/0x2d4
   iommu_disable_translation+0x88/0x90
   iommu_suspend+0x12f/0x1b0
   syscore_suspend+0x6c/0x220
   suspend_devices_and_enter+0x313/0x840
   pm_suspend+0x30d/0x390
   state_store+0x82/0xf0
   kobj_attr_store+0x12/0x20
   sysfs_kf_write+0x3c/0x50
   kernfs_fop_write+0x11d/0x190
   __vfs_write+0x1b/0x40
   vfs_write+0xc6/0x1d0
   ksys_write+0x5e/0xe0
   __x64_sys_write+0x1a/0x20
   do_syscall_64+0x4d/0x150
   entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f97b8080113
Code: 8b 15 81 bd 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 
0f 1f 00
64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 
00 f0 ff ff

77 55 c3 0f 1f 40 00 48 83 ec 28 48 89 54 24 18
RSP: 002b:7ffcfa6f48b8 EFLAGS: 0246 ORIG_RAX: 
0001

RAX: ffda RBX: 0004 RCX: 7f97b8080113
RDX: 0004 RSI: 55e7db03b700 RDI: 0004
RBP: 55e7db03b700 R08: 55e7db03b700 R09: 0004
R10: 0004 R11: 0246 R12: 0004
R13: 55e7db039380 R14: 0004 R15: 7f97b814d700
Kernel Offset: 0x38a0 from 0x8100 (relocation range:
0x8000-0xbfff)
---[ end Kernel panic - not syncing: DMAR hardware is 
malfunctioning ]---




Do you mean that system hangs in iommu_disable_translation() without 
this fix.


Yes ,From the call trace and i also read the DMARD_GCMD_RGS is wrong 
without this patch.


Okay! Thanks a lot for confirming this.

Best regards,
baolu


[S3 successfully with the patch]


And, this failure disappeared after you applied this fix?
YES , the log is too long , only head and tail . this failure 
disappereared.


Best regards,
baolu

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: Subject: Re: [PATCH 1/1] iommu/vt-d: Skip TE disabling on quirky gfx dedicated iommu

2020-07-22 Thread Jun Miao

On 7/22/20 10:40 AM, Lu Baolu wrote:

Hi Jun,

On 7/22/20 10:26 AM, Miao, Jun wrote:

Kernel panic - not syncing: DMAR hardware is malfunctioning
CPU: 0 PID: 347 Comm: rtcwake Not tainted 5.4.0-yocto-standard #124
Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U 
DDR4

SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3162.A00.1904162000 04/16/2019
Call Trace:
   dump_stack+0x59/0x75
   panic+0xff/0x2d4
   iommu_disable_translation+0x88/0x90
   iommu_suspend+0x12f/0x1b0
   syscore_suspend+0x6c/0x220
   suspend_devices_and_enter+0x313/0x840
   pm_suspend+0x30d/0x390
   state_store+0x82/0xf0
   kobj_attr_store+0x12/0x20
   sysfs_kf_write+0x3c/0x50
   kernfs_fop_write+0x11d/0x190
   __vfs_write+0x1b/0x40
   vfs_write+0xc6/0x1d0
   ksys_write+0x5e/0xe0
   __x64_sys_write+0x1a/0x20
   do_syscall_64+0x4d/0x150
   entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f97b8080113
Code: 8b 15 81 bd 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 
0f 1f 00
64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 00 
f0 ff ff

77 55 c3 0f 1f 40 00 48 83 ec 28 48 89 54 24 18
RSP: 002b:7ffcfa6f48b8 EFLAGS: 0246 ORIG_RAX: 0001
RAX: ffda RBX: 0004 RCX: 7f97b8080113
RDX: 0004 RSI: 55e7db03b700 RDI: 0004
RBP: 55e7db03b700 R08: 55e7db03b700 R09: 0004
R10: 0004 R11: 0246 R12: 0004
R13: 55e7db039380 R14: 0004 R15: 7f97b814d700
Kernel Offset: 0x38a0 from 0x8100 (relocation range:
0x8000-0xbfff)
---[ end Kernel panic - not syncing: DMAR hardware is 
malfunctioning ]---




Do you mean that system hangs in iommu_disable_translation() without 
this fix.


Yes ,From the call trace and i also read the DMARD_GCMD_RGS is wrong 
without this patch.

[S3 successfully with the patch]


And, this failure disappeared after you applied this fix?

Best regards,
baolu

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: Subject: Re: [PATCH 1/1] iommu/vt-d: Skip TE disabling on quirky gfx dedicated iommu

2020-07-21 Thread Lu Baolu

On 7/22/20 11:03 AM, Jun Miao wrote:

On 7/22/20 10:40 AM, Lu Baolu wrote:

Hi Jun,

On 7/22/20 10:26 AM, Miao, Jun wrote:

Kernel panic - not syncing: DMAR hardware is malfunctioning
CPU: 0 PID: 347 Comm: rtcwake Not tainted 5.4.0-yocto-standard #124
Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U 
DDR4

SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3162.A00.1904162000 04/16/2019
Call Trace:
   dump_stack+0x59/0x75
   panic+0xff/0x2d4
   iommu_disable_translation+0x88/0x90
   iommu_suspend+0x12f/0x1b0
   syscore_suspend+0x6c/0x220
   suspend_devices_and_enter+0x313/0x840
   pm_suspend+0x30d/0x390
   state_store+0x82/0xf0
   kobj_attr_store+0x12/0x20
   sysfs_kf_write+0x3c/0x50
   kernfs_fop_write+0x11d/0x190
   __vfs_write+0x1b/0x40
   vfs_write+0xc6/0x1d0
   ksys_write+0x5e/0xe0
   __x64_sys_write+0x1a/0x20
   do_syscall_64+0x4d/0x150
   entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f97b8080113
Code: 8b 15 81 bd 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 
0f 1f 00
64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 00 
f0 ff ff

77 55 c3 0f 1f 40 00 48 83 ec 28 48 89 54 24 18
RSP: 002b:7ffcfa6f48b8 EFLAGS: 0246 ORIG_RAX: 0001
RAX: ffda RBX: 0004 RCX: 7f97b8080113
RDX: 0004 RSI: 55e7db03b700 RDI: 0004
RBP: 55e7db03b700 R08: 55e7db03b700 R09: 0004
R10: 0004 R11: 0246 R12: 0004
R13: 55e7db039380 R14: 0004 R15: 7f97b814d700
Kernel Offset: 0x38a0 from 0x8100 (relocation range:
0x8000-0xbfff)
---[ end Kernel panic - not syncing: DMAR hardware is 
malfunctioning ]---




Do you mean that system hangs in iommu_disable_translation() without 
this fix.


Yes ,From the call trace and i also read the DMARD_GCMD_RGS is wrong 
without this patch.


Okay! Thanks a lot for confirming this.

Best regards,
baolu


[S3 successfully with the patch]


And, this failure disappeared after you applied this fix?

Best regards,
baolu

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: Subject: Re: [PATCH 1/1] iommu/vt-d: Skip TE disabling on quirky gfx dedicated iommu

2020-07-21 Thread Lu Baolu

Hi Jun,

On 7/22/20 10:26 AM, Miao, Jun wrote:

Kernel panic - not syncing: DMAR hardware is malfunctioning
CPU: 0 PID: 347 Comm: rtcwake Not tainted 5.4.0-yocto-standard #124
Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4
SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3162.A00.1904162000 04/16/2019
Call Trace:
   dump_stack+0x59/0x75
   panic+0xff/0x2d4
   iommu_disable_translation+0x88/0x90
   iommu_suspend+0x12f/0x1b0
   syscore_suspend+0x6c/0x220
   suspend_devices_and_enter+0x313/0x840
   pm_suspend+0x30d/0x390
   state_store+0x82/0xf0
   kobj_attr_store+0x12/0x20
   sysfs_kf_write+0x3c/0x50
   kernfs_fop_write+0x11d/0x190
   __vfs_write+0x1b/0x40
   vfs_write+0xc6/0x1d0
   ksys_write+0x5e/0xe0
   __x64_sys_write+0x1a/0x20
   do_syscall_64+0x4d/0x150
   entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f97b8080113
Code: 8b 15 81 bd 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00
64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff
77 55 c3 0f 1f 40 00 48 83 ec 28 48 89 54 24 18
RSP: 002b:7ffcfa6f48b8 EFLAGS: 0246 ORIG_RAX: 0001
RAX: ffda RBX: 0004 RCX: 7f97b8080113
RDX: 0004 RSI: 55e7db03b700 RDI: 0004
RBP: 55e7db03b700 R08: 55e7db03b700 R09: 0004
R10: 0004 R11: 0246 R12: 0004
R13: 55e7db039380 R14: 0004 R15: 7f97b814d700
Kernel Offset: 0x38a0 from 0x8100 (relocation range:
0x8000-0xbfff)
---[ end Kernel panic - not syncing: DMAR hardware is malfunctioning ]---




Do you mean that system hangs in iommu_disable_translation() without 
this fix.



[S3 successfully with the patch]


And, this failure disappeared after you applied this fix?

Best regards,
baolu
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu