aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/cpu_models.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-07-14 14:19:35 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-07-14 14:19:35 +0100
commitfbc8ea1ed0704b0cd393e5dc429816a36cb5ed05 (patch)
tree889e3e593b0feb364012d94350b43a130b832d32 /target/s390x/cpu_models.c
parent6c6076662d98c068059983d411cb2a8987ba5670 (diff)
parent86158a2a2b81f075c84d0b95c6d72b98dbf1dc61 (diff)
Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20170714' into staging
s390x/kvm/migration/cpumodel: fixes, enhancements and cleanups - add a network boot rom for s390 (Thomas Huth) - migration of storage attributes like the CMMA used/unused state - PCI related enhancements - full support for aen, ais and zpci - migration support for css with vmstates (Halil Pasic) - cpu model enhancements for cpu features - guarded storage support # gpg: Signature made Fri 14 Jul 2017 11:33:04 BST # gpg: using RSA key 0x117BBC80B5A61C7C # gpg: Good signature from "Christian Borntraeger (IBM) <borntraeger@de.ibm.com>" # Primary key fingerprint: F922 9381 A334 08F9 DBAB FBCA 117B BC80 B5A6 1C7C * remotes/borntraeger/tags/s390x-20170714: (40 commits) s390x/gdb: add gs registers s390x/arch_dump: also dump guarded storage control block s390x/kvm: enable guarded storage s390x/kvm: Enable KSS facility for nested virtualization s390x/cpumodel: add esop/esop2 to z12 model s390x/cpumodel: we are always in zarchitecture mode s390x/cpumodel: wire up new hardware features s390x/flic: migrate ais states s390x/cpumodel: add zpci, aen and ais facilities s390x: initialize cpu firstly pc-bios/s390: rebuild s390-ccw.img pc-bios/s390: add s390-netboot.img pc-bios/s390-ccw: Link libnet into the netboot image and do the TFTP load pc-bios/s390-ccw: Add virtio-net driver code pc-bios/s390-ccw: Add core files for the network bootloading program roms/SLOF: Update submodule to latest status pc-bios/s390-ccw: Add code for virtio feature negotiation pc-bios/s390-ccw: Remove unused structs from virtio.h pc-bios/s390-ccw: Move byteswap functions to a separate header pc-bios/s390-ccw: Add a write() function for stdio ... Conflicts: target/s390x/kvm.c Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/s390x/cpu_models.c')
-rw-r--r--target/s390x/cpu_models.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index f56d57b8c2..c654279a6c 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -77,6 +77,32 @@ static S390CPUDef s390_cpu_defs[] = {
CPUDEF_INIT(0x2965, 13, 2, 47, 0x08000000U, "z13s", "IBM z13s GA1"),
};
+void s390_cpudef_featoff(uint8_t gen, uint8_t ec_ga, S390Feat feat)
+{
+ const S390CPUDef *def;
+
+ def = s390_find_cpu_def(0, gen, ec_ga, NULL);
+ clear_bit(feat, (unsigned long *)&def->default_feat);
+}
+
+void s390_cpudef_featoff_greater(uint8_t gen, uint8_t ec_ga, S390Feat feat)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(s390_cpu_defs); i++) {
+ const S390CPUDef *def = &s390_cpu_defs[i];
+
+ if (def->gen < gen) {
+ continue;
+ }
+ if (def->gen == gen && def->ec_ga < ec_ga) {
+ continue;
+ }
+
+ clear_bit(feat, (unsigned long *)&def->default_feat);
+ }
+}
+
uint32_t s390_get_hmfai(void)
{
static S390CPU *cpu;
@@ -671,6 +697,31 @@ static void check_consistency(const S390CPUModel *model)
{ S390_FEAT_SIE_CMMA, S390_FEAT_CMM },
{ S390_FEAT_SIE_CMMA, S390_FEAT_SIE_GSLS },
{ S390_FEAT_SIE_PFMFI, S390_FEAT_EDAT },
+ { S390_FEAT_MSA_EXT_8, S390_FEAT_MSA_EXT_3 },
+ { S390_FEAT_MULTIPLE_EPOCH, S390_FEAT_TOD_CLOCK_STEERING },
+ { S390_FEAT_VECTOR_PACKED_DECIMAL, S390_FEAT_VECTOR },
+ { S390_FEAT_VECTOR_ENH, S390_FEAT_VECTOR },
+ { S390_FEAT_INSTRUCTION_EXEC_PROT, S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2 },
+ { S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2, S390_FEAT_ESOP },
+ { S390_FEAT_CMM_NT, S390_FEAT_CMM },
+ { S390_FEAT_GUARDED_STORAGE, S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2 },
+ { S390_FEAT_MULTIPLE_EPOCH, S390_FEAT_STORE_CLOCK_FAST },
+ { S390_FEAT_MULTIPLE_EPOCH, S390_FEAT_TOD_CLOCK_STEERING },
+ { S390_FEAT_SEMAPHORE_ASSIST, S390_FEAT_STFLE_49 },
+ { S390_FEAT_KIMD_SHA3_224, S390_FEAT_MSA },
+ { S390_FEAT_KIMD_SHA3_256, S390_FEAT_MSA },
+ { S390_FEAT_KIMD_SHA3_384, S390_FEAT_MSA },
+ { S390_FEAT_KIMD_SHA3_512, S390_FEAT_MSA },
+ { S390_FEAT_KIMD_SHAKE_128, S390_FEAT_MSA },
+ { S390_FEAT_KIMD_SHAKE_256, S390_FEAT_MSA },
+ { S390_FEAT_KLMD_SHA3_224, S390_FEAT_MSA },
+ { S390_FEAT_KLMD_SHA3_256, S390_FEAT_MSA },
+ { S390_FEAT_KLMD_SHA3_384, S390_FEAT_MSA },
+ { S390_FEAT_KLMD_SHA3_512, S390_FEAT_MSA },
+ { S390_FEAT_KLMD_SHAKE_128, S390_FEAT_MSA },
+ { S390_FEAT_KLMD_SHAKE_256, S390_FEAT_MSA },
+ { S390_FEAT_PRNO_TRNG_QRTCR, S390_FEAT_MSA_EXT_5 },
+ { S390_FEAT_PRNO_TRNG, S390_FEAT_MSA_EXT_5 },
};
int i;