From a366930780a75027bf44fa8b1efa03372f71e17d Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Mon, 5 Sep 2016 10:52:32 +0200 Subject: s390x/sclp: propagate hmfai hmfai is provided on CPU models >= z196. Let's propagate it properly. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand Message-Id: <20160905085244.99980-19-dahi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck --- target-s390x/cpu_models.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'target-s390x/cpu_models.c') 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; -- cgit v1.2.3-55-g7522