summaryrefslogtreecommitdiffstats
path: root/target-s390x/cpu_models.c
diff options
context:
space:
mode:
authorDavid Hildenbrand2016-09-05 10:52:32 +0200
committerCornelia Huck2016-09-06 17:06:50 +0200
commita366930780a75027bf44fa8b1efa03372f71e17d (patch)
tree98ca7e74edb3cc6b0e6e93f6e8c5bc215abacc15 /target-s390x/cpu_models.c
parents390x/sclp: propagate the mha via sclp (diff)
downloadqemu-a366930780a75027bf44fa8b1efa03372f71e17d.tar.gz
qemu-a366930780a75027bf44fa8b1efa03372f71e17d.tar.xz
qemu-a366930780a75027bf44fa8b1efa03372f71e17d.zip
s390x/sclp: propagate hmfai
hmfai is provided on CPU models >= z196. Let's propagate it properly. Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Message-Id: <20160905085244.99980-19-dahi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'target-s390x/cpu_models.c')
-rw-r--r--target-s390x/cpu_models.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/target-s390x/cpu_models.c b/target-s390x/cpu_models.c
index 4d2e48b465..25ac2c9884 100644
--- a/target-s390x/cpu_models.c
+++ b/target-s390x/cpu_models.c
@@ -74,6 +74,20 @@ static S390CPUDef s390_cpu_defs[] = {
CPUDEF_INIT(0x2965, 13, 2, 47, 0x08000000U, "z13s", "IBM z13s GA1"),
};
+uint32_t s390_get_hmfai(void)
+{
+ static S390CPU *cpu;
+
+ if (!cpu) {
+ cpu = S390_CPU(qemu_get_cpu(0));
+ }
+
+ if (!cpu || !cpu->model) {
+ return 0;
+ }
+ return cpu->model->def->hmfai;
+}
+
uint8_t s390_get_mha_pow(void)
{
static S390CPU *cpu;