]> asedeno.scripts.mit.edu Git - linux.git/commit
MIPS: Add return errors to protected cache ops
authorJames Hogan <james.hogan@imgtec.com>
Mon, 28 Nov 2016 16:38:01 +0000 (16:38 +0000)
committerJames Hogan <james.hogan@imgtec.com>
Fri, 3 Feb 2017 15:19:02 +0000 (15:19 +0000)
commit7170bdc777556dad87f92e6a73a6cc557bf3290e
tree1a5cfc93d2ee14cb099d872f5ebe00cdc0c65211
parent722b45443146f425453525d3c2270ff2733f5dc4
MIPS: Add return errors to protected cache ops

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: James Hogan <james.hogan@imgtec.com>
Acked-by: Ralf 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
arch/mips/include/asm/r4kcache.h