From 4dd4200ee7b4bc4b383932720bc53accf85cc8b2 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Mon, 5 Sep 2016 10:52:29 +0200 Subject: s390x/sclp: indicate sclp features We have three different blocks in the SCLP read-SCP information response that indicate sclp features. Let's prepare propagation. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand Message-Id: <20160905085244.99980-16-dahi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck --- target-s390x/cpu_models.c | 14 ++++++++++++++ target-s390x/cpu_models.h | 1 + 2 files changed, 15 insertions(+) (limited to 'target-s390x') diff --git a/target-s390x/cpu_models.c b/target-s390x/cpu_models.c index c1d2269..d59e5ef 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"), }; +void s390_get_feat_block(S390FeatType type, uint8_t *data) +{ + static S390CPU *cpu; + + if (!cpu) { + cpu = S390_CPU(qemu_get_cpu(0)); + } + + if (!cpu || !cpu->model) { + return; + } + s390_fill_feat_block(cpu->model->features, type, data); +} + bool s390_has_feat(S390Feat feat) { static S390CPU *cpu; diff --git a/target-s390x/cpu_models.h b/target-s390x/cpu_models.h index cca865d..b80883c 100644 --- a/target-s390x/cpu_models.h +++ b/target-s390x/cpu_models.h @@ -49,6 +49,7 @@ typedef struct S390CPUModel { uint8_t cpu_ver; /* CPU version, usually "ff" for kvm */ } S390CPUModel; +void s390_get_feat_block(S390FeatType type, uint8_t *data); bool s390_has_feat(S390Feat feat); #endif /* TARGET_S390X_CPU_MODELS_H */ -- cgit v1.1