[Kernel-packages] [Bug 1799388] Re: TM (Hardware Transactional Memory) instructions halt application on baremetal POWER9 DD2.1

2019-07-24 Thread Brad Figg
** Tags added: cscc

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1799388

Title:
  TM (Hardware Transactional Memory) instructions halt application on
  baremetal POWER9 DD2.1

Status in The Ubuntu-power-systems project:
  Fix Released
Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Bionic:
  Fix Released
Status in linux source package in Cosmic:
  Fix Released

Bug description:
  == Comment: #0 - Michael Ranweiler  - 2018-10-15 
08:55:55 ==
  +++ This bug was initially created as a clone of Bug #167756 +++

  ---Problem Description---
  TM (Hardware Transactional Memory) instructions halt application on baremetal 
POWER9 DD2.1
   
  Contact Information = grom...@br.ibm.com 
   
  ---Additional Hardware Info---
  POWER9 DD2.1 (pvr 004e 1201) baremetal. Witherspoon. 

   
  Machine Type = POWER9 DD2.1 (pvr 004e 1201) baremetal 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   Currently TM (Hardware Transactional Memory) on baremetal POWER9 DD2.1 (pvr 
004e 1201) with the latest firmware [1] (Firmware level [2] was also tested 
with the same result) and running Linux from Linus' upstream tree [3] or 
powerpc/next branch [4] is not working as expected. Once a TM instruction is 
executed in a process (any instruction), the process halts completely and has 
to be killed.

  A simple test case is to execute a 'tend.' which accordingly to POWER8
  behaviour and the ISA v3.00 if executed "in Non-transactional state is
  treated as a no-op." [5]. It means that the instruction in the test
  case below should be treated simply as a 'nop' instruction and the
  process would terminate normally but instead it halts and the process
  never terminates:

  root@io83:~/gromero# cat t.c
  int main() { asm ("tend.;"); }
  root@io83:~/gromero# make t
  make: 't' is up to date.
  root@io83:~/gromero# ./t
  ^C
  

  Ubuntu stock kernel 4.15.0-20-generic was also tested with the same
  result.

  I confirmed with Erich Hauptli (FW team) that FW stack levels [1]
  contain all the TM fixes we have at the moment.

  Thus, that issue affects any application that uses TM on a baremetal
  POWER9 DD2.1 (pvr 004e 1201).

  
  [1] 
  IBM-witherspoon-ibm-OP9_v1.19_1.160
  op-build-v1.21.2-255-g6ad1636-dirty
  buildroot-2017.11-5-g65679be
  skiboot-v5.10.5-op910-1
  hostboot-ed53939
  linux-4.14.24-openpower1-paed97e8
  petitboot-v1.6.6-p41a158a
  machine-xml-4af
  occ-ef5d466
  hostboot-binaries-6a92b6d
  capp-ucode-p9-dd2-v3
  sbe-7e02c23

  [2]
  open-power-witherspoon-v1.22-82-gebe1295-dirty
buildroot-2018.02.1-6-ga8d11267c2
skiboot-v6.0-rc1
hostboot-d9bf361-p6755b85
occ-f741c41
linux-4.16.7-openpower1-p945838d
petitboot-v1.7.1-pd695626
machine-xml-7cd20a6
hostboot-binaries-53aece6
capp-ucode-p9-dd2-v4
sbe-8e0105e
hcode-hw050318a.op920

  [3] https://github.com/torvalds/linux.git (master)
  [4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git (next) 
  [5] Power ISA - Book II, p. 894
   
  Stack trace output:
   no
   
  Oops output:
   no
   
  Userspace tool common name: any tool using TM instruction set 

  Userspace rpm: not relevant 
   
  The userspace tool has the following bit modes: 64-bit 
   
  System Dump Info:
The system is not configured to capture a system dump.

  Userspace tool obtained from project website:  na 
   
  *Additional Instructions for grom...@br.ibm.com: 
  -Attach sysctl -a output output to the bug.
  -Attach ltrace and strace of userspace application.

  
  The following patch fixes this issue:

  http://patchwork.ozlabs.org/patch/968375/

  Author: Michael Neuling 
  Date:   Tue Sep 11 13:07:56 2018 +1000

  powerpc/tm: Fix HFSCR bit for no suspend case
  
  Currently on P9N DD2.1 we end up taking infinite TM facility
  unavailable exceptions on the first TM usage by userspace.
  
  In the special case of TM no suspend (P9N DD2.1), Linux is told TM is
  off via CPU dt-ftrs but told to (partially) use it via
  OPAL_REINIT_CPUS_TM_SUSPEND_DISABLED. So HFSCR[TM] will be off from
  dt-ftrs but we need to turn it on for the no suspend case.
  
  This patch fixes this by enabling HFSCR TM in this case.
  
  Cc: sta...@vger.kernel.org # 4.15+
  Signed-off-by: Michael Neuling 

  == Comment: #2 - Michael Ranweiler  - 2018-10-15 
13:52:13 ==
  This is in the powerpc -next branch:
  
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next=dd9a8c5a87395b6f05552c3b44e42fdc95760552

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1799388/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : 

[Kernel-packages] [Bug 1799388] Re: TM (Hardware Transactional Memory) instructions halt application on baremetal POWER9 DD2.1

2019-02-18 Thread Manoj Iyer
** Changed in: ubuntu-power-systems
   Status: Incomplete => Fix Released

** Changed in: linux (Ubuntu)
   Status: Incomplete => Fix Released

** Changed in: linux (Ubuntu Bionic)
   Status: Incomplete => Fix Released

** Changed in: linux (Ubuntu Cosmic)
   Status: Incomplete => Fix Released

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1799388

Title:
  TM (Hardware Transactional Memory) instructions halt application on
  baremetal POWER9 DD2.1

Status in The Ubuntu-power-systems project:
  Fix Released
Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Bionic:
  Fix Released
Status in linux source package in Cosmic:
  Fix Released

Bug description:
  == Comment: #0 - Michael Ranweiler  - 2018-10-15 
08:55:55 ==
  +++ This bug was initially created as a clone of Bug #167756 +++

  ---Problem Description---
  TM (Hardware Transactional Memory) instructions halt application on baremetal 
POWER9 DD2.1
   
  Contact Information = grom...@br.ibm.com 
   
  ---Additional Hardware Info---
  POWER9 DD2.1 (pvr 004e 1201) baremetal. Witherspoon. 

   
  Machine Type = POWER9 DD2.1 (pvr 004e 1201) baremetal 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   Currently TM (Hardware Transactional Memory) on baremetal POWER9 DD2.1 (pvr 
004e 1201) with the latest firmware [1] (Firmware level [2] was also tested 
with the same result) and running Linux from Linus' upstream tree [3] or 
powerpc/next branch [4] is not working as expected. Once a TM instruction is 
executed in a process (any instruction), the process halts completely and has 
to be killed.

  A simple test case is to execute a 'tend.' which accordingly to POWER8
  behaviour and the ISA v3.00 if executed "in Non-transactional state is
  treated as a no-op." [5]. It means that the instruction in the test
  case below should be treated simply as a 'nop' instruction and the
  process would terminate normally but instead it halts and the process
  never terminates:

  root@io83:~/gromero# cat t.c
  int main() { asm ("tend.;"); }
  root@io83:~/gromero# make t
  make: 't' is up to date.
  root@io83:~/gromero# ./t
  ^C
  

  Ubuntu stock kernel 4.15.0-20-generic was also tested with the same
  result.

  I confirmed with Erich Hauptli (FW team) that FW stack levels [1]
  contain all the TM fixes we have at the moment.

  Thus, that issue affects any application that uses TM on a baremetal
  POWER9 DD2.1 (pvr 004e 1201).

  
  [1] 
  IBM-witherspoon-ibm-OP9_v1.19_1.160
  op-build-v1.21.2-255-g6ad1636-dirty
  buildroot-2017.11-5-g65679be
  skiboot-v5.10.5-op910-1
  hostboot-ed53939
  linux-4.14.24-openpower1-paed97e8
  petitboot-v1.6.6-p41a158a
  machine-xml-4af
  occ-ef5d466
  hostboot-binaries-6a92b6d
  capp-ucode-p9-dd2-v3
  sbe-7e02c23

  [2]
  open-power-witherspoon-v1.22-82-gebe1295-dirty
buildroot-2018.02.1-6-ga8d11267c2
skiboot-v6.0-rc1
hostboot-d9bf361-p6755b85
occ-f741c41
linux-4.16.7-openpower1-p945838d
petitboot-v1.7.1-pd695626
machine-xml-7cd20a6
hostboot-binaries-53aece6
capp-ucode-p9-dd2-v4
sbe-8e0105e
hcode-hw050318a.op920

  [3] https://github.com/torvalds/linux.git (master)
  [4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git (next) 
  [5] Power ISA - Book II, p. 894
   
  Stack trace output:
   no
   
  Oops output:
   no
   
  Userspace tool common name: any tool using TM instruction set 

  Userspace rpm: not relevant 
   
  The userspace tool has the following bit modes: 64-bit 
   
  System Dump Info:
The system is not configured to capture a system dump.

  Userspace tool obtained from project website:  na 
   
  *Additional Instructions for grom...@br.ibm.com: 
  -Attach sysctl -a output output to the bug.
  -Attach ltrace and strace of userspace application.

  
  The following patch fixes this issue:

  http://patchwork.ozlabs.org/patch/968375/

  Author: Michael Neuling 
  Date:   Tue Sep 11 13:07:56 2018 +1000

  powerpc/tm: Fix HFSCR bit for no suspend case
  
  Currently on P9N DD2.1 we end up taking infinite TM facility
  unavailable exceptions on the first TM usage by userspace.
  
  In the special case of TM no suspend (P9N DD2.1), Linux is told TM is
  off via CPU dt-ftrs but told to (partially) use it via
  OPAL_REINIT_CPUS_TM_SUSPEND_DISABLED. So HFSCR[TM] will be off from
  dt-ftrs but we need to turn it on for the no suspend case.
  
  This patch fixes this by enabling HFSCR TM in this case.
  
  Cc: sta...@vger.kernel.org # 4.15+
  Signed-off-by: Michael Neuling 

  == Comment: #2 - Michael Ranweiler  - 2018-10-15 
13:52:13 ==
  This is in the powerpc -next branch:
  

[Kernel-packages] [Bug 1799388] Re: TM (Hardware Transactional Memory) instructions halt application on baremetal POWER9 DD2.1

2019-01-30 Thread Manoj Iyer
This patch was picked up in Cosmic
http://bugs.launchpad.net/bugs/1810820 via updates, and should be
available in the latest bionic-hwe kernel. Could you please test with
the bionic-hwe kernel to see if this is still an issue?

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1799388

Title:
  TM (Hardware Transactional Memory) instructions halt application on
  baremetal POWER9 DD2.1

Status in The Ubuntu-power-systems project:
  Incomplete
Status in linux package in Ubuntu:
  Incomplete
Status in linux source package in Bionic:
  Incomplete
Status in linux source package in Cosmic:
  Incomplete

Bug description:
  == Comment: #0 - Michael Ranweiler  - 2018-10-15 
08:55:55 ==
  +++ This bug was initially created as a clone of Bug #167756 +++

  ---Problem Description---
  TM (Hardware Transactional Memory) instructions halt application on baremetal 
POWER9 DD2.1
   
  Contact Information = grom...@br.ibm.com 
   
  ---Additional Hardware Info---
  POWER9 DD2.1 (pvr 004e 1201) baremetal. Witherspoon. 

   
  Machine Type = POWER9 DD2.1 (pvr 004e 1201) baremetal 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   Currently TM (Hardware Transactional Memory) on baremetal POWER9 DD2.1 (pvr 
004e 1201) with the latest firmware [1] (Firmware level [2] was also tested 
with the same result) and running Linux from Linus' upstream tree [3] or 
powerpc/next branch [4] is not working as expected. Once a TM instruction is 
executed in a process (any instruction), the process halts completely and has 
to be killed.

  A simple test case is to execute a 'tend.' which accordingly to POWER8
  behaviour and the ISA v3.00 if executed "in Non-transactional state is
  treated as a no-op." [5]. It means that the instruction in the test
  case below should be treated simply as a 'nop' instruction and the
  process would terminate normally but instead it halts and the process
  never terminates:

  root@io83:~/gromero# cat t.c
  int main() { asm ("tend.;"); }
  root@io83:~/gromero# make t
  make: 't' is up to date.
  root@io83:~/gromero# ./t
  ^C
  

  Ubuntu stock kernel 4.15.0-20-generic was also tested with the same
  result.

  I confirmed with Erich Hauptli (FW team) that FW stack levels [1]
  contain all the TM fixes we have at the moment.

  Thus, that issue affects any application that uses TM on a baremetal
  POWER9 DD2.1 (pvr 004e 1201).

  
  [1] 
  IBM-witherspoon-ibm-OP9_v1.19_1.160
  op-build-v1.21.2-255-g6ad1636-dirty
  buildroot-2017.11-5-g65679be
  skiboot-v5.10.5-op910-1
  hostboot-ed53939
  linux-4.14.24-openpower1-paed97e8
  petitboot-v1.6.6-p41a158a
  machine-xml-4af
  occ-ef5d466
  hostboot-binaries-6a92b6d
  capp-ucode-p9-dd2-v3
  sbe-7e02c23

  [2]
  open-power-witherspoon-v1.22-82-gebe1295-dirty
buildroot-2018.02.1-6-ga8d11267c2
skiboot-v6.0-rc1
hostboot-d9bf361-p6755b85
occ-f741c41
linux-4.16.7-openpower1-p945838d
petitboot-v1.7.1-pd695626
machine-xml-7cd20a6
hostboot-binaries-53aece6
capp-ucode-p9-dd2-v4
sbe-8e0105e
hcode-hw050318a.op920

  [3] https://github.com/torvalds/linux.git (master)
  [4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git (next) 
  [5] Power ISA - Book II, p. 894
   
  Stack trace output:
   no
   
  Oops output:
   no
   
  Userspace tool common name: any tool using TM instruction set 

  Userspace rpm: not relevant 
   
  The userspace tool has the following bit modes: 64-bit 
   
  System Dump Info:
The system is not configured to capture a system dump.

  Userspace tool obtained from project website:  na 
   
  *Additional Instructions for grom...@br.ibm.com: 
  -Attach sysctl -a output output to the bug.
  -Attach ltrace and strace of userspace application.

  
  The following patch fixes this issue:

  http://patchwork.ozlabs.org/patch/968375/

  Author: Michael Neuling 
  Date:   Tue Sep 11 13:07:56 2018 +1000

  powerpc/tm: Fix HFSCR bit for no suspend case
  
  Currently on P9N DD2.1 we end up taking infinite TM facility
  unavailable exceptions on the first TM usage by userspace.
  
  In the special case of TM no suspend (P9N DD2.1), Linux is told TM is
  off via CPU dt-ftrs but told to (partially) use it via
  OPAL_REINIT_CPUS_TM_SUSPEND_DISABLED. So HFSCR[TM] will be off from
  dt-ftrs but we need to turn it on for the no suspend case.
  
  This patch fixes this by enabling HFSCR TM in this case.
  
  Cc: sta...@vger.kernel.org # 4.15+
  Signed-off-by: Michael Neuling 

  == Comment: #2 - Michael Ranweiler  - 2018-10-15 
13:52:13 ==
  This is in the powerpc -next branch:
  
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next=dd9a8c5a87395b6f05552c3b44e42fdc95760552

To manage notifications 

[Kernel-packages] [Bug 1799388] Re: TM (Hardware Transactional Memory) instructions halt application on baremetal POWER9 DD2.1

2019-01-08 Thread Joseph Salisbury
** Changed in: linux (Ubuntu)
 Assignee: Joseph Salisbury (jsalisbury) => Canonical Kernel Team 
(canonical-kernel-team)

** Changed in: linux (Ubuntu Bionic)
 Assignee: Joseph Salisbury (jsalisbury) => Canonical Kernel Team 
(canonical-kernel-team)

** Changed in: linux (Ubuntu Cosmic)
 Assignee: Joseph Salisbury (jsalisbury) => Canonical Kernel Team 
(canonical-kernel-team)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1799388

Title:
  TM (Hardware Transactional Memory) instructions halt application on
  baremetal POWER9 DD2.1

Status in The Ubuntu-power-systems project:
  Incomplete
Status in linux package in Ubuntu:
  Incomplete
Status in linux source package in Bionic:
  Incomplete
Status in linux source package in Cosmic:
  Incomplete

Bug description:
  == Comment: #0 - Michael Ranweiler  - 2018-10-15 
08:55:55 ==
  +++ This bug was initially created as a clone of Bug #167756 +++

  ---Problem Description---
  TM (Hardware Transactional Memory) instructions halt application on baremetal 
POWER9 DD2.1
   
  Contact Information = grom...@br.ibm.com 
   
  ---Additional Hardware Info---
  POWER9 DD2.1 (pvr 004e 1201) baremetal. Witherspoon. 

   
  Machine Type = POWER9 DD2.1 (pvr 004e 1201) baremetal 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   Currently TM (Hardware Transactional Memory) on baremetal POWER9 DD2.1 (pvr 
004e 1201) with the latest firmware [1] (Firmware level [2] was also tested 
with the same result) and running Linux from Linus' upstream tree [3] or 
powerpc/next branch [4] is not working as expected. Once a TM instruction is 
executed in a process (any instruction), the process halts completely and has 
to be killed.

  A simple test case is to execute a 'tend.' which accordingly to POWER8
  behaviour and the ISA v3.00 if executed "in Non-transactional state is
  treated as a no-op." [5]. It means that the instruction in the test
  case below should be treated simply as a 'nop' instruction and the
  process would terminate normally but instead it halts and the process
  never terminates:

  root@io83:~/gromero# cat t.c
  int main() { asm ("tend.;"); }
  root@io83:~/gromero# make t
  make: 't' is up to date.
  root@io83:~/gromero# ./t
  ^C
  

  Ubuntu stock kernel 4.15.0-20-generic was also tested with the same
  result.

  I confirmed with Erich Hauptli (FW team) that FW stack levels [1]
  contain all the TM fixes we have at the moment.

  Thus, that issue affects any application that uses TM on a baremetal
  POWER9 DD2.1 (pvr 004e 1201).

  
  [1] 
  IBM-witherspoon-ibm-OP9_v1.19_1.160
  op-build-v1.21.2-255-g6ad1636-dirty
  buildroot-2017.11-5-g65679be
  skiboot-v5.10.5-op910-1
  hostboot-ed53939
  linux-4.14.24-openpower1-paed97e8
  petitboot-v1.6.6-p41a158a
  machine-xml-4af
  occ-ef5d466
  hostboot-binaries-6a92b6d
  capp-ucode-p9-dd2-v3
  sbe-7e02c23

  [2]
  open-power-witherspoon-v1.22-82-gebe1295-dirty
buildroot-2018.02.1-6-ga8d11267c2
skiboot-v6.0-rc1
hostboot-d9bf361-p6755b85
occ-f741c41
linux-4.16.7-openpower1-p945838d
petitboot-v1.7.1-pd695626
machine-xml-7cd20a6
hostboot-binaries-53aece6
capp-ucode-p9-dd2-v4
sbe-8e0105e
hcode-hw050318a.op920

  [3] https://github.com/torvalds/linux.git (master)
  [4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git (next) 
  [5] Power ISA - Book II, p. 894
   
  Stack trace output:
   no
   
  Oops output:
   no
   
  Userspace tool common name: any tool using TM instruction set 

  Userspace rpm: not relevant 
   
  The userspace tool has the following bit modes: 64-bit 
   
  System Dump Info:
The system is not configured to capture a system dump.

  Userspace tool obtained from project website:  na 
   
  *Additional Instructions for grom...@br.ibm.com: 
  -Attach sysctl -a output output to the bug.
  -Attach ltrace and strace of userspace application.

  
  The following patch fixes this issue:

  http://patchwork.ozlabs.org/patch/968375/

  Author: Michael Neuling 
  Date:   Tue Sep 11 13:07:56 2018 +1000

  powerpc/tm: Fix HFSCR bit for no suspend case
  
  Currently on P9N DD2.1 we end up taking infinite TM facility
  unavailable exceptions on the first TM usage by userspace.
  
  In the special case of TM no suspend (P9N DD2.1), Linux is told TM is
  off via CPU dt-ftrs but told to (partially) use it via
  OPAL_REINIT_CPUS_TM_SUSPEND_DISABLED. So HFSCR[TM] will be off from
  dt-ftrs but we need to turn it on for the no suspend case.
  
  This patch fixes this by enabling HFSCR TM in this case.
  
  Cc: sta...@vger.kernel.org # 4.15+
  Signed-off-by: Michael Neuling 

  == Comment: #2 - Michael Ranweiler  - 2018-10-15 
13:52:13 ==
  This is in the powerpc 

[Kernel-packages] [Bug 1799388] Re: TM (Hardware Transactional Memory) instructions halt application on baremetal POWER9 DD2.1

2018-11-19 Thread Andrew Cloke
Lowering to medium priority due to lack of activity.

** Changed in: ubuntu-power-systems
   Importance: High => Medium

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1799388

Title:
  TM (Hardware Transactional Memory) instructions halt application on
  baremetal POWER9 DD2.1

Status in The Ubuntu-power-systems project:
  Incomplete
Status in linux package in Ubuntu:
  Incomplete
Status in linux source package in Bionic:
  Incomplete
Status in linux source package in Cosmic:
  Incomplete

Bug description:
  == Comment: #0 - Michael Ranweiler  - 2018-10-15 
08:55:55 ==
  +++ This bug was initially created as a clone of Bug #167756 +++

  ---Problem Description---
  TM (Hardware Transactional Memory) instructions halt application on baremetal 
POWER9 DD2.1
   
  Contact Information = grom...@br.ibm.com 
   
  ---Additional Hardware Info---
  POWER9 DD2.1 (pvr 004e 1201) baremetal. Witherspoon. 

   
  Machine Type = POWER9 DD2.1 (pvr 004e 1201) baremetal 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   Currently TM (Hardware Transactional Memory) on baremetal POWER9 DD2.1 (pvr 
004e 1201) with the latest firmware [1] (Firmware level [2] was also tested 
with the same result) and running Linux from Linus' upstream tree [3] or 
powerpc/next branch [4] is not working as expected. Once a TM instruction is 
executed in a process (any instruction), the process halts completely and has 
to be killed.

  A simple test case is to execute a 'tend.' which accordingly to POWER8
  behaviour and the ISA v3.00 if executed "in Non-transactional state is
  treated as a no-op." [5]. It means that the instruction in the test
  case below should be treated simply as a 'nop' instruction and the
  process would terminate normally but instead it halts and the process
  never terminates:

  root@io83:~/gromero# cat t.c
  int main() { asm ("tend.;"); }
  root@io83:~/gromero# make t
  make: 't' is up to date.
  root@io83:~/gromero# ./t
  ^C
  

  Ubuntu stock kernel 4.15.0-20-generic was also tested with the same
  result.

  I confirmed with Erich Hauptli (FW team) that FW stack levels [1]
  contain all the TM fixes we have at the moment.

  Thus, that issue affects any application that uses TM on a baremetal
  POWER9 DD2.1 (pvr 004e 1201).

  
  [1] 
  IBM-witherspoon-ibm-OP9_v1.19_1.160
  op-build-v1.21.2-255-g6ad1636-dirty
  buildroot-2017.11-5-g65679be
  skiboot-v5.10.5-op910-1
  hostboot-ed53939
  linux-4.14.24-openpower1-paed97e8
  petitboot-v1.6.6-p41a158a
  machine-xml-4af
  occ-ef5d466
  hostboot-binaries-6a92b6d
  capp-ucode-p9-dd2-v3
  sbe-7e02c23

  [2]
  open-power-witherspoon-v1.22-82-gebe1295-dirty
buildroot-2018.02.1-6-ga8d11267c2
skiboot-v6.0-rc1
hostboot-d9bf361-p6755b85
occ-f741c41
linux-4.16.7-openpower1-p945838d
petitboot-v1.7.1-pd695626
machine-xml-7cd20a6
hostboot-binaries-53aece6
capp-ucode-p9-dd2-v4
sbe-8e0105e
hcode-hw050318a.op920

  [3] https://github.com/torvalds/linux.git (master)
  [4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git (next) 
  [5] Power ISA - Book II, p. 894
   
  Stack trace output:
   no
   
  Oops output:
   no
   
  Userspace tool common name: any tool using TM instruction set 

  Userspace rpm: not relevant 
   
  The userspace tool has the following bit modes: 64-bit 
   
  System Dump Info:
The system is not configured to capture a system dump.

  Userspace tool obtained from project website:  na 
   
  *Additional Instructions for grom...@br.ibm.com: 
  -Attach sysctl -a output output to the bug.
  -Attach ltrace and strace of userspace application.

  
  The following patch fixes this issue:

  http://patchwork.ozlabs.org/patch/968375/

  Author: Michael Neuling 
  Date:   Tue Sep 11 13:07:56 2018 +1000

  powerpc/tm: Fix HFSCR bit for no suspend case
  
  Currently on P9N DD2.1 we end up taking infinite TM facility
  unavailable exceptions on the first TM usage by userspace.
  
  In the special case of TM no suspend (P9N DD2.1), Linux is told TM is
  off via CPU dt-ftrs but told to (partially) use it via
  OPAL_REINIT_CPUS_TM_SUSPEND_DISABLED. So HFSCR[TM] will be off from
  dt-ftrs but we need to turn it on for the no suspend case.
  
  This patch fixes this by enabling HFSCR TM in this case.
  
  Cc: sta...@vger.kernel.org # 4.15+
  Signed-off-by: Michael Neuling 

  == Comment: #2 - Michael Ranweiler  - 2018-10-15 
13:52:13 ==
  This is in the powerpc -next branch:
  
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next=dd9a8c5a87395b6f05552c3b44e42fdc95760552

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1799388/+subscriptions

-- 

[Kernel-packages] [Bug 1799388] Re: TM (Hardware Transactional Memory) instructions halt application on baremetal POWER9 DD2.1

2018-11-14 Thread Joseph Salisbury
** Changed in: linux (Ubuntu)
   Status: In Progress => Incomplete

** Changed in: linux (Ubuntu Bionic)
   Status: In Progress => Incomplete

** Changed in: linux (Ubuntu Cosmic)
   Status: In Progress => Incomplete

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1799388

Title:
  TM (Hardware Transactional Memory) instructions halt application on
  baremetal POWER9 DD2.1

Status in The Ubuntu-power-systems project:
  Incomplete
Status in linux package in Ubuntu:
  Incomplete
Status in linux source package in Bionic:
  Incomplete
Status in linux source package in Cosmic:
  Incomplete

Bug description:
  == Comment: #0 - Michael Ranweiler  - 2018-10-15 
08:55:55 ==
  +++ This bug was initially created as a clone of Bug #167756 +++

  ---Problem Description---
  TM (Hardware Transactional Memory) instructions halt application on baremetal 
POWER9 DD2.1
   
  Contact Information = grom...@br.ibm.com 
   
  ---Additional Hardware Info---
  POWER9 DD2.1 (pvr 004e 1201) baremetal. Witherspoon. 

   
  Machine Type = POWER9 DD2.1 (pvr 004e 1201) baremetal 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   Currently TM (Hardware Transactional Memory) on baremetal POWER9 DD2.1 (pvr 
004e 1201) with the latest firmware [1] (Firmware level [2] was also tested 
with the same result) and running Linux from Linus' upstream tree [3] or 
powerpc/next branch [4] is not working as expected. Once a TM instruction is 
executed in a process (any instruction), the process halts completely and has 
to be killed.

  A simple test case is to execute a 'tend.' which accordingly to POWER8
  behaviour and the ISA v3.00 if executed "in Non-transactional state is
  treated as a no-op." [5]. It means that the instruction in the test
  case below should be treated simply as a 'nop' instruction and the
  process would terminate normally but instead it halts and the process
  never terminates:

  root@io83:~/gromero# cat t.c
  int main() { asm ("tend.;"); }
  root@io83:~/gromero# make t
  make: 't' is up to date.
  root@io83:~/gromero# ./t
  ^C
  

  Ubuntu stock kernel 4.15.0-20-generic was also tested with the same
  result.

  I confirmed with Erich Hauptli (FW team) that FW stack levels [1]
  contain all the TM fixes we have at the moment.

  Thus, that issue affects any application that uses TM on a baremetal
  POWER9 DD2.1 (pvr 004e 1201).

  
  [1] 
  IBM-witherspoon-ibm-OP9_v1.19_1.160
  op-build-v1.21.2-255-g6ad1636-dirty
  buildroot-2017.11-5-g65679be
  skiboot-v5.10.5-op910-1
  hostboot-ed53939
  linux-4.14.24-openpower1-paed97e8
  petitboot-v1.6.6-p41a158a
  machine-xml-4af
  occ-ef5d466
  hostboot-binaries-6a92b6d
  capp-ucode-p9-dd2-v3
  sbe-7e02c23

  [2]
  open-power-witherspoon-v1.22-82-gebe1295-dirty
buildroot-2018.02.1-6-ga8d11267c2
skiboot-v6.0-rc1
hostboot-d9bf361-p6755b85
occ-f741c41
linux-4.16.7-openpower1-p945838d
petitboot-v1.7.1-pd695626
machine-xml-7cd20a6
hostboot-binaries-53aece6
capp-ucode-p9-dd2-v4
sbe-8e0105e
hcode-hw050318a.op920

  [3] https://github.com/torvalds/linux.git (master)
  [4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git (next) 
  [5] Power ISA - Book II, p. 894
   
  Stack trace output:
   no
   
  Oops output:
   no
   
  Userspace tool common name: any tool using TM instruction set 

  Userspace rpm: not relevant 
   
  The userspace tool has the following bit modes: 64-bit 
   
  System Dump Info:
The system is not configured to capture a system dump.

  Userspace tool obtained from project website:  na 
   
  *Additional Instructions for grom...@br.ibm.com: 
  -Attach sysctl -a output output to the bug.
  -Attach ltrace and strace of userspace application.

  
  The following patch fixes this issue:

  http://patchwork.ozlabs.org/patch/968375/

  Author: Michael Neuling 
  Date:   Tue Sep 11 13:07:56 2018 +1000

  powerpc/tm: Fix HFSCR bit for no suspend case
  
  Currently on P9N DD2.1 we end up taking infinite TM facility
  unavailable exceptions on the first TM usage by userspace.
  
  In the special case of TM no suspend (P9N DD2.1), Linux is told TM is
  off via CPU dt-ftrs but told to (partially) use it via
  OPAL_REINIT_CPUS_TM_SUSPEND_DISABLED. So HFSCR[TM] will be off from
  dt-ftrs but we need to turn it on for the no suspend case.
  
  This patch fixes this by enabling HFSCR TM in this case.
  
  Cc: sta...@vger.kernel.org # 4.15+
  Signed-off-by: Michael Neuling 

  == Comment: #2 - Michael Ranweiler  - 2018-10-15 
13:52:13 ==
  This is in the powerpc -next branch:
  
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next=dd9a8c5a87395b6f05552c3b44e42fdc95760552

To manage 

[Kernel-packages] [Bug 1799388] Re: TM (Hardware Transactional Memory) instructions halt application on baremetal POWER9 DD2.1

2018-11-05 Thread Andrew Cloke
Marking as incomplete while awaiting feedback from IBM on the test
kernel.

** Changed in: ubuntu-power-systems
   Status: In Progress => Incomplete

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1799388

Title:
  TM (Hardware Transactional Memory) instructions halt application on
  baremetal POWER9 DD2.1

Status in The Ubuntu-power-systems project:
  Incomplete
Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Bionic:
  In Progress
Status in linux source package in Cosmic:
  In Progress

Bug description:
  == Comment: #0 - Michael Ranweiler  - 2018-10-15 
08:55:55 ==
  +++ This bug was initially created as a clone of Bug #167756 +++

  ---Problem Description---
  TM (Hardware Transactional Memory) instructions halt application on baremetal 
POWER9 DD2.1
   
  Contact Information = grom...@br.ibm.com 
   
  ---Additional Hardware Info---
  POWER9 DD2.1 (pvr 004e 1201) baremetal. Witherspoon. 

   
  Machine Type = POWER9 DD2.1 (pvr 004e 1201) baremetal 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   Currently TM (Hardware Transactional Memory) on baremetal POWER9 DD2.1 (pvr 
004e 1201) with the latest firmware [1] (Firmware level [2] was also tested 
with the same result) and running Linux from Linus' upstream tree [3] or 
powerpc/next branch [4] is not working as expected. Once a TM instruction is 
executed in a process (any instruction), the process halts completely and has 
to be killed.

  A simple test case is to execute a 'tend.' which accordingly to POWER8
  behaviour and the ISA v3.00 if executed "in Non-transactional state is
  treated as a no-op." [5]. It means that the instruction in the test
  case below should be treated simply as a 'nop' instruction and the
  process would terminate normally but instead it halts and the process
  never terminates:

  root@io83:~/gromero# cat t.c
  int main() { asm ("tend.;"); }
  root@io83:~/gromero# make t
  make: 't' is up to date.
  root@io83:~/gromero# ./t
  ^C
  

  Ubuntu stock kernel 4.15.0-20-generic was also tested with the same
  result.

  I confirmed with Erich Hauptli (FW team) that FW stack levels [1]
  contain all the TM fixes we have at the moment.

  Thus, that issue affects any application that uses TM on a baremetal
  POWER9 DD2.1 (pvr 004e 1201).

  
  [1] 
  IBM-witherspoon-ibm-OP9_v1.19_1.160
  op-build-v1.21.2-255-g6ad1636-dirty
  buildroot-2017.11-5-g65679be
  skiboot-v5.10.5-op910-1
  hostboot-ed53939
  linux-4.14.24-openpower1-paed97e8
  petitboot-v1.6.6-p41a158a
  machine-xml-4af
  occ-ef5d466
  hostboot-binaries-6a92b6d
  capp-ucode-p9-dd2-v3
  sbe-7e02c23

  [2]
  open-power-witherspoon-v1.22-82-gebe1295-dirty
buildroot-2018.02.1-6-ga8d11267c2
skiboot-v6.0-rc1
hostboot-d9bf361-p6755b85
occ-f741c41
linux-4.16.7-openpower1-p945838d
petitboot-v1.7.1-pd695626
machine-xml-7cd20a6
hostboot-binaries-53aece6
capp-ucode-p9-dd2-v4
sbe-8e0105e
hcode-hw050318a.op920

  [3] https://github.com/torvalds/linux.git (master)
  [4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git (next) 
  [5] Power ISA - Book II, p. 894
   
  Stack trace output:
   no
   
  Oops output:
   no
   
  Userspace tool common name: any tool using TM instruction set 

  Userspace rpm: not relevant 
   
  The userspace tool has the following bit modes: 64-bit 
   
  System Dump Info:
The system is not configured to capture a system dump.

  Userspace tool obtained from project website:  na 
   
  *Additional Instructions for grom...@br.ibm.com: 
  -Attach sysctl -a output output to the bug.
  -Attach ltrace and strace of userspace application.

  
  The following patch fixes this issue:

  http://patchwork.ozlabs.org/patch/968375/

  Author: Michael Neuling 
  Date:   Tue Sep 11 13:07:56 2018 +1000

  powerpc/tm: Fix HFSCR bit for no suspend case
  
  Currently on P9N DD2.1 we end up taking infinite TM facility
  unavailable exceptions on the first TM usage by userspace.
  
  In the special case of TM no suspend (P9N DD2.1), Linux is told TM is
  off via CPU dt-ftrs but told to (partially) use it via
  OPAL_REINIT_CPUS_TM_SUSPEND_DISABLED. So HFSCR[TM] will be off from
  dt-ftrs but we need to turn it on for the no suspend case.
  
  This patch fixes this by enabling HFSCR TM in this case.
  
  Cc: sta...@vger.kernel.org # 4.15+
  Signed-off-by: Michael Neuling 

  == Comment: #2 - Michael Ranweiler  - 2018-10-15 
13:52:13 ==
  This is in the powerpc -next branch:
  
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next=dd9a8c5a87395b6f05552c3b44e42fdc95760552

To manage notifications about this bug go to:

[Kernel-packages] [Bug 1799388] Re: TM (Hardware Transactional Memory) instructions halt application on baremetal POWER9 DD2.1

2018-10-23 Thread Joseph Salisbury
** Also affects: linux (Ubuntu Cosmic)
   Importance: Undecided
 Assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
   Status: New

** Also affects: linux (Ubuntu Bionic)
   Importance: Undecided
   Status: New

** Changed in: linux (Ubuntu Bionic)
 Assignee: (unassigned) => Joseph Salisbury (jsalisbury)

** Changed in: linux (Ubuntu Cosmic)
 Assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) => 
Joseph Salisbury (jsalisbury)

** Changed in: linux (Ubuntu Bionic)
   Importance: Undecided => Medium

** Changed in: linux (Ubuntu Cosmic)
   Importance: Undecided => Medium

** Changed in: linux (Ubuntu Bionic)
   Status: New => In Progress

** Changed in: linux (Ubuntu Cosmic)
   Status: New => In Progress

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1799388

Title:
  TM (Hardware Transactional Memory) instructions halt application on
  baremetal POWER9 DD2.1

Status in The Ubuntu-power-systems project:
  New
Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Bionic:
  In Progress
Status in linux source package in Cosmic:
  In Progress

Bug description:
  == Comment: #0 - Michael Ranweiler  - 2018-10-15 
08:55:55 ==
  +++ This bug was initially created as a clone of Bug #167756 +++

  ---Problem Description---
  TM (Hardware Transactional Memory) instructions halt application on baremetal 
POWER9 DD2.1
   
  Contact Information = grom...@br.ibm.com 
   
  ---Additional Hardware Info---
  POWER9 DD2.1 (pvr 004e 1201) baremetal. Witherspoon. 

   
  Machine Type = POWER9 DD2.1 (pvr 004e 1201) baremetal 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   Currently TM (Hardware Transactional Memory) on baremetal POWER9 DD2.1 (pvr 
004e 1201) with the latest firmware [1] (Firmware level [2] was also tested 
with the same result) and running Linux from Linus' upstream tree [3] or 
powerpc/next branch [4] is not working as expected. Once a TM instruction is 
executed in a process (any instruction), the process halts completely and has 
to be killed.

  A simple test case is to execute a 'tend.' which accordingly to POWER8
  behaviour and the ISA v3.00 if executed "in Non-transactional state is
  treated as a no-op." [5]. It means that the instruction in the test
  case below should be treated simply as a 'nop' instruction and the
  process would terminate normally but instead it halts and the process
  never terminates:

  root@io83:~/gromero# cat t.c
  int main() { asm ("tend.;"); }
  root@io83:~/gromero# make t
  make: 't' is up to date.
  root@io83:~/gromero# ./t
  ^C
  

  Ubuntu stock kernel 4.15.0-20-generic was also tested with the same
  result.

  I confirmed with Erich Hauptli (FW team) that FW stack levels [1]
  contain all the TM fixes we have at the moment.

  Thus, that issue affects any application that uses TM on a baremetal
  POWER9 DD2.1 (pvr 004e 1201).

  
  [1] 
  IBM-witherspoon-ibm-OP9_v1.19_1.160
  op-build-v1.21.2-255-g6ad1636-dirty
  buildroot-2017.11-5-g65679be
  skiboot-v5.10.5-op910-1
  hostboot-ed53939
  linux-4.14.24-openpower1-paed97e8
  petitboot-v1.6.6-p41a158a
  machine-xml-4af
  occ-ef5d466
  hostboot-binaries-6a92b6d
  capp-ucode-p9-dd2-v3
  sbe-7e02c23

  [2]
  open-power-witherspoon-v1.22-82-gebe1295-dirty
buildroot-2018.02.1-6-ga8d11267c2
skiboot-v6.0-rc1
hostboot-d9bf361-p6755b85
occ-f741c41
linux-4.16.7-openpower1-p945838d
petitboot-v1.7.1-pd695626
machine-xml-7cd20a6
hostboot-binaries-53aece6
capp-ucode-p9-dd2-v4
sbe-8e0105e
hcode-hw050318a.op920

  [3] https://github.com/torvalds/linux.git (master)
  [4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git (next) 
  [5] Power ISA - Book II, p. 894
   
  Stack trace output:
   no
   
  Oops output:
   no
   
  Userspace tool common name: any tool using TM instruction set 

  Userspace rpm: not relevant 
   
  The userspace tool has the following bit modes: 64-bit 
   
  System Dump Info:
The system is not configured to capture a system dump.

  Userspace tool obtained from project website:  na 
   
  *Additional Instructions for grom...@br.ibm.com: 
  -Attach sysctl -a output output to the bug.
  -Attach ltrace and strace of userspace application.

  
  The following patch fixes this issue:

  http://patchwork.ozlabs.org/patch/968375/

  Author: Michael Neuling 
  Date:   Tue Sep 11 13:07:56 2018 +1000

  powerpc/tm: Fix HFSCR bit for no suspend case
  
  Currently on P9N DD2.1 we end up taking infinite TM facility
  unavailable exceptions on the first TM usage by userspace.
  
  In the special case of TM no suspend (P9N DD2.1), Linux is told TM is
  off via CPU dt-ftrs but told to (partially) use it via

[Kernel-packages] [Bug 1799388] Re: TM (Hardware Transactional Memory) instructions halt application on baremetal POWER9 DD2.1

2018-10-23 Thread Joseph Salisbury
I built a test kernel with commit dd9a8c5a87395b6f0555.  The test kernel can be 
downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1799388

Can you test this kernel and see if it resolves this bug?

Note about installing test kernels:
• If the test kernel is prior to 4.15(Bionic) you need to install the 
linux-image and linux-image-extra .deb packages.
• If the test kernel is 4.15(Bionic) or newer, you need to install the 
linux-modules, linux-modules-extra and linux-image-unsigned .deb packages.

Thanks in advance!

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1799388

Title:
  TM (Hardware Transactional Memory) instructions halt application on
  baremetal POWER9 DD2.1

Status in The Ubuntu-power-systems project:
  In Progress
Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Bionic:
  In Progress
Status in linux source package in Cosmic:
  In Progress

Bug description:
  == Comment: #0 - Michael Ranweiler  - 2018-10-15 
08:55:55 ==
  +++ This bug was initially created as a clone of Bug #167756 +++

  ---Problem Description---
  TM (Hardware Transactional Memory) instructions halt application on baremetal 
POWER9 DD2.1
   
  Contact Information = grom...@br.ibm.com 
   
  ---Additional Hardware Info---
  POWER9 DD2.1 (pvr 004e 1201) baremetal. Witherspoon. 

   
  Machine Type = POWER9 DD2.1 (pvr 004e 1201) baremetal 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   Currently TM (Hardware Transactional Memory) on baremetal POWER9 DD2.1 (pvr 
004e 1201) with the latest firmware [1] (Firmware level [2] was also tested 
with the same result) and running Linux from Linus' upstream tree [3] or 
powerpc/next branch [4] is not working as expected. Once a TM instruction is 
executed in a process (any instruction), the process halts completely and has 
to be killed.

  A simple test case is to execute a 'tend.' which accordingly to POWER8
  behaviour and the ISA v3.00 if executed "in Non-transactional state is
  treated as a no-op." [5]. It means that the instruction in the test
  case below should be treated simply as a 'nop' instruction and the
  process would terminate normally but instead it halts and the process
  never terminates:

  root@io83:~/gromero# cat t.c
  int main() { asm ("tend.;"); }
  root@io83:~/gromero# make t
  make: 't' is up to date.
  root@io83:~/gromero# ./t
  ^C
  

  Ubuntu stock kernel 4.15.0-20-generic was also tested with the same
  result.

  I confirmed with Erich Hauptli (FW team) that FW stack levels [1]
  contain all the TM fixes we have at the moment.

  Thus, that issue affects any application that uses TM on a baremetal
  POWER9 DD2.1 (pvr 004e 1201).

  
  [1] 
  IBM-witherspoon-ibm-OP9_v1.19_1.160
  op-build-v1.21.2-255-g6ad1636-dirty
  buildroot-2017.11-5-g65679be
  skiboot-v5.10.5-op910-1
  hostboot-ed53939
  linux-4.14.24-openpower1-paed97e8
  petitboot-v1.6.6-p41a158a
  machine-xml-4af
  occ-ef5d466
  hostboot-binaries-6a92b6d
  capp-ucode-p9-dd2-v3
  sbe-7e02c23

  [2]
  open-power-witherspoon-v1.22-82-gebe1295-dirty
buildroot-2018.02.1-6-ga8d11267c2
skiboot-v6.0-rc1
hostboot-d9bf361-p6755b85
occ-f741c41
linux-4.16.7-openpower1-p945838d
petitboot-v1.7.1-pd695626
machine-xml-7cd20a6
hostboot-binaries-53aece6
capp-ucode-p9-dd2-v4
sbe-8e0105e
hcode-hw050318a.op920

  [3] https://github.com/torvalds/linux.git (master)
  [4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git (next) 
  [5] Power ISA - Book II, p. 894
   
  Stack trace output:
   no
   
  Oops output:
   no
   
  Userspace tool common name: any tool using TM instruction set 

  Userspace rpm: not relevant 
   
  The userspace tool has the following bit modes: 64-bit 
   
  System Dump Info:
The system is not configured to capture a system dump.

  Userspace tool obtained from project website:  na 
   
  *Additional Instructions for grom...@br.ibm.com: 
  -Attach sysctl -a output output to the bug.
  -Attach ltrace and strace of userspace application.

  
  The following patch fixes this issue:

  http://patchwork.ozlabs.org/patch/968375/

  Author: Michael Neuling 
  Date:   Tue Sep 11 13:07:56 2018 +1000

  powerpc/tm: Fix HFSCR bit for no suspend case
  
  Currently on P9N DD2.1 we end up taking infinite TM facility
  unavailable exceptions on the first TM usage by userspace.
  
  In the special case of TM no suspend (P9N DD2.1), Linux is told TM is
  off via CPU dt-ftrs but told to (partially) use it via
  OPAL_REINIT_CPUS_TM_SUSPEND_DISABLED. So HFSCR[TM] will be off from
  dt-ftrs but we need to turn it on for the no suspend case.
  
  This patch fixes this by enabling HFSCR TM in this case.
  
  Cc: 

[Kernel-packages] [Bug 1799388] Re: TM (Hardware Transactional Memory) instructions halt application on baremetal POWER9 DD2.1

2018-10-23 Thread Frank Heimes
** Changed in: ubuntu-power-systems
   Status: New => In Progress

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1799388

Title:
  TM (Hardware Transactional Memory) instructions halt application on
  baremetal POWER9 DD2.1

Status in The Ubuntu-power-systems project:
  In Progress
Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Bionic:
  In Progress
Status in linux source package in Cosmic:
  In Progress

Bug description:
  == Comment: #0 - Michael Ranweiler  - 2018-10-15 
08:55:55 ==
  +++ This bug was initially created as a clone of Bug #167756 +++

  ---Problem Description---
  TM (Hardware Transactional Memory) instructions halt application on baremetal 
POWER9 DD2.1
   
  Contact Information = grom...@br.ibm.com 
   
  ---Additional Hardware Info---
  POWER9 DD2.1 (pvr 004e 1201) baremetal. Witherspoon. 

   
  Machine Type = POWER9 DD2.1 (pvr 004e 1201) baremetal 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   Currently TM (Hardware Transactional Memory) on baremetal POWER9 DD2.1 (pvr 
004e 1201) with the latest firmware [1] (Firmware level [2] was also tested 
with the same result) and running Linux from Linus' upstream tree [3] or 
powerpc/next branch [4] is not working as expected. Once a TM instruction is 
executed in a process (any instruction), the process halts completely and has 
to be killed.

  A simple test case is to execute a 'tend.' which accordingly to POWER8
  behaviour and the ISA v3.00 if executed "in Non-transactional state is
  treated as a no-op." [5]. It means that the instruction in the test
  case below should be treated simply as a 'nop' instruction and the
  process would terminate normally but instead it halts and the process
  never terminates:

  root@io83:~/gromero# cat t.c
  int main() { asm ("tend.;"); }
  root@io83:~/gromero# make t
  make: 't' is up to date.
  root@io83:~/gromero# ./t
  ^C
  

  Ubuntu stock kernel 4.15.0-20-generic was also tested with the same
  result.

  I confirmed with Erich Hauptli (FW team) that FW stack levels [1]
  contain all the TM fixes we have at the moment.

  Thus, that issue affects any application that uses TM on a baremetal
  POWER9 DD2.1 (pvr 004e 1201).

  
  [1] 
  IBM-witherspoon-ibm-OP9_v1.19_1.160
  op-build-v1.21.2-255-g6ad1636-dirty
  buildroot-2017.11-5-g65679be
  skiboot-v5.10.5-op910-1
  hostboot-ed53939
  linux-4.14.24-openpower1-paed97e8
  petitboot-v1.6.6-p41a158a
  machine-xml-4af
  occ-ef5d466
  hostboot-binaries-6a92b6d
  capp-ucode-p9-dd2-v3
  sbe-7e02c23

  [2]
  open-power-witherspoon-v1.22-82-gebe1295-dirty
buildroot-2018.02.1-6-ga8d11267c2
skiboot-v6.0-rc1
hostboot-d9bf361-p6755b85
occ-f741c41
linux-4.16.7-openpower1-p945838d
petitboot-v1.7.1-pd695626
machine-xml-7cd20a6
hostboot-binaries-53aece6
capp-ucode-p9-dd2-v4
sbe-8e0105e
hcode-hw050318a.op920

  [3] https://github.com/torvalds/linux.git (master)
  [4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git (next) 
  [5] Power ISA - Book II, p. 894
   
  Stack trace output:
   no
   
  Oops output:
   no
   
  Userspace tool common name: any tool using TM instruction set 

  Userspace rpm: not relevant 
   
  The userspace tool has the following bit modes: 64-bit 
   
  System Dump Info:
The system is not configured to capture a system dump.

  Userspace tool obtained from project website:  na 
   
  *Additional Instructions for grom...@br.ibm.com: 
  -Attach sysctl -a output output to the bug.
  -Attach ltrace and strace of userspace application.

  
  The following patch fixes this issue:

  http://patchwork.ozlabs.org/patch/968375/

  Author: Michael Neuling 
  Date:   Tue Sep 11 13:07:56 2018 +1000

  powerpc/tm: Fix HFSCR bit for no suspend case
  
  Currently on P9N DD2.1 we end up taking infinite TM facility
  unavailable exceptions on the first TM usage by userspace.
  
  In the special case of TM no suspend (P9N DD2.1), Linux is told TM is
  off via CPU dt-ftrs but told to (partially) use it via
  OPAL_REINIT_CPUS_TM_SUSPEND_DISABLED. So HFSCR[TM] will be off from
  dt-ftrs but we need to turn it on for the no suspend case.
  
  This patch fixes this by enabling HFSCR TM in this case.
  
  Cc: sta...@vger.kernel.org # 4.15+
  Signed-off-by: Michael Neuling 

  == Comment: #2 - Michael Ranweiler  - 2018-10-15 
13:52:13 ==
  This is in the powerpc -next branch:
  
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next=dd9a8c5a87395b6f05552c3b44e42fdc95760552

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1799388/+subscriptions

-- 
Mailing list: 

[Kernel-packages] [Bug 1799388] Re: TM (Hardware Transactional Memory) instructions halt application on baremetal POWER9 DD2.1

2018-10-23 Thread Frank Heimes
** Package changed: kernel-package (Ubuntu) => linux (Ubuntu)

** Also affects: ubuntu-power-systems
   Importance: Undecided
   Status: New

** Changed in: ubuntu-power-systems
   Importance: Undecided => High

** Changed in: ubuntu-power-systems
 Assignee: (unassigned) => Canonical Kernel Team (canonical-kernel-team)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1799388

Title:
  TM (Hardware Transactional Memory) instructions halt application on
  baremetal POWER9 DD2.1

Status in The Ubuntu-power-systems project:
  New
Status in linux package in Ubuntu:
  New

Bug description:
  == Comment: #0 - Michael Ranweiler  - 2018-10-15 
08:55:55 ==
  +++ This bug was initially created as a clone of Bug #167756 +++

  ---Problem Description---
  TM (Hardware Transactional Memory) instructions halt application on baremetal 
POWER9 DD2.1
   
  Contact Information = grom...@br.ibm.com 
   
  ---Additional Hardware Info---
  POWER9 DD2.1 (pvr 004e 1201) baremetal. Witherspoon. 

   
  Machine Type = POWER9 DD2.1 (pvr 004e 1201) baremetal 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   Currently TM (Hardware Transactional Memory) on baremetal POWER9 DD2.1 (pvr 
004e 1201) with the latest firmware [1] (Firmware level [2] was also tested 
with the same result) and running Linux from Linus' upstream tree [3] or 
powerpc/next branch [4] is not working as expected. Once a TM instruction is 
executed in a process (any instruction), the process halts completely and has 
to be killed.

  A simple test case is to execute a 'tend.' which accordingly to POWER8
  behaviour and the ISA v3.00 if executed "in Non-transactional state is
  treated as a no-op." [5]. It means that the instruction in the test
  case below should be treated simply as a 'nop' instruction and the
  process would terminate normally but instead it halts and the process
  never terminates:

  root@io83:~/gromero# cat t.c
  int main() { asm ("tend.;"); }
  root@io83:~/gromero# make t
  make: 't' is up to date.
  root@io83:~/gromero# ./t
  ^C
  

  Ubuntu stock kernel 4.15.0-20-generic was also tested with the same
  result.

  I confirmed with Erich Hauptli (FW team) that FW stack levels [1]
  contain all the TM fixes we have at the moment.

  Thus, that issue affects any application that uses TM on a baremetal
  POWER9 DD2.1 (pvr 004e 1201).

  
  [1] 
  IBM-witherspoon-ibm-OP9_v1.19_1.160
  op-build-v1.21.2-255-g6ad1636-dirty
  buildroot-2017.11-5-g65679be
  skiboot-v5.10.5-op910-1
  hostboot-ed53939
  linux-4.14.24-openpower1-paed97e8
  petitboot-v1.6.6-p41a158a
  machine-xml-4af
  occ-ef5d466
  hostboot-binaries-6a92b6d
  capp-ucode-p9-dd2-v3
  sbe-7e02c23

  [2]
  open-power-witherspoon-v1.22-82-gebe1295-dirty
buildroot-2018.02.1-6-ga8d11267c2
skiboot-v6.0-rc1
hostboot-d9bf361-p6755b85
occ-f741c41
linux-4.16.7-openpower1-p945838d
petitboot-v1.7.1-pd695626
machine-xml-7cd20a6
hostboot-binaries-53aece6
capp-ucode-p9-dd2-v4
sbe-8e0105e
hcode-hw050318a.op920

  [3] https://github.com/torvalds/linux.git (master)
  [4] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git (next) 
  [5] Power ISA - Book II, p. 894
   
  Stack trace output:
   no
   
  Oops output:
   no
   
  Userspace tool common name: any tool using TM instruction set 

  Userspace rpm: not relevant 
   
  The userspace tool has the following bit modes: 64-bit 
   
  System Dump Info:
The system is not configured to capture a system dump.

  Userspace tool obtained from project website:  na 
   
  *Additional Instructions for grom...@br.ibm.com: 
  -Attach sysctl -a output output to the bug.
  -Attach ltrace and strace of userspace application.

  
  The following patch fixes this issue:

  http://patchwork.ozlabs.org/patch/968375/

  Author: Michael Neuling 
  Date:   Tue Sep 11 13:07:56 2018 +1000

  powerpc/tm: Fix HFSCR bit for no suspend case
  
  Currently on P9N DD2.1 we end up taking infinite TM facility
  unavailable exceptions on the first TM usage by userspace.
  
  In the special case of TM no suspend (P9N DD2.1), Linux is told TM is
  off via CPU dt-ftrs but told to (partially) use it via
  OPAL_REINIT_CPUS_TM_SUSPEND_DISABLED. So HFSCR[TM] will be off from
  dt-ftrs but we need to turn it on for the no suspend case.
  
  This patch fixes this by enabling HFSCR TM in this case.
  
  Cc: sta...@vger.kernel.org # 4.15+
  Signed-off-by: Michael Neuling 

  == Comment: #2 - Michael Ranweiler  - 2018-10-15 
13:52:13 ==
  This is in the powerpc -next branch:
  
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next=dd9a8c5a87395b6f05552c3b44e42fdc95760552

To manage notifications about this bug go to: