All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] s390x/cpumodel: Add more feature to gen16 default model
@ 2021-09-07 10:10 Christian Borntraeger
  2021-09-07 10:13 ` David Hildenbrand
  2021-09-07 11:38 ` Thomas Huth
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Borntraeger @ 2021-09-07 10:10 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Janosch Frank, David Hildenbrand, Cornelia Huck,
	Richard Henderson, qemu-devel, Halil Pasic,
	Christian Borntraeger, qemu-s390x

Add the new gen16 features to the default model and fence them for
machine version 6.1 and earlier.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 hw/s390x/s390-virtio-ccw.c  | 5 +++++
 target/s390x/gen-features.c | 8 +++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 4d25278cf20e..61aeccb163f7 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -803,6 +803,11 @@ DEFINE_CCW_MACHINE(6_2, "6.2", true);
 static void ccw_machine_6_1_instance_options(MachineState *machine)
 {
     ccw_machine_6_2_instance_options(machine);
+    s390_cpudef_featoff_greater(16, 1, S390_FEAT_NNPA);
+    s390_cpudef_featoff_greater(16, 1, S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2);
+    s390_cpudef_featoff_greater(16, 1, S390_FEAT_BEAR_ENH);
+    s390_cpudef_featoff_greater(16, 1, S390_FEAT_RDP);
+    s390_cpudef_featoff_greater(16, 1, S390_FEAT_PAI);
 }
 
 static void ccw_machine_6_1_class_options(MachineClass *mc)
diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
index 7d85322d6814..7cb1a6ec10be 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -663,7 +663,13 @@ static uint16_t default_GEN15_GA1[] = {
     S390_FEAT_ETOKEN,
 };
 
-#define default_GEN16_GA1 EmptyFeat
+static uint16_t default_GEN16_GA1[] = {
+    S390_FEAT_NNPA,
+    S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2,
+    S390_FEAT_BEAR_ENH,
+    S390_FEAT_RDP,
+    S390_FEAT_PAI,
+};
 
 /* QEMU (CPU model) features */
 
-- 
2.32.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] s390x/cpumodel: Add more feature to gen16 default model
  2021-09-07 10:10 [PATCH v2] s390x/cpumodel: Add more feature to gen16 default model Christian Borntraeger
@ 2021-09-07 10:13 ` David Hildenbrand
  2021-09-07 11:38 ` Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2021-09-07 10:13 UTC (permalink / raw)
  To: Christian Borntraeger, Thomas Huth
  Cc: Janosch Frank, Cornelia Huck, Richard Henderson, qemu-devel,
	Halil Pasic, qemu-s390x

On 07.09.21 12:10, Christian Borntraeger wrote:
> Add the new gen16 features to the default model and fence them for
> machine version 6.1 and earlier.
> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>   hw/s390x/s390-virtio-ccw.c  | 5 +++++
>   target/s390x/gen-features.c | 8 +++++++-
>   2 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index 4d25278cf20e..61aeccb163f7 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -803,6 +803,11 @@ DEFINE_CCW_MACHINE(6_2, "6.2", true);
>   static void ccw_machine_6_1_instance_options(MachineState *machine)
>   {
>       ccw_machine_6_2_instance_options(machine);
> +    s390_cpudef_featoff_greater(16, 1, S390_FEAT_NNPA);
> +    s390_cpudef_featoff_greater(16, 1, S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2);
> +    s390_cpudef_featoff_greater(16, 1, S390_FEAT_BEAR_ENH);
> +    s390_cpudef_featoff_greater(16, 1, S390_FEAT_RDP);
> +    s390_cpudef_featoff_greater(16, 1, S390_FEAT_PAI);
>   }
>   
>   static void ccw_machine_6_1_class_options(MachineClass *mc)
> diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
> index 7d85322d6814..7cb1a6ec10be 100644
> --- a/target/s390x/gen-features.c
> +++ b/target/s390x/gen-features.c
> @@ -663,7 +663,13 @@ static uint16_t default_GEN15_GA1[] = {
>       S390_FEAT_ETOKEN,
>   };
>   
> -#define default_GEN16_GA1 EmptyFeat
> +static uint16_t default_GEN16_GA1[] = {
> +    S390_FEAT_NNPA,
> +    S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2,
> +    S390_FEAT_BEAR_ENH,
> +    S390_FEAT_RDP,
> +    S390_FEAT_PAI,
> +};
>   
>   /* QEMU (CPU model) features */
>   
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] s390x/cpumodel: Add more feature to gen16 default model
  2021-09-07 10:10 [PATCH v2] s390x/cpumodel: Add more feature to gen16 default model Christian Borntraeger
  2021-09-07 10:13 ` David Hildenbrand
@ 2021-09-07 11:38 ` Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2021-09-07 11:38 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Janosch Frank, David Hildenbrand, Cornelia Huck,
	Richard Henderson, qemu-devel, Halil Pasic, qemu-s390x

On 07/09/2021 12.10, Christian Borntraeger wrote:
> Add the new gen16 features to the default model and fence them for
> machine version 6.1 and earlier.
> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>   hw/s390x/s390-virtio-ccw.c  | 5 +++++
>   target/s390x/gen-features.c | 8 +++++++-
>   2 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index 4d25278cf20e..61aeccb163f7 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -803,6 +803,11 @@ DEFINE_CCW_MACHINE(6_2, "6.2", true);
>   static void ccw_machine_6_1_instance_options(MachineState *machine)
>   {
>       ccw_machine_6_2_instance_options(machine);
> +    s390_cpudef_featoff_greater(16, 1, S390_FEAT_NNPA);
> +    s390_cpudef_featoff_greater(16, 1, S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2);
> +    s390_cpudef_featoff_greater(16, 1, S390_FEAT_BEAR_ENH);
> +    s390_cpudef_featoff_greater(16, 1, S390_FEAT_RDP);
> +    s390_cpudef_featoff_greater(16, 1, S390_FEAT_PAI);
>   }
>   
>   static void ccw_machine_6_1_class_options(MachineClass *mc)
> diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
> index 7d85322d6814..7cb1a6ec10be 100644
> --- a/target/s390x/gen-features.c
> +++ b/target/s390x/gen-features.c
> @@ -663,7 +663,13 @@ static uint16_t default_GEN15_GA1[] = {
>       S390_FEAT_ETOKEN,
>   };
>   
> -#define default_GEN16_GA1 EmptyFeat
> +static uint16_t default_GEN16_GA1[] = {
> +    S390_FEAT_NNPA,
> +    S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2,
> +    S390_FEAT_BEAR_ENH,
> +    S390_FEAT_RDP,
> +    S390_FEAT_PAI,
> +};
>   
>   /* QEMU (CPU model) features */
>   
> 

Thanks, queued to my s390x-next branch:

  https://gitlab.com/thuth/qemu/-/commits/s390x-next/

  Thomas



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-07 11:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 10:10 [PATCH v2] s390x/cpumodel: Add more feature to gen16 default model Christian Borntraeger
2021-09-07 10:13 ` David Hildenbrand
2021-09-07 11:38 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.