Public bug reported: ---Problem Description--- htm capability is switched off by default qemu machine type `pseries-cosmic`. We need to enable htm [cap-htm=on]. ---uname output--- Linux ltc-kvmfvtzz 4.18.0-7-generic #8-Ubuntu SMP Tue Aug 28 18:20:56 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux Machine Type = ZZ-L ---Steps to Reproduce--- 1. Log into P9 Ubuntu 18.10 host, take console of guest `srik_vm1` 2. Inside guest run TM selftests git clone --depth 1 https://github.com/torvalds/linux.git;cd linux/tools/testing/selftests/powerpc/;git log --oneline -1;make;make -C tm run_tests
All TM tests would be skipped root@ubuntu1810:~# LD_SHOW_AUXV=1 /bin/true |grep htm root@ubuntu1810:~# == When you enable htm feature explicitly tm tests would pass: selftests: tm: tm-resched-dscr ======================================== test: tm_resched_dscr tags: git_version:v4.19-rc3-0-g11da3a7f8 Binding to cpu 7 main test running as pid 1554 Check DSCR TM context switch: OK success: tm_resched_dscr ok 1..1 selftests: tm: tm-resched-dscr [PASS] selftests: tm: tm-syscall ======================================== test: tm_syscall tags: git_version:v4.19-rc3-0-g11da3a7f8 Testing transactional syscalls for 10 seconds... 6886507 active and suspended transactions behaved correctly. (There were 1476 transaction retries.) success: tm_syscall ok 1..2 selftests: tm: tm-syscall [PASS] selftests: tm: tm-signal-msr-resv ======================================== test: tm_signal_msr_resv tags: git_version:v4.19-rc3-0-g11da3a7f8 success: tm_signal_msr_resv ok 1..3 selftests: tm: tm-signal-msr-resv [PASS] selftests: tm: tm-signal-stack ======================================== test: tm_signal_stack tags: git_version:v4.19-rc3-0-g11da3a7f8 success: tm_signal_stack ok 1..4 selftests: tm: tm-signal-stack [PASS] selftests: tm: tm-vmxcopy ======================================== test: tm_vmxcopy tags: git_version:v4.19-rc3-0-g11da3a7f8 success: tm_vmxcopy ok 1..5 selftests: tm: tm-vmxcopy [PASS] selftests: tm: tm-fork ======================================== test: tm_fork tags: git_version:v4.19-rc3-0-g11da3a7f8 success: tm_fork ok 1..6 selftests: tm: tm-fork [PASS] selftests: tm: tm-tar ======================================== Starting, 10000 loops test: tm_tar tags: git_version:v4.19-rc3-0-g11da3a7f8 success: tm_tar ok 1..7 selftests: tm: tm-tar [PASS] selftests: tm: tm-tmspr ======================================== test: tm_tmspr tags: git_version:v4.19-rc3-0-g11da3a7f8 success: tm_tmspr ok 1..8 selftests: tm: tm-tmspr [PASS] selftests: tm: tm-vmx-unavail ======================================== test: tm_vmx_unavail_test tags: git_version:v4.19-rc3-0-g11da3a7f8 success: tm_vmx_unavail_test ok 1..9 selftests: tm: tm-vmx-unavail [PASS] selftests: tm: tm-unavailable ======================================== test: tm_unavailable_test tags: git_version:v4.19-rc3-0-g11da3a7f8 Checking if FP/VEC registers are sane after a FP unavailable exception... If MSR.FP=0 MSR.VEC=0: FP ok VEC ok If MSR.FP=1 MSR.VEC=0: FP ok VEC ok If MSR.FP=0 MSR.VEC=1: FP ok VEC ok If MSR.FP=1 MSR.VEC=1: FP ok VEC ok Checking if FP/VEC registers are sane after a VEC unavailable exception... If MSR.FP=0 MSR.VEC=0: FP ok VEC ok If MSR.FP=1 MSR.VEC=0: FP ok VEC ok If MSR.FP=0 MSR.VEC=1: FP ok VEC ok If MSR.FP=1 MSR.VEC=1: FP ok VEC ok Checking if FP/VEC registers are sane after a VSX unavailable exception... If MSR.FP=0 MSR.VEC=0: FP ok VEC ok If MSR.FP=1 MSR.VEC=0: FP ok VEC ok If MSR.FP=0 MSR.VEC=1: FP ok VEC ok If MSR.FP=1 MSR.VEC=1: FP ok VEC ok result: success success: tm_unavailable_test ok 1..10 selftests: tm: tm-unavailable [PASS] selftests: tm: tm-trap ======================================== test: tm_trap_test tags: git_version:v4.19-rc3-0-g11da3a7f8 Little-Endian machine detected. Checking if endianness flips inadvertently on trap in TM... no. success: tm_trap_test ok 1..11 selftests: tm: tm-trap [PASS] selftests: tm: tm-signal-context-chk-gpr ======================================== test: tm_signal_context_chk_gpr tags: git_version:v4.19-rc3-0-g11da3a7f8 success: tm_signal_context_chk_gpr ok 1..12 selftests: tm: tm-signal-context-chk-gpr [PASS] selftests: tm: tm-signal-context-chk-fpu ======================================== test: tm_signal_context_chk_fpu tags: git_version:v4.19-rc3-0-g11da3a7f8 success: tm_signal_context_chk_fpu ok 1..13 selftests: tm: tm-signal-context-chk-fpu [PASS] selftests: tm: tm-signal-context-chk-vmx ======================================== test: tm_signal_context_chk_vmx tags: git_version:v4.19-rc3-0-g11da3a7f8 success: tm_signal_context_chk_vmx ok 1..14 selftests: tm: tm-signal-context-chk-vmx [PASS] selftests: tm: tm-signal-context-chk-vsx ======================================== test: tm_signal_context_chk_vsx tags: git_version:v4.19-rc3-0-g11da3a7f8 success: tm_signal_context_chk_vsx ok 1..15 selftests: tm: tm-signal-context-chk-vsx [PASS] selftests: tm: tm-sigreturn ======================================== test: tm_sigreturn tags: git_version:v4.19-rc3-0-g11da3a7f8 success: tm_sigreturn ok 1..16 selftests: tm: tm-sigreturn [PASS] make: Leaving directory '/root/linux/tools/testing/selftests/powerpc/tm' root@ubuntu1810:~/linux/tools/testing/selftests/powerpc# uname -r 4.17.0-9-generic == == After enabling: root@ubuntu1810:~# LD_SHOW_AUXV=1 /bin/true |grep htm AT_HWCAP2: htm-nosc vcrypto tar isel ebb dscr htm arch_2_07 == Comment: #7 - Murilo Opsfelder Araujo <muri...@br.ibm.com> - 2018-09-12 09:15:37 == HTM cap is disabled by default in upstream QEMU pseries-2.12 onwards. IIRC, pseries-cosmic is an alias to pseries-2.12 so it also has HTM=off by default. I'm not sure if Cosmic should diverge from upstream that much. If HTM=on is set for Cosmic, future releases of Ubuntu will likely has HTM=off when rebasing to newer QEMU code. Besides that, a migration from a pseries-2.12 HTM=off to a pseries-2.12 HTM=on could cause different behaviours. == Leonardo Augusto Guimaraes Garcia <lagar...@br.ibm.com> > I'm not sure if Cosmic should diverge from upstream that much. If HTM=on is > set for Cosmic, future releases of Ubuntu will likely has HTM=off when > rebasing to newer QEMU code. This is really a decision for Canonical IMO. We should mirror the bug and let them decide. I am in favor of having HTM=on. But it needs to be made clear to Canonical that this will imply carrying a patch to enable it as long as HTM=off remains the default upstream. ** Affects: qemu (Ubuntu) Importance: Undecided Assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) Status: New ** Tags: architecture-ppc64le bugnameltc-171275 severity-critical targetmilestone-inin1810 ** Tags added: architecture-ppc64le bugnameltc-171275 severity-critical targetmilestone-inin1810 ** Changed in: ubuntu Assignee: (unassigned) => Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) ** Package changed: ubuntu => qemu (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1792438 Title: [Ubuntu 18.10] Need to enable TM in pseries-cosmic To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1792438/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs