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>
This commit is contained in:
Fan Zhang 2016-03-09 13:11:17 +01:00 committed by Cornelia Huck
parent 946e55f3c7
commit 9700230b0d
5 changed files with 75 additions and 0 deletions

View file

@ -35,6 +35,10 @@ typedef struct S390CcwMachineClass {
MachineClass parent_class;
/*< public >*/
bool ri_allowed;
} S390CcwMachineClass;
/* runtime-instrumentation allowed by the machine */
bool ri_allowed(void);
#endif