summaryrefslogtreecommitdiffstats
path: root/target-s390x/cpu.h
diff options
context:
space:
mode:
authorEric Farman <farman@linux.vnet.ibm.com>2014-08-18 15:33:39 -0400
committerCornelia Huck <cornelia.huck@de.ibm.com>2015-05-27 17:52:03 +0200
commitfcb79802e07fe06fe24ba97a027d8a1c3a714fa7 (patch)
tree83d9bc208b52de8342a8af5e22643196bfd5eaff /target-s390x/cpu.h
parentc498d8e36e2998fb67de21a34ece633d356a4834 (diff)
downloadhqemu-fcb79802e07fe06fe24ba97a027d8a1c3a714fa7.zip
hqemu-fcb79802e07fe06fe24ba97a027d8a1c3a714fa7.tar.gz
s390x: Vector Register IOCTLs
Handle the actual syncing of the vector registers with kernel space, via the get/put register IOCTLs. The vector registers that were introduced with the z13 overlay the existing floating point registers. FP registers 0-15 are the high-halves of vector registers 0-15. Thus, remove the freg fields and replace them with the equivalent vector field to avoid errors in duplication. Moreover, synchronize either the vector registers via kvm_sync_regs, or floating point registers via the GET/SET FPU IOCTLs. Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'target-s390x/cpu.h')
-rw-r--r--target-s390x/cpu.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index e968769..708349c 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -81,7 +81,11 @@ typedef struct MchkQueue {
typedef struct CPUS390XState {
uint64_t regs[16]; /* GP registers */
- CPU_DoubleU fregs[16]; /* FP registers */
+ /*
+ * The floating point registers are part of the vector registers.
+ * vregs[0][0] -> vregs[15][0] are 16 floating point registers
+ */
+ CPU_DoubleU vregs[32][2]; /* vector registers */
uint32_t aregs[16]; /* access registers */
uint32_t fpc; /* floating-point control register */
@@ -164,7 +168,7 @@ typedef struct CPUS390XState {
static inline CPU_DoubleU *get_freg(CPUS390XState *cs, int nr)
{
- return &cs->fregs[nr];
+ return &cs->vregs[nr][0];
}
#include "cpu-qom.h"
OpenPOWER on IntegriCloud