diff mbox

[3/7] s390x/cpumodel: add esop/esop2 to z12 model

Message ID 1499961789-127874-4-git-send-email-borntraeger@de.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Christian Borntraeger July 13, 2017, 4:03 p.m. UTC
From: "Jason J. Herne" <jjherne@linux.vnet.ibm.com>

Add esop and esop2 features to z12 model where esop2 was originally introduced.
Provide a mechanism to disable features in compatibility machines and use this
method to disable esop and esop2 when using compatibility machine v2.9 or
earlier.

Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 hw/s390x/s390-virtio-ccw.c  | 3 +++
 target/s390x/gen-features.c | 3 +++
 2 files changed, 6 insertions(+)

Comments

Cornelia Huck July 14, 2017, 7:55 a.m. UTC | #1
On Thu, 13 Jul 2017 18:03:05 +0200
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> From: "Jason J. Herne" <jjherne@linux.vnet.ibm.com>
> 
> Add esop and esop2 features to z12 model where esop2 was originally introduced.
> Provide a mechanism to disable features in compatibility machines and use this
> method to disable esop and esop2 when using compatibility machine v2.9 or
> earlier.

The patch description does not quite fit anymore due to patch
reordering. What about:

"Add esop and esop2 features to z12 model where esop2 was originally introduced.
Disable esop and esop2 when using compatibility machine v2.9 or earlier."

> 
> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  hw/s390x/s390-virtio-ccw.c  | 3 +++
>  target/s390x/gen-features.c | 3 +++
>  2 files changed, 6 insertions(+)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Christian Borntraeger July 14, 2017, 7:58 a.m. UTC | #2
On 07/14/2017 09:55 AM, Cornelia Huck wrote:
> On Thu, 13 Jul 2017 18:03:05 +0200
> Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> 
>> From: "Jason J. Herne" <jjherne@linux.vnet.ibm.com>
>>
>> Add esop and esop2 features to z12 model where esop2 was originally introduced.
>> Provide a mechanism to disable features in compatibility machines and use this
>> method to disable esop and esop2 when using compatibility machine v2.9 or
>> earlier.
> 
> The patch description does not quite fit anymore due to patch

Right, I have splitted out the compat handling to be used for the PCI stuff.

> reordering. What about:
> 
> "Add esop and esop2 features to z12 model where esop2 was originally introduced.
> Disable esop and esop2 when using compatibility machine v2.9 or earlier."

Will use that, thanks.

> 
>>
>> Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
>> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
>> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
>> ---
>>  hw/s390x/s390-virtio-ccw.c  | 3 +++
>>  target/s390x/gen-features.c | 3 +++
>>  2 files changed, 6 insertions(+)
> 
> Reviewed-by: Cornelia Huck <cohuck@redhat.com>
>
diff mbox

Patch

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index e484aed..657a45f 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -30,6 +30,7 @@ 
 #include "hw/s390x/s390-virtio-ccw.h"
 #include "hw/s390x/css-bridge.h"
 #include "migration/register.h"
+#include "cpu_models.h"
 
 static const char *const reset_dev_types[] = {
     TYPE_VIRTUAL_CSS_BRIDGE,
@@ -503,6 +504,8 @@  DEFINE_CCW_MACHINE(2_10, "2.10", true);
 static void ccw_machine_2_9_instance_options(MachineState *machine)
 {
     ccw_machine_2_10_instance_options(machine);
+    s390_cpudef_featoff_greater(12, 1, S390_FEAT_ESOP);
+    s390_cpudef_featoff_greater(12, 1, S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2);
     s390_cpudef_featoff_greater(12, 1, S390_FEAT_ZPCI);
     s390_cpudef_featoff_greater(12, 1, S390_FEAT_ADAPTER_INT_SUPPRESSION);
     s390_cpudef_featoff_greater(12, 1, S390_FEAT_ADAPTER_EVENT_NOTIFICATION);
diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
index 33404e4..af14b11 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -429,6 +429,7 @@  static uint16_t full_GEN12_GA1[] = {
     S390_FEAT_ADAPTER_EVENT_NOTIFICATION,
     S390_FEAT_ADAPTER_INT_SUPPRESSION,
     S390_FEAT_EDAT_2,
+    S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2,
 };
 
 static uint16_t full_GEN12_GA2[] = {
@@ -488,6 +489,8 @@  static uint16_t default_GEN12_GA1[] = {
     S390_FEAT_ZPCI,
     S390_FEAT_ADAPTER_EVENT_NOTIFICATION,
     S390_FEAT_EDAT_2,
+    S390_FEAT_ESOP,
+    S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2,
 };
 
 #define default_GEN12_GA2 EmptyFeat