diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2016-09-05 10:52:32 +0200 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2016-09-06 17:06:50 +0200 |
commit | a366930780a75027bf44fa8b1efa03372f71e17d (patch) | |
tree | 98ca7e74edb3cc6b0e6e93f6e8c5bc215abacc15 /target-s390x | |
parent | 3fad3252a362515a44003434cab3766b6b57c985 (diff) | |
download | qemu-a366930780a75027bf44fa8b1efa03372f71e17d.zip qemu-a366930780a75027bf44fa8b1efa03372f71e17d.tar.gz qemu-a366930780a75027bf44fa8b1efa03372f71e17d.tar.bz2 |
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')
-rw-r--r-- | target-s390x/cpu_models.c | 14 | ||||
-rw-r--r-- | target-s390x/cpu_models.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/target-s390x/cpu_models.c b/target-s390x/cpu_models.c index 4d2e48b..25ac2c9 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; diff --git a/target-s390x/cpu_models.h b/target-s390x/cpu_models.h index d378919..87de0fb 100644 --- a/target-s390x/cpu_models.h +++ b/target-s390x/cpu_models.h @@ -51,6 +51,7 @@ typedef struct S390CPUModel { #define S390_GEN_Z10 0xa +uint32_t s390_get_hmfai(void); uint8_t s390_get_mha_pow(void); uint32_t s390_get_ibc_val(void); static inline uint16_t s390_ibc_from_cpu_model(const S390CPUModel *model) |