All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] KVM: PPC: reconstruct mmio emulation with analyse_instr()
@ 2018-04-25 11:54 ` wei.guo.simon
  0 siblings, 0 replies; 111+ messages in thread
From: wei.guo.simon @ 2018-04-25 11:54 UTC (permalink / raw)
  To: kvm-ppc; +Cc: Simon Guo, linuxppc-dev, kvm

From: Simon Guo <wei.guo.simon@gmail.com>

We already have analyse_instr() which analyzes instructions for the instruction
type, size, addtional flags, etc. What kvmppc_emulate_loadstore() did is somehow
duplicated and it will be good to utilize analyse_instr() to reconstruct the
code. The advantage is that the code logic will be shared and more clean to be 
maintained.

This patch series reconstructs kvmppc_emulate_loadstore() for various load/store
instructions. 

The testcase locates at:
https://github.com/justdoitqd/publicFiles/blob/master/test_mmio.c

- Tested at both PR/HV KVM. 
- Also tested with little endian host & big endian guest.

Tested instruction list: 
	lbz lbzu lbzx ld ldbrx
	ldu ldx lfd lfdu lfdx
	lfiwax lfiwzx lfs lfsu lfsx
	lha lhau lhax lhbrx lhz
	lhzu lhzx lvx lwax lwbrx
	lwz lwzu lwzx lxsdx lxsiwax
	lxsiwzx lxsspx lxvd2x lxvdsx lxvw4x
	stb stbu stbx std stdbrx
	stdu stdx stfd stfdu stfdx
	stfiwx stfs stfsx sth sthbrx
	sthu sthx stvx stw stwbrx
	stwu stwx stxsdx stxsiwx stxsspx
	stxvd2x stxvw4x

Simon Guo (11):
  KVM: PPC: add pt_regs into kvm_vcpu_arch and move vcpu->arch.gpr[]
    into it
  KVM: PPC: mov nip/ctr/lr/xer registers to pt_regs in kvm_vcpu_arch
  KVM: PPC: Fix a mmio_host_swabbed uninitialized usage issue when VMX
    store
  KVM: PPC: fix incorrect element_size for stxsiwx in analyse_instr
  KVM: PPC: add GPR RA update skeleton for MMIO emulation
  KVM: PPC: add KVMPPC_VSX_COPY_WORD_LOAD_DUMP type support for mmio
    emulation
  KVM: PPC: reconstruct non-SIMD LOAD/STORE instruction mmio emulation
    with analyse_intr() input
  KVM: PPC: add giveup_ext() hook for PPC KVM ops
  KVM: PPC: reconstruct LOAD_FP/STORE_FP instruction mmio emulation with
    analyse_intr() input
  KVM: PPC: reconstruct LOAD_VMX/STORE_VMX instruction mmio emulation
    with analyse_intr() input
  KVM: PPC: reconstruct LOAD_VSX/STORE_VSX instruction mmio emulation
    with analyse_intr() input

 arch/powerpc/include/asm/kvm_book3s.h    |  20 +-
 arch/powerpc/include/asm/kvm_book3s_64.h |  20 +-
 arch/powerpc/include/asm/kvm_booke.h     |  20 +-
 arch/powerpc/include/asm/kvm_host.h      |   9 +-
 arch/powerpc/include/asm/kvm_ppc.h       |   2 +
 arch/powerpc/include/asm/sstep.h         |   2 +-
 arch/powerpc/kernel/asm-offsets.c        |  22 +-
 arch/powerpc/kvm/book3s_32_mmu.c         |   2 +-
 arch/powerpc/kvm/book3s_64_vio_hv.c      |   2 +-
 arch/powerpc/kvm/book3s_hv.c             |  11 +-
 arch/powerpc/kvm/book3s_hv_builtin.c     |   6 +-
 arch/powerpc/kvm/book3s_hv_rm_mmu.c      |  15 +-
 arch/powerpc/kvm/book3s_hv_rm_xics.c     |   2 +-
 arch/powerpc/kvm/book3s_hv_tm.c          |  10 +-
 arch/powerpc/kvm/book3s_hv_tm_builtin.c  |  10 +-
 arch/powerpc/kvm/book3s_pr.c             |  73 +--
 arch/powerpc/kvm/book3s_xive_template.c  |   4 +-
 arch/powerpc/kvm/booke.c                 |  41 +-
 arch/powerpc/kvm/booke_emulate.c         |   6 +-
 arch/powerpc/kvm/e500_emulate.c          |   6 +-
 arch/powerpc/kvm/e500_mmu.c              |   2 +-
 arch/powerpc/kvm/emulate_loadstore.c     | 734 +++++++++----------------------
 arch/powerpc/kvm/powerpc.c               |  53 ++-
 arch/powerpc/lib/sstep.c                 |   2 +-
 24 files changed, 407 insertions(+), 667 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 111+ messages in thread

end of thread, other threads:[~2018-05-03  9:46 UTC | newest]

Thread overview: 111+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 11:54 [PATCH 00/11] KVM: PPC: reconstruct mmio emulation with analyse_instr() wei.guo.simon
2018-04-25 11:54 ` wei.guo.simon
2018-04-25 11:54 ` wei.guo.simon
2018-04-25 11:54 ` [PATCH 01/11] KVM: PPC: add pt_regs into kvm_vcpu_arch and move vcpu->arch.gpr[] into it wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-04-27  3:47   ` kbuild test robot
2018-04-27  3:47     ` kbuild test robot
2018-04-27  3:47     ` kbuild test robot
2018-04-27 10:21     ` Simon Guo
2018-04-27 10:21       ` Simon Guo
2018-04-27 10:21       ` Simon Guo
2018-05-03  5:34   ` Paul Mackerras
2018-05-03  5:34     ` Paul Mackerras
2018-05-03  5:34     ` Paul Mackerras
2018-05-03  7:43     ` Simon Guo
2018-05-03  7:43       ` Simon Guo
2018-05-03  7:43       ` Simon Guo
2018-04-25 11:54 ` [PATCH 02/11] KVM: PPC: mov nip/ctr/lr/xer registers to pt_regs in kvm_vcpu_arch wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-05-03  5:46   ` Paul Mackerras
2018-05-03  5:46     ` Paul Mackerras
2018-05-03  5:46     ` Paul Mackerras
2018-05-03  7:51     ` Simon Guo
2018-05-03  7:51       ` Simon Guo
2018-05-03  7:51       ` Simon Guo
2018-04-25 11:54 ` [PATCH 03/11] KVM: PPC: Fix a mmio_host_swabbed uninitialized usage issue when VMX store wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-05-03  5:48   ` Paul Mackerras
2018-05-03  5:48     ` Paul Mackerras
2018-05-03  5:48     ` Paul Mackerras
2018-05-03  7:52     ` Simon Guo
2018-05-03  7:52       ` Simon Guo
2018-05-03  7:52       ` Simon Guo
2018-04-25 11:54 ` [PATCH 04/11] KVM: PPC: fix incorrect element_size for stxsiwx in analyse_instr wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-05-03  5:50   ` Paul Mackerras
2018-05-03  5:50     ` Paul Mackerras
2018-05-03  5:50     ` Paul Mackerras
2018-05-03  9:05     ` Simon Guo
2018-05-03  9:05       ` Simon Guo
2018-05-03  9:05       ` Simon Guo
2018-04-25 11:54 ` [PATCH 05/11] KVM: PPC: add GPR RA update skeleton for MMIO emulation wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-05-03  5:58   ` Paul Mackerras
2018-05-03  5:58     ` Paul Mackerras
2018-05-03  5:58     ` Paul Mackerras
2018-05-03  8:37     ` Simon Guo
2018-05-03  8:37       ` Simon Guo
2018-05-03  8:37       ` Simon Guo
2018-04-25 11:54 ` [PATCH 06/11] KVM: PPC: add KVMPPC_VSX_COPY_WORD_LOAD_DUMP type support for mmio emulation wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-05-03  5:59   ` Paul Mackerras
2018-05-03  5:59     ` Paul Mackerras
2018-05-03  5:59     ` Paul Mackerras
2018-04-25 11:54 ` [PATCH 07/11] KVM: PPC: reconstruct non-SIMD LOAD/STORE instruction mmio emulation with analyse_intr() input wei.guo.simon
2018-04-25 11:54   ` [PATCH 07/11] KVM: PPC: reconstruct non-SIMD LOAD/STORE instruction mmio emulation with analyse_intr wei.guo.simon
2018-04-25 11:54   ` [PATCH 07/11] KVM: PPC: reconstruct non-SIMD LOAD/STORE instruction mmio emulation with analyse_intr() input wei.guo.simon
2018-05-03  6:03   ` Paul Mackerras
2018-05-03  6:03     ` [PATCH 07/11] KVM: PPC: reconstruct non-SIMD LOAD/STORE instruction mmio emulation with analyse_ Paul Mackerras
2018-05-03  6:03     ` [PATCH 07/11] KVM: PPC: reconstruct non-SIMD LOAD/STORE instruction mmio emulation with analyse_intr() input Paul Mackerras
2018-05-03  9:07     ` Simon Guo
2018-05-03  9:07       ` [PATCH 07/11] KVM: PPC: reconstruct non-SIMD LOAD/STORE instruction mmio emulation with analyse_ Simon Guo
2018-05-03  9:07       ` [PATCH 07/11] KVM: PPC: reconstruct non-SIMD LOAD/STORE instruction mmio emulation with analyse_intr() input Simon Guo
2018-04-25 11:54 ` [PATCH 08/11] KVM: PPC: add giveup_ext() hook for PPC KVM ops wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-04-25 11:54   ` wei.guo.simon
2018-05-03  6:08   ` Paul Mackerras
2018-05-03  6:08     ` Paul Mackerras
2018-05-03  6:08     ` Paul Mackerras
2018-05-03  9:21     ` Simon Guo
2018-05-03  9:21       ` Simon Guo
2018-05-03  9:21       ` Simon Guo
2018-04-25 11:54 ` [PATCH 09/11] KVM: PPC: reconstruct LOAD_FP/STORE_FP instruction mmio emulation with analyse_intr() input wei.guo.simon
2018-04-25 11:54   ` [PATCH 09/11] KVM: PPC: reconstruct LOAD_FP/STORE_FP instruction mmio emulation with analyse_intr() wei.guo.simon
2018-04-25 11:54   ` [PATCH 09/11] KVM: PPC: reconstruct LOAD_FP/STORE_FP instruction mmio emulation with analyse_intr() input wei.guo.simon
2018-05-03  6:10   ` Paul Mackerras
2018-05-03  6:10     ` [PATCH 09/11] KVM: PPC: reconstruct LOAD_FP/STORE_FP instruction mmio emulation with analyse_int Paul Mackerras
2018-05-03  6:10     ` [PATCH 09/11] KVM: PPC: reconstruct LOAD_FP/STORE_FP instruction mmio emulation with analyse_intr() input Paul Mackerras
2018-05-03  9:25     ` Simon Guo
2018-05-03  9:25       ` [PATCH 09/11] KVM: PPC: reconstruct LOAD_FP/STORE_FP instruction mmio emulation with analyse_int Simon Guo
2018-05-03  9:25       ` [PATCH 09/11] KVM: PPC: reconstruct LOAD_FP/STORE_FP instruction mmio emulation with analyse_intr() input Simon Guo
2018-04-25 11:54 ` [PATCH 10/11] KVM: PPC: reconstruct LOAD_VMX/STORE_VMX " wei.guo.simon
2018-04-25 11:54   ` [PATCH 10/11] KVM: PPC: reconstruct LOAD_VMX/STORE_VMX instruction mmio emulation with analyse_intr( wei.guo.simon
2018-04-25 11:54   ` [PATCH 10/11] KVM: PPC: reconstruct LOAD_VMX/STORE_VMX instruction mmio emulation with analyse_intr() input wei.guo.simon
2018-05-03  6:17   ` Paul Mackerras
2018-05-03  6:17     ` [PATCH 10/11] KVM: PPC: reconstruct LOAD_VMX/STORE_VMX instruction mmio emulation with analyse_i Paul Mackerras
2018-05-03  6:17     ` [PATCH 10/11] KVM: PPC: reconstruct LOAD_VMX/STORE_VMX instruction mmio emulation with analyse_intr() input Paul Mackerras
2018-05-03  9:43     ` Simon Guo
2018-05-03  9:43       ` [PATCH 10/11] KVM: PPC: reconstruct LOAD_VMX/STORE_VMX instruction mmio emulation with analyse_i Simon Guo
2018-05-03  9:43       ` [PATCH 10/11] KVM: PPC: reconstruct LOAD_VMX/STORE_VMX instruction mmio emulation with analyse_intr() input Simon Guo
2018-04-25 11:54 ` [PATCH 11/11] KVM: PPC: reconstruct LOAD_VSX/STORE_VSX " wei.guo.simon
2018-04-25 11:54   ` [PATCH 11/11] KVM: PPC: reconstruct LOAD_VSX/STORE_VSX instruction mmio emulation with analyse_intr( wei.guo.simon
2018-04-25 11:54   ` [PATCH 11/11] KVM: PPC: reconstruct LOAD_VSX/STORE_VSX instruction mmio emulation with analyse_intr() input wei.guo.simon
2018-05-03  6:26   ` Paul Mackerras
2018-05-03  6:26     ` [PATCH 11/11] KVM: PPC: reconstruct LOAD_VSX/STORE_VSX instruction mmio emulation with analyse_i Paul Mackerras
2018-05-03  6:26     ` [PATCH 11/11] KVM: PPC: reconstruct LOAD_VSX/STORE_VSX instruction mmio emulation with analyse_intr() input Paul Mackerras
2018-05-03  9:46     ` Simon Guo
2018-05-03  9:46       ` [PATCH 11/11] KVM: PPC: reconstruct LOAD_VSX/STORE_VSX instruction mmio emulation with analyse_i Simon Guo
2018-05-03  9:46       ` [PATCH 11/11] KVM: PPC: reconstruct LOAD_VSX/STORE_VSX instruction mmio emulation with analyse_intr() input Simon Guo
2018-05-03  5:31 ` [PATCH 00/11] KVM: PPC: reconstruct mmio emulation with analyse_instr() Paul Mackerras
2018-05-03  5:31   ` Paul Mackerras
2018-05-03  5:31   ` Paul Mackerras
2018-05-03  7:41   ` Simon Guo
2018-05-03  7:41     ` Simon Guo
2018-05-03  7:41     ` Simon Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.