summaryrefslogtreecommitdiffstats
path: root/target-s390x/machine.c
diff options
context:
space:
mode:
authorFan Zhang2016-03-09 13:11:17 +0100
committerCornelia Huck2016-05-17 15:50:29 +0200
commit9700230b0d6d68d8650206ffd10d132219678db1 (patch)
tree14b645e6981f227520f4decb3317b45c397e620e /target-s390x/machine.c
parents390x: add compat machine for 2.7 (diff)
downloadqemu-9700230b0d6d68d8650206ffd10d132219678db1.tar.gz
qemu-9700230b0d6d68d8650206ffd10d132219678db1.tar.xz
qemu-9700230b0d6d68d8650206ffd10d132219678db1.zip
s390x: enable runtime instrumentation
Introduce run-time-instrumentation support when running under kvm for virtio-ccw 2.7 machine and make sure older machines can not enable it. The new ri_allowed field in the s390MachineClass serves as an indicator whether the feature can be used by the machine and should therefore be activated if available. riccb_needed() is used to check whether riccb is needed or not in live migration. Signed-off-by: Fan Zhang <zhangfan@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'target-s390x/machine.c')
-rw-r--r--target-s390x/machine.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/target-s390x/machine.c b/target-s390x/machine.c
index 6b2609054b..a30b16fe3d 100644
--- a/target-s390x/machine.c
+++ b/target-s390x/machine.c
@@ -135,6 +135,17 @@ static const VMStateDescription vmstate_vregs = {
}
};
+const VMStateDescription vmstate_riccb = {
+ .name = "cpu/riccb",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .needed = riccb_needed,
+ .fields = (VMStateField[]) {
+ VMSTATE_UINT8_ARRAY(env.riccb, S390CPU, 64),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
const VMStateDescription vmstate_s390_cpu = {
.name = "cpu",
.post_load = cpu_post_load,
@@ -166,6 +177,7 @@ const VMStateDescription vmstate_s390_cpu = {
.subsections = (const VMStateDescription*[]) {
&vmstate_fpu,
&vmstate_vregs,
+ &vmstate_riccb,
NULL
},
};