powerpc: Update TM user feature bits in scan_features()
authorAnton Blanchard <anton@samba.org>
Fri, 15 Apr 2016 02:08:19 +0000 (12:08 +1000)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 11 Jul 2016 03:07:09 +0000 (23:07 -0400)
commitf49eb503f0f9ab66874a81992b14249a1c59b6ad
tree454e9979799fd8d9a79d5c0b0be406b57355c9c1
parent0ee1b6dbc57dc78541df83157e1251b983c51485
powerpc: Update TM user feature bits in scan_features()

[ Upstream commit 4705e02498d6d5a7ab98dfee9595cd5e91db2017 ]

We need to update the user TM feature bits (PPC_FEATURE2_HTM and
PPC_FEATURE2_HTM) to mirror what we do with the kernel TM feature
bit.

At the moment, if firmware reports TM is not available we turn off
the kernel TM feature bit but leave the userspace ones on. Userspace
thinks it can execute TM instructions and it dies trying.

This (together with a QEMU patch) fixes PR KVM, which doesn't currently
support TM.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: stable@vger.kernel.org
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
arch/powerpc/kernel/prom.c