aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2014-12-02 10:48:24 -0500
committerJames Hogan <james.hogan@imgtec.com>2015-03-27 17:25:17 -0400
commit379245cdf1d1efc1eccc38bf0cc985dae232123d (patch)
tree6b61c5f80129fac86533f2e7cc3d05e8320324b8 /Documentation
parent1c0cd66adbac8aa339b9521eceb18b00d1b0699e (diff)
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
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/virtual/kvm/api.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 3f295a04b09f..f3c198360785 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -1979,6 +1979,10 @@ registers, find a list below:
1979 MIPS | KVM_REG_MIPS_COUNT_CTL | 64 1979 MIPS | KVM_REG_MIPS_COUNT_CTL | 64
1980 MIPS | KVM_REG_MIPS_COUNT_RESUME | 64 1980 MIPS | KVM_REG_MIPS_COUNT_RESUME | 64
1981 MIPS | KVM_REG_MIPS_COUNT_HZ | 64 1981 MIPS | KVM_REG_MIPS_COUNT_HZ | 64
1982 MIPS | KVM_REG_MIPS_FPR_32(0..31) | 32
1983 MIPS | KVM_REG_MIPS_FPR_64(0..31) | 64
1984 MIPS | KVM_REG_MIPS_FCR_IR | 32
1985 MIPS | KVM_REG_MIPS_FCR_CSR | 32
1982 1986
1983ARM registers are mapped using the lower 32 bits. The upper 16 of that 1987ARM registers are mapped using the lower 32 bits. The upper 16 of that
1984is the register group type, or coprocessor number: 1988is the register group type, or coprocessor number:
@@ -2032,6 +2036,18 @@ patterns depending on whether they're 32-bit or 64-bit registers:
2032MIPS KVM control registers (see above) have the following id bit patterns: 2036MIPS KVM control registers (see above) have the following id bit patterns:
2033 0x7030 0000 0002 <reg:16> 2037 0x7030 0000 0002 <reg:16>
2034 2038
2039MIPS FPU registers (see KVM_REG_MIPS_FPR_{32,64}() above) have the following
2040id bit patterns depending on the size of the register being accessed. They are
2041always accessed according to the current guest FPU mode (Status.FR and
2042Config5.FRE), i.e. as the guest would see them, and they become unpredictable
2043if the guest FPU mode is changed:
2044 0x7020 0000 0003 00 <0:3> <reg:5> (32-bit FPU registers)
2045 0x7030 0000 0003 00 <0:3> <reg:5> (64-bit FPU registers)
2046
2047MIPS FPU control registers (see KVM_REG_MIPS_FCR_{IR,CSR} above) have the
2048following id bit patterns:
2049 0x7020 0000 0003 01 <0:3> <reg:5>
2050
2035 2051
20364.69 KVM_GET_ONE_REG 20524.69 KVM_GET_ONE_REG
2037 2053