summaryrefslogtreecommitdiff
path: root/target-s390x/cpu.h
diff options
context:
space:
mode:
authorEric Farman <farman@linux.vnet.ibm.com>2015-05-07 10:52:16 -0400
committerCornelia Huck <cornelia.huck@de.ibm.com>2015-05-27 17:52:03 +0200
commitb2ac0ff5d9478907cfd5b204c9179f77d0cb943f (patch)
treeed72a923a6e26cb8527e2d31d337e47d1d278b13 /target-s390x/cpu.h
parent3ceeb2930faf1116ee4bb22c8a7794bb2337e8a9 (diff)
downloadqemu-b2ac0ff5d9478907cfd5b204c9179f77d0cb943f.tar.gz
s390x: Migrate vector registers
When migrating a guest, be sure to include the vector registers. The vector registers are defined in a subsection, similar to the existing subsection for floating point registers. Since the floating point registers are always present (and thus migrated), we can skip them when performing the migration of the vector registers which may or may not be present. Suggested-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com> Reviewed-by: David Hildenbrand <dahi@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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index 031f94dc40..a71abaeef7 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -1190,4 +1190,18 @@ static inline int s390_assign_subch_ioeventfd(EventNotifier *notifier,
}
}
+#ifdef CONFIG_KVM
+static inline bool vregs_needed(void *opaque)
+{
+ if (kvm_enabled()) {
+ return kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS);
+ }
+ return 0;
+}
+#else
+static inline bool vregs_needed(void *opaque)
+{
+ return 0;
+}
+#endif
#endif