------- Comment From [email protected] 2017-03-26 21:07 EDT-------
Unfortunately I haven't anything in QEMU that could help it here now. However, 
regarding this issue, I found two commits in the Kernel that solves the problem:

https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=5d176f751ee3c6eededd984ad409bff201f436a7

powerpc: tm: Enable transactional memory (TM) lazily for userspace
Currently the MSR TM bit is always set if the hardware is TM capable.
This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and
TFAIR) must be swapped for each process regardless of if they use TM.

For processes that don't use TM the TM MSR bit can be turned off
allowing the kernel to avoid the expensive swap of the TM registers.

A TM unavailable exception will occur if a thread does use TM and the
kernel will enable MSR_TM and leave it so for some time afterwards.

Signed-off-by: Cyril Bur <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>

AND

https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=172f7aaa75d0eaae167edde25c08aae9059e80fc

powerpc/tm: Add TM Unavailable Exception
If the kernel disables transactional memory (TM) and userspace still
tries TM related actions (TM instructions or TM SPR accesses) TM aware
hardware will cause the kernel to take a facility unavailable
exception.

Add checks for the exception being caused by illegal TM access in
userspace.

Signed-off-by: Cyril Bur <[email protected]>
[mpe: Rewrite comment entirely, bugs in it are mine]
Signed-off-by: Michael Ellerman <[email protected]>

These commits is in powerpc repositiory, they were merged upstream in the 
commit:
07021b43597f506cc525d139ed1a94e79cf184f2

Merge: d1f5323 b7b7013
Author: Linus Torvalds <[email protected]>
Date:   Fri Oct 7 20:19:31 2016 -0700

Merge tag 'powerpc-4.9-1' of 
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman:
"Highlights:
- Major rework of Book3S 64-bit exception vectors (Nicholas Piggin)
- Use gas sections for arranging exception vectors et. al.
- Large set of TM cleanups and selftests (Cyril Bur)
- Enable transactional memory (TM) lazily for userspace (Cyril Bur)
- Support for XZ compression in the zImage wrapper (Oliver
O'Halloran)
- Add support for bpf constant blinding (Naveen N. Rao)
- Beginnings of upstream support for PA Semi Nemo motherboards
(Darren Stevens)

Please, is it possible to apply both patches in 16.04 kernel version in
order to see if they'd work?

Thank you

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1664622

Title:
  qemu: Missing transaction memory advertisement

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1664622/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to