• James Hogan's avatar
    KVM: MIPS/Emulate: De-duplicate MMIO emulation · 8b48d5b7
    James Hogan authored
    Refactor MIPS KVM MMIO load/store emulation to reduce code duplication.
    Each duplicate differed slightly anyway, and it will simplify adding
    64-bit MMIO support for VZ.
    
    kvm_mips_emulate_store() and kvm_mips_emulate_load() can now return
    EMULATE_DO_MMIO (as possibly originally intended). We therefore stop
    calling either of these from kvm_mips_emulate_inst(), which is now only
    used by kvm_trap_emul_handle_cop_unusable() which is picky about return
    values.
    Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: "Radim Krčmář" <rkrcmar@redhat.com>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: linux-mips@linux-mips.org
    Cc: kvm@vger.kernel.org
    8b48d5b7
emulate.c 69.9 KB