• James Hogan's avatar
    MIPS: KVM: Use kmap instead of CKSEG0ADDR() · 28cc5bd5
    James Hogan authored
    There are several unportable uses of CKSEG0ADDR() in MIPS KVM, which
    implicitly assume that a host physical address will be in the low 512MB
    of the physical address space (accessible in KSeg0). These assumptions
    don't hold for highmem or on 64-bit kernels.
    
    When interpreting the guest physical address when reading or overwriting
    a trapping instruction, use kmap_atomic() to get a usable virtual
    address to access guest memory, which is portable to 64-bit and highmem
    kernels.
    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
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    28cc5bd5
dyntrans.c 3.59 KB