diff mbox series

[PATCH-for-4.2,v1,8/9] s390x/cpumodel: Prepare for changes of QEMU model

Message ID 20190805152947.28536-9-david@redhat.com (mailing list archive)
State New, archived
Headers show
Series s390x: MMU changes and extensions | expand

Commit Message

David Hildenbrand Aug. 5, 2019, 3:29 p.m. UTC
Setup the 4.1 compatibility model so we can add new features to the
LATEST model.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 hw/s390x/s390-virtio-ccw.c  | 2 ++
 target/s390x/gen-features.c | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

Comments

Cornelia Huck Aug. 13, 2019, 4:02 p.m. UTC | #1
On Mon,  5 Aug 2019 17:29:46 +0200
David Hildenbrand <david@redhat.com> wrote:

> Setup the 4.1 compatibility model so we can add new features to the
> LATEST model.

Basically a nop for now from an outside view.

> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  hw/s390x/s390-virtio-ccw.c  | 2 ++
>  target/s390x/gen-features.c | 6 +++++-
>  2 files changed, 7 insertions(+), 1 deletion(-)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Thomas Huth Aug. 19, 2019, 3:07 p.m. UTC | #2
On 8/5/19 5:29 PM, David Hildenbrand wrote:
> Setup the 4.1 compatibility model so we can add new features to the
> LATEST model.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  hw/s390x/s390-virtio-ccw.c  | 2 ++
>  target/s390x/gen-features.c | 6 +++++-
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index 593b34e0e2..c815a65ee9 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -671,7 +671,9 @@ DEFINE_CCW_MACHINE(4_2, "4.2", true);
>  
>  static void ccw_machine_4_1_instance_options(MachineState *machine)
>  {
> +    static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V4_1 };
>      ccw_machine_4_2_instance_options(machine);
> +    s390_set_qemu_cpu_model(0x2964, 13, 2, qemu_cpu_feat);
>  }
>  
>  static void ccw_machine_4_1_class_options(MachineClass *mc)
> diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
> index 49a650ac52..7e82f2f004 100644
> --- a/target/s390x/gen-features.c
> +++ b/target/s390x/gen-features.c
> @@ -698,11 +698,14 @@ static uint16_t qemu_V4_0[] = {
>      S390_FEAT_ZPCI,
>  };
>  
> -static uint16_t qemu_LATEST[] = {
> +static uint16_t qemu_V4_1[] = {
>      S390_FEAT_STFLE_53,
>      S390_FEAT_VECTOR,
>  };
>  
> +static uint16_t qemu_LATEST[] = {
> +};
> +
>  /* add all new definitions before this point */
>  static uint16_t qemu_MAX[] = {
>      /* generates a dependency warning, leave it out for now */
> @@ -824,6 +827,7 @@ static FeatGroupDefSpec QemuFeatDef[] = {
>      QEMU_FEAT_INITIALIZER(V2_11),
>      QEMU_FEAT_INITIALIZER(V3_1),
>      QEMU_FEAT_INITIALIZER(V4_0),
> +    QEMU_FEAT_INITIALIZER(V4_1),
>      QEMU_FEAT_INITIALIZER(LATEST),
>      QEMU_FEAT_INITIALIZER(MAX),
>  };
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 593b34e0e2..c815a65ee9 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -671,7 +671,9 @@  DEFINE_CCW_MACHINE(4_2, "4.2", true);
 
 static void ccw_machine_4_1_instance_options(MachineState *machine)
 {
+    static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V4_1 };
     ccw_machine_4_2_instance_options(machine);
+    s390_set_qemu_cpu_model(0x2964, 13, 2, qemu_cpu_feat);
 }
 
 static void ccw_machine_4_1_class_options(MachineClass *mc)
diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
index 49a650ac52..7e82f2f004 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -698,11 +698,14 @@  static uint16_t qemu_V4_0[] = {
     S390_FEAT_ZPCI,
 };
 
-static uint16_t qemu_LATEST[] = {
+static uint16_t qemu_V4_1[] = {
     S390_FEAT_STFLE_53,
     S390_FEAT_VECTOR,
 };
 
+static uint16_t qemu_LATEST[] = {
+};
+
 /* add all new definitions before this point */
 static uint16_t qemu_MAX[] = {
     /* generates a dependency warning, leave it out for now */
@@ -824,6 +827,7 @@  static FeatGroupDefSpec QemuFeatDef[] = {
     QEMU_FEAT_INITIALIZER(V2_11),
     QEMU_FEAT_INITIALIZER(V3_1),
     QEMU_FEAT_INITIALIZER(V4_0),
+    QEMU_FEAT_INITIALIZER(V4_1),
     QEMU_FEAT_INITIALIZER(LATEST),
     QEMU_FEAT_INITIALIZER(MAX),
 };