[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 06/40] s390x/cpumodel: provide compat handling for ne
From: |
Christian Borntraeger |
Subject: |
[Qemu-devel] [PULL 06/40] s390x/cpumodel: provide compat handling for new cpu features |
Date: |
Fri, 14 Jul 2017 12:40:33 +0200 |
From: "Jason J. Herne" <address@hidden>
Provide a mechanism to disable features in compatibility machines.
Signed-off-by: Jason J. Herne <address@hidden>
Acked-by: Christian Borntraeger <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>
---
target/s390x/cpu_models.c | 26 ++++++++++++++++++++++++++
target/s390x/cpu_models.h | 2 ++
2 files changed, 28 insertions(+)
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 7cb55dc..fd3f459 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;
diff --git a/target/s390x/cpu_models.h b/target/s390x/cpu_models.h
index d41f8d6..c0bee15 100644
--- a/target/s390x/cpu_models.h
+++ b/target/s390x/cpu_models.h
@@ -72,6 +72,8 @@ typedef struct S390CPUModel {
#define ibc_gen(x) (x == 0 ? 0 : ((x >> 4) + S390_GEN_Z10))
#define ibc_ec_ga(x) (x & 0xf)
+void s390_cpudef_featoff(uint8_t gen, uint8_t ec_ga, S390Feat feat);
+void s390_cpudef_featoff_greater(uint8_t gen, uint8_t ec_ga, S390Feat feat);
uint32_t s390_get_hmfai(void);
uint8_t s390_get_mha_pow(void);
uint32_t s390_get_ibc_val(void);
--
2.7.4
- [Qemu-devel] [PULL 28/40] pc-bios/s390-ccw: Link libnet into the netboot image and do the TFTP load, (continued)
- [Qemu-devel] [PULL 28/40] pc-bios/s390-ccw: Link libnet into the netboot image and do the TFTP load, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 38/40] s390x/kvm: enable guarded storage, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 40/40] s390x/gdb: add gs registers, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 27/40] pc-bios/s390-ccw: Add virtio-net driver code, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 26/40] pc-bios/s390-ccw: Add core files for the network bootloading program, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 25/40] roms/SLOF: Update submodule to latest status, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 22/40] pc-bios/s390-ccw: Move byteswap functions to a separate header, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 19/40] pc-bios/s390-ccw: Move ebc2asc to sclp.c, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 23/40] pc-bios/s390-ccw: Remove unused structs from virtio.h, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 36/40] s390x/cpumodel: add esop/esop2 to z12 model, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 06/40] s390x/cpumodel: provide compat handling for new cpu features,
Christian Borntraeger <=
- [Qemu-devel] [PULL 15/40] s390x/css: add ORB to SubchDev, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 37/40] s390x/kvm: Enable KSS facility for nested virtualization, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 14/40] s390x/css: add missing css state conditionally, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 30/40] pc-bios/s390: rebuild s390-ccw.img, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 13/40] s390x: add css_migration_enabled to machine class, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 09/40] s390x/flic: introduce inject_airq callback, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 11/40] s390x/css: update css_adapter_interrupt, Christian Borntraeger, 2017/07/14
- [Qemu-devel] [PULL 08/40] s390x/flic: introduce modify_ais_mode callback, Christian Borntraeger, 2017/07/14