]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: KVM: Expose FPU registers
authorJames Hogan <james.hogan@imgtec.com>
Tue, 2 Dec 2014 15:48:24 +0000 (15:48 +0000)
committerJames Hogan <james.hogan@imgtec.com>
Fri, 27 Mar 2015 21:25:17 +0000 (21:25 +0000)
commitb9b7e579f4485315adefc98dd4d33d58ab7122e1
tree6b61c5f80129fac86533f2e7cc3d05e8320324b8
parenta1d6d24845e4047d77272eb6c9ba3f4c63c63af7
MIPS: KVM: Expose FPU registers

Add KVM register numbers for the MIPS FPU registers, and implement
access to them with the KVM_GET_ONE_REG / KVM_SET_ONE_REG ioctls when
the FPU capability is enabled (exposed in a later patch) and present in
the guest according to its Config1.FP bit.

The registers are accessible in the current mode of the guest, with each
sized access showing what the guest would see with an equivalent access,
and like the architecture they may become UNPREDICTABLE if the FR mode
is changed. When FR=0, odd doubles are inaccessible as they do not exist
in that mode.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Cc: linux-api@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Documentation/virtual/kvm/api.txt
arch/mips/include/uapi/asm/kvm.h
arch/mips/kvm/mips.c