]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4cccee8ae2e1113a897d68d3e8144c843558c253
treeb20a7bab7f41f2596750ba971bac86c084cd3c44
parentcaf87c9b6b4557875469da861be5015bdc712c11
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