MIPS: KVM: Expose MSA registers
authorJames Hogan <[email protected]>
Tue, 2 Dec 2014 15:48:24 +0000 (15:48 +0000)
committerJames Hogan <[email protected]>
Fri, 27 Mar 2015 21:25:21 +0000 (21:25 +0000)
commitab86bd600400357ffa0dfdb1797f587476d01352
tree265d24436dc03ac0e1ff2fa3a1652feb3346b6ff
parentc2537ed9fb8e17d713e5e67fcede047699d25814
MIPS: KVM: Expose MSA registers

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

The MSA vector registers use the same register numbers as the FPU
registers except with a different size (128bits). Since MSA depends on
Status.FR=1, these registers are inaccessible when Status.FR=0. These
registers are returned as a single native endian 128bit value, rather
than least significant half first with each 64-bit half native endian as
the kernel uses internally.

Signed-off-by: James Hogan <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Paul Burton <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Gleb Natapov <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Documentation/virtual/kvm/api.txt
arch/mips/include/uapi/asm/kvm.h
arch/mips/kvm/mips.c