s390x: add zPCI feature to "qemu" CPU model
PATCH 1/1 s390x: add zPCI feature to "qemu" CPU model
As we now always have PCI support, let's add it to the "qemu" CPU model, taking care of backwards compatibility.
--- hw/s390x/s390-virtio-ccw.c | 3 +++ target/s390x/gen-features.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-)
hw/s390x/s390-virtio-ccw.c +3 -0
@@ -657,7 +657,10 @@ DEFINE_CCW_MACHINE(4_0, "4.0", true);static void ccw_machine_3_1_instance_options (MachineState *machine) { +static const S390FeatInit qemu_cpu_feat = {S390_FEAT_LIST_QEMU_V3_1 };ccw_machine_4_0_instance_options (machine); + +s390_set_qemu_cpu_model (0x2064 ,7 ,1 , qemu_cpu_feat); }static void ccw_machine_3_1_class_options (MachineClass *mc)
target/s390x/gen-features.c +6 -2
@@ -560,7 +560,7 @@ static uint16_t qemu_V2_11[] = { S390_FEAT_ZARCH, }; -static uint16_t qemu_LATEST[] = { +static uint16_t qemu_V3_1[] = {S390_FEAT_DAT_ENH ,S390_FEAT_IDTE_SEGMENT ,S390_FEAT_STFLE ,
@@ -592,13 +592,16 @@ static uint16_t qemu_LATEST[] = { S390_FEAT_MSA_EXT_4, }; +static uint16_t qemu_LATEST[] = { +S390_FEAT_ZPCI , +}; +/* add all new definitions before this point */ static uint16_t qemu_MAX[] = {/* z13+ features */ S390_FEAT_STFLE_53 ,/* generates a dependency warning, leave it out for now */ S390_FEAT_MSA_EXT_5 , -S390_FEAT_ZPCI , };/****** END FEATURE DEFS ******/
@@ -708,6 +711,7 @@ static FeatGroupDefSpec FeatGroupDef[] = {*******************************/ static FeatGroupDefSpec QemuFeatDef[] = {QEMU_FEAT_INITIALIZER (V2_11 ), +QEMU_FEAT_INITIALIZER (V3_1 ),QEMU_FEAT_INITIALIZER (LATEST ),QEMU_FEAT_INITIALIZER (MAX ), };
Signature · 1 line
2.17.2
Quoted 14 lines · On Tue, 12 Feb 2019 10:30:23 +0100 David Hildenbrand <[email protected]> wrote:
As we now always have PCI support, let's add it to the "qemu" CPU model, taking care of backwards compatibility.
Signed-off-by David Hildenbrand <[email protected]>--- hw/s390x/s390-virtio-ccw.c | 3 +++ target/s390x/gen-features.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-)hw/s390x/s390-virtio-ccw.c +0
-0
hw/s390x/s390-virtio-ccw.c DEFINE_CCW_MACHINE(4_0, "4.0", true); · line 663
Quoted 7 lines
hw/s390x/s390-virtio-ccw.c +3
-0@@ -657,7 +657,10 @@ DEFINE_CCW_MACHINE(4_0, "4.0", true);static void ccw_machine_3_1_instance_options (MachineState *machine) { +static const S390FeatInit qemu_cpu_feat = {S390_FEAT_LIST_QEMU_V3_1 };ccw_machine_4_0_instance_options (machine); + +s390_set_qemu_cpu_model (0x2064 ,7 ,1 , qemu_cpu_feat);
Hm, don't we emulate a (stripped-down) z12 (2827)? Or am I misunderstanding?
Quoted 3 lines
hw/s390x/s390-virtio-ccw.c +0
-0}static void ccw_machine_3_1_class_options (MachineClass *mc)
Quoted 18 lines · Cornelia Huck
Quoted 15 lines · On Tue, 12 Feb 2019 10:30:23 +0100 David Hildenbrand <[email protected]> wrote:
As we now always have PCI support, let's add it to the "qemu" CPU model, taking care of backwards compatibility.
Signed-off-by David Hildenbrand <[email protected]>--- hw/s390x/s390-virtio-ccw.c | 3 +++ target/s390x/gen-features.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-)hw/s390x/s390-virtio-ccw.c +0
-0@@ -657,7 +657,10 @@ DEFINE_CCW_MACHINE(4_0, "4.0", true);
Quoted 9 lines
hw/s390x/s390-virtio-ccw.c DEFINE_CCW_MACHINE(4_0, "4.0", true); · line 663
Quoted 6 lines
hw/s390x/s390-virtio-ccw.c +3
-0static void ccw_machine_3_1_instance_options (MachineState *machine) { +static const S390FeatInit qemu_cpu_feat = {S390_FEAT_LIST_QEMU_V3_1 };ccw_machine_4_0_instance_options (machine); + +s390_set_qemu_cpu_model (0x2064 ,7 ,1 , qemu_cpu_feat);Hm, don't we emulate a (stripped-down) z12 (2827)? Or am I misunderstanding?
Yes, stupid copy and past error,
0x2827, 12, 2 it is!
Thanks for spotting that!
Quoted 4 lines
Quoted 4 lines
hw/s390x/s390-virtio-ccw.c +0
-0}static void ccw_machine_3_1_class_options (MachineClass *mc)
Signature · 3 lines
Thanks, David / dhildenb