• James Hogan's avatar
    MIPS: Add return errors to protected cache ops · 7170bdc7
    James Hogan authored
    The protected cache ops contain no out of line fixup code to return an
    error code in the event of a fault, with the cache op being skipped in
    that case. For KVM however we'd like to detect this case as page
    faulting will be disabled so it could happen during normal operation if
    the GVA page tables were flushed, and need to be handled by the caller.
    
    Add the out-of-line fixup code to load the error value -EFAULT into the
    return variable, and adapt the protected cache line functions to pass
    the error back to the caller.
    Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
    Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: "Radim Krčmář" <rkrcmar@redhat.com>
    Cc: linux-mips@linux-mips.org
    Cc: kvm@vger.kernel.org
    7170bdc7
r4kcache.h 25.3 KB