OSDN Git Service

KVM: PPC: Emulation for more integer loads and stores
authorPaul Mackerras <paulus@ozlabs.org>
Tue, 21 Mar 2017 04:43:47 +0000 (15:43 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 20 Apr 2017 01:37:38 +0000 (11:37 +1000)
commitceba57df43a25ede55a96a795703c46022b1d1d0
treeb20a7bab7f41f2596750ba971bac86c084cd3c44
parent91242fd1a3eb96e4efe43bdf96c2fcec97fdf4ff
KVM: PPC: Emulation for more integer loads and stores

This adds emulation for the following integer loads and stores,
thus enabling them to be used in a guest for accessing emulated
MMIO locations.

- lhaux
- lwaux
- lwzux
- ldu
- lwa
- stdux
- stwux
- stdu
- ldbrx
- stdbrx

Previously, most of these would cause an emulation failure exit to
userspace, though ldu and lwa got treated incorrectly as ld, and
stdu got treated incorrectly as std.

This also tidies up some of the formatting and updates the comment
listing instructions that still need to be implemented.

With this, all integer loads and stores that are defined in the Power
ISA v2.07 are emulated, except for those that are permitted to trap
when used on cache-inhibited or write-through mappings (and which do
in fact trap on POWER8), that is, lmw/stmw, lswi/stswi, lswx/stswx,
lq/stq, and l[bhwdq]arx/st[bhwdq]cx.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/kvm/emulate_loadstore.c