s390x/cpumodel: check and apply the CPU model
commit80560137cfbb88ba40eb3b933741c63bd43b5fe3
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 5 Sep 2016 08:52:26 +0000 (5 10:52 +0200)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Tue, 6 Sep 2016 15:06:50 +0000 (6 17:06 +0200)
treeb2e7b33e3c936bb2e0799908bd557073ff09e97e
parent7c72ac49ae9f38fa0125296e05988655157decb5
s390x/cpumodel: check and apply the CPU model

We have to test if a configured CPU model is runnable in the current
configuration, and if not report why that is the case. This is done by
comparing it to the maximum supported model (host for KVM or z900 for TCG).
Also, we want to do some base sanity checking for a configured CPU model.

We'll cache the maximum model and the applied model (for performance
reasons and because KVM can only be configured before any VCPU is created).

For unavailable "host" model, we have to make sure that we inform KVM,
so it can do some compatibility stuff (enable CMMA later on to be precise).

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Message-Id: <20160905085244.99980-13-dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
target-s390x/cpu_models.c