aboutsummaryrefslogtreecommitdiff
path: root/target-s390x/kvm.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2016-09-05 10:52:36 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2016-09-06 17:06:50 +0200
commit34821036cd10e8ae9061338bcb6c8777781d07e9 (patch)
treeeba4f75a04e236facc0cadf66c458b47d890e82a /target-s390x/kvm.c
parent3b84c25cc7e4106a588737b2031863994bb86f03 (diff)
s390x/kvm: disable host model for problematic compat machines
Compatibility machines that touch runtime-instrumentation should not be used with the CPU model. Otherwise the host model will look different, depending on the QEMU machine QEMU has been started with. So let's simply disable the host model for existing compatibility machines that all disable ri. This, in return, disables the CPU model for these compat machines completely. Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Message-Id: <20160905085244.99980-23-dahi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'target-s390x/kvm.c')
-rw-r--r--target-s390x/kvm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index bbf8b2a3b4..d40ef0908f 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -2481,6 +2481,10 @@ static int configure_cpu_feat(const S390FeatBitmap features)
bool kvm_s390_cpu_models_supported(void)
{
+ if (!ri_allowed()) {
+ /* compatibility machines interfere with the cpu model */
+ return false;
+ }
return kvm_vm_check_attr(kvm_state, KVM_S390_VM_CPU_MODEL,
KVM_S390_VM_CPU_MACHINE) &&
kvm_vm_check_attr(kvm_state, KVM_S390_VM_CPU_MODEL,