target/ppc: extend eieio for POWER9
commitc8fd8373e42821984400382cd91b8bf4e7c14e3b
authorCédric Le Goater <clg@kaod.org>
Wed, 6 Jun 2018 07:33:53 +0000 (6 09:33 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 12 Jun 2018 00:44:36 +0000 (12 10:44 +1000)
tree429581c1c7425f21eb676092f9348b971513471a
parent3431bdf5a3c3bd732f78b0433471c2b1cb373564
target/ppc: extend eieio for POWER9

POWER9 introduced a new variant of the eieio instruction using bit 6
as a hint to tell the CPU it is a store-forwarding barrier.

The usage of this eieio extension was recently added in Linux 4.17
which activated the "support for a store forwarding barrier at kernel
entry/exit".

Unfortunately, it is not possible to insert this new eieio instruction
without considerable change in ppc_tr_translate_insn(). So instead we
loosen the QEMU eieio instruction mask and modify the gen_eieio()
helper to test for bit6. On non-POWER9 CPUs, the bit6 is just ignored
but a warning is emitted as this is not an instruction software should
be using.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/translate.c