On Wed, Apr 25, 2018 at 07:54:33PM +0800, wei.guo.si...@gmail.com wrote:
> From: Simon Guo <wei.guo.si...@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

Thanks for doing this.  It's nice to see that this makes the code 260
lines smaller.

I have some comments on the individual patches, which I will give in
replies to those patches.

Paul.

Reply via email to