Paul recently posted a nice patch set that started to make kvm code use the already existing in-kernel instruction emulator. Some bits from my previous attempt to implement yet another instruction emulator can and should be reused for that approach as well.
So this patch set gathers all the bits that make sense as a basis for any code that wants to implement more generic instruction emulation in KVM. And even if we may never get this awesome emulation, at least it also is a nice code cleanup to make things more understandable and common across booke and book3s. Alexander Graf (7): KVM: PPC: Implement kvmppc_xlate for all targets KVM: PPC: Move kvmppc_ld/st to common code KVM: PPC: Remove kvmppc_bad_hva() KVM: PPC: Use kvm_read_guest in kvmppc_ld KVM: PPC: Handle magic page in kvmppc_ld/st KVM: PPC: Separate loadstore emulation from priv emulation KVM: PPC: Expose helper functions for data/inst faults arch/powerpc/include/asm/kvm_book3s.h | 9 +- arch/powerpc/include/asm/kvm_booke.h | 10 ++ arch/powerpc/include/asm/kvm_host.h | 4 +- arch/powerpc/include/asm/kvm_ppc.h | 26 ++++ arch/powerpc/kvm/Makefile | 4 +- arch/powerpc/kvm/book3s.c | 102 +++---------- arch/powerpc/kvm/booke.c | 67 ++++++++- arch/powerpc/kvm/emulate.c | 192 +----------------------- arch/powerpc/kvm/emulate_loadstore.c | 266 ++++++++++++++++++++++++++++++++++ arch/powerpc/kvm/powerpc.c | 77 +++++++++- 10 files changed, 474 insertions(+), 283 deletions(-) create mode 100644 arch/powerpc/kvm/emulate_loadstore.c -- 1.8.1.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html