Skip to contentSkip to conversation

s390x/sclp: fix event mask handling

PATCH Applied Christian Borntraeger 4 participants 10 messages Feb 2, 2018 – Feb 9, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390x/sclp: fix event mask handling

commit 67915de9f038 ("s390x/event-facility: variable-length event masks") switches the sclp receive/send mask. This broke the sclp lm console.

Fixes commit 67915de9f038 ("s390x/event-facility: variable-length event masks")
Cc Cornelia Huck <[email protected]>
Cc Jason J. Herne <[email protected]>
---
 hw/s390x/event-facility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/s390x/event-facility.c +2 -2
index b0f71f4554..155a69467b 100644
@@ -293,10 +293,10 @@ static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb)
     ef->receive_mask = be32_to_cpu(tmp_mask);
 
     /* return the SCLP's capability masks to the guest */
-    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
     copy_mask(WEM_RECEIVE_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
-    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
     copy_mask(WEM_SEND_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
 
Signature · 1 line
2.14.3
#1 lore raw
Quoted 7 lines · Christian Borntraeger

commit 67915de9f038 ("s390x/event-facility: variable-length event masks") switches the sclp receive/send mask. This broke the sclp lm console.

Fixes commit 67915de9f038 ("s390x/event-facility: variable-length event masks")
Cc Cornelia Huck <[email protected]>

opps. Please fixup yourself Conny :-)

Quoted 23 lines
---
 hw/s390x/event-facility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/s390x/event-facility.c +2 -2
index b0f71f4554..155a69467b 100644
@@ -293,10 +293,10 @@ static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb)
     ef->receive_mask = be32_to_cpu(tmp_mask);
 
     /* return the SCLP's capability masks to the guest */
-    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
     copy_mask(WEM_RECEIVE_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
-    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
     copy_mask(WEM_SEND_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
 
#2 lore raw
Quoted 4 lines · On Fri, 2 Feb 2018 10:43:18 +0100 Christian Borntraeger…
Quoted 3 lines · Christian Borntraeger

commit 67915de9f038 ("s390x/event-facility: variable-length event masks") switches the sclp receive/send mask. This broke the sclp lm console.

Hum. Probably should add sclp-lm to my test setup.

Quoted 6 lines
Quoted 4 lines
Fixes commit 67915de9f038 ("s390x/event-facility: variable-length event masks")
Cc Cornelia Huck <[email protected]>

opps. Please fixup yourself Conny :-)

Well, you did cc: the original author :)

Quoted 14 lines
Quoted 14 lines
---
 hw/s390x/event-facility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/s390x/event-facility.c +0 -0
index b0f71f4554..155a69467b 100644
@@ -293,10 +293,10 @@ static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb)
     ef->receive_mask = be32_to_cpu(tmp_mask);
 
Quoted 11 lines

hw/s390x/event-facility.c static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb) · line 302

Quoted 10 lines
hw/s390x/event-facility.c +2 -2
     /* return the SCLP's capability masks to the guest */
-    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
     copy_mask(WEM_RECEIVE_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
-    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
     copy_mask(WEM_SEND_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
 

Thanks, applied.

#3 lore raw
Quoted 45 lines · On Fri, 2 Feb 2018 11:33:01 +0100 Cornelia Huck <[email protected]> wrote:
Quoted 4 lines · On Fri, 2 Feb 2018 10:43:18 +0100 Christian Borntraeger…
Quoted 3 lines · Christian Borntraeger

commit 67915de9f038 ("s390x/event-facility: variable-length event masks") switches the sclp receive/send mask. This broke the sclp lm console.

Hum. Probably should add sclp-lm to my test setup.

Quoted 6 lines
Quoted 4 lines
Fixes commit 67915de9f038 ("s390x/event-facility: variable-length event masks")
Cc Cornelia Huck <[email protected]>

opps. Please fixup yourself Conny :-)

Well, you did cc: the original author :)

Quoted 14 lines
Quoted 14 lines
---
 hw/s390x/event-facility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/s390x/event-facility.c +0 -0
index b0f71f4554..155a69467b 100644
@@ -293,10 +293,10 @@ static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb)
     ef->receive_mask = be32_to_cpu(tmp_mask);
 
Quoted 11 lines

hw/s390x/event-facility.c static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb) · line 302

Quoted 10 lines
hw/s390x/event-facility.c +2 -2
     /* return the SCLP's capability masks to the guest */
-    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
     copy_mask(WEM_RECEIVE_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
-    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
     copy_mask(WEM_SEND_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
 
Quoted 1 line

Thanks, applied.

Oh, and as always, I still take R-bs until I prepare a pull req.

#4 lore raw

Re: [Qemu-devel] [PATCH] s390x/sclp: fix event mask handling --> stable 2.11.1?

Quoted 48 lines · Cornelia Huck
Quoted 45 lines · On Fri, 2 Feb 2018 11:33:01 +0100 Cornelia Huck <[email protected]> wrote:
Quoted 4 lines · On Fri, 2 Feb 2018 10:43:18 +0100 Christian Borntraeger…
Quoted 3 lines · Christian Borntraeger

commit 67915de9f038 ("s390x/event-facility: variable-length event masks") switches the sclp receive/send mask. This broke the sclp lm console.

Hum. Probably should add sclp-lm to my test setup.

Quoted 6 lines
Quoted 4 lines
Fixes commit 67915de9f038 ("s390x/event-facility: variable-length event masks")
Cc Cornelia Huck <[email protected]>

opps. Please fixup yourself Conny :-)

Well, you did cc: the original author :)

Quoted 25 lines
Quoted 24 lines
---
 hw/s390x/event-facility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/s390x/event-facility.c +2 -2
index b0f71f4554..155a69467b 100644
@@ -293,10 +293,10 @@ static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb)
     ef->receive_mask = be32_to_cpu(tmp_mask);
 
     /* return the SCLP's capability masks to the guest */
-    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
     copy_mask(WEM_RECEIVE_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
-    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
     copy_mask(WEM_SEND_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
 
Quoted 4 lines
Quoted 1 line

Thanks, applied.

Oh, and as always, I still take R-bs until I prepare a pull req.

Would be good to have that in 2.11.1 stable as well I think

#5 lore raw

Re: [Qemu-devel] [PATCH] s390x/sclp: fix event mask handling --> stable 2.11.1?

Quoted 49 lines · On Thu, 8 Feb 2018 12:30:28 +0100 Christian Borntraeger…
Quoted 48 lines · Cornelia Huck
Quoted 45 lines · On Fri, 2 Feb 2018 11:33:01 +0100 Cornelia Huck <[email protected]> wrote:
Quoted 4 lines · On Fri, 2 Feb 2018 10:43:18 +0100 Christian Borntraeger…
Quoted 3 lines · Christian Borntraeger

commit 67915de9f038 ("s390x/event-facility: variable-length event masks") switches the sclp receive/send mask. This broke the sclp lm console.

Hum. Probably should add sclp-lm to my test setup.

Quoted 6 lines
Quoted 4 lines
Fixes commit 67915de9f038 ("s390x/event-facility: variable-length event masks")
Cc Cornelia Huck <[email protected]>

opps. Please fixup yourself Conny :-)

Well, you did cc: the original author :)

Quoted 25 lines
Quoted 24 lines
---
 hw/s390x/event-facility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/s390x/event-facility.c +2 -2
index b0f71f4554..155a69467b 100644
@@ -293,10 +293,10 @@ static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb)
     ef->receive_mask = be32_to_cpu(tmp_mask);
 
     /* return the SCLP's capability masks to the guest */
-    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
     copy_mask(WEM_RECEIVE_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
-    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
     copy_mask(WEM_SEND_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
 
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Thanks, applied.

Oh, and as always, I still take R-bs until I prepare a pull req.

Would be good to have that in 2.11.1 stable as well I think

FWIW, this is queued in s390-next and will go into a pull request in the next days. Not sure if anything else is needed?

#6 lore raw

Re: [Qemu-devel] [PATCH] s390x/sclp: fix event mask handling --> stable 2.11.1?

In reply to Christian Borntraeger
Quoted 49 lines · On Thu, 8 Feb 2018 12:30:28 +0100 Christian Borntraeger…
Quoted 48 lines · Cornelia Huck
Quoted 45 lines · On Fri, 2 Feb 2018 11:33:01 +0100 Cornelia Huck <[email protected]> wrote:
Quoted 4 lines · On Fri, 2 Feb 2018 10:43:18 +0100 Christian Borntraeger…
Quoted 3 lines · Christian Borntraeger

commit 67915de9f038 ("s390x/event-facility: variable-length event masks") switches the sclp receive/send mask. This broke the sclp lm console.

Hum. Probably should add sclp-lm to my test setup.

Quoted 6 lines
Quoted 4 lines
Fixes commit 67915de9f038 ("s390x/event-facility: variable-length event masks")
Cc Cornelia Huck <[email protected]>

opps. Please fixup yourself Conny :-)

Well, you did cc: the original author :)

Quoted 25 lines
Quoted 24 lines
---
 hw/s390x/event-facility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/s390x/event-facility.c +2 -2
index b0f71f4554..155a69467b 100644
@@ -293,10 +293,10 @@ static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb)
     ef->receive_mask = be32_to_cpu(tmp_mask);
 
     /* return the SCLP's capability masks to the guest */
-    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
     copy_mask(WEM_RECEIVE_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
-    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
     copy_mask(WEM_SEND_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
 
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Thanks, applied.

Oh, and as always, I still take R-bs until I prepare a pull req.

Would be good to have that in 2.11.1 stable as well I think

FYI, this is now in master as commit 869e676ae7c7ef678292652be8995a525e642bee

Reviewed-by on v1 1/1
#7 lore raw
In reply to Christian Borntraeger
Quoted 3 lines · On Fri, 2 Feb 2018 09:42:41 +0000 Christian Borntraeger…

commit 67915de9f038 ("s390x/event-facility: variable-length event masks") switches the sclp receive/send mask. This broke the sclp lm console.

Quoted 26 lines
Fixes commit 67915de9f038 ("s390x/event-facility: variable-length

event masks") Cc: Cornelia Huck <[email protected]>
Cc: Jason J. Herne <[email protected]>
Cc: [email protected]

---
 hw/s390x/event-facility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/s390x/event-facility.c +2 -2
index b0f71f4554..155a69467b 100644
@@ -293,10 +293,10 @@ static void write_event_mask(SCLPEventFacility
 *ef, SCCB *sccb) ef->receive_mask = be32_to_cpu(tmp_mask);
 
     /* return the SCLP's capability masks to the guest */
-    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
     copy_mask(WEM_RECEIVE_MASK(we_mask, mask_length), (uint8_t
 *)&tmp_mask, mask_length, sizeof(tmp_mask));
-    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
     copy_mask(WEM_SEND_MASK(we_mask, mask_length), (uint8_t
 *)&tmp_mask, mask_length, sizeof(tmp_mask));
 
Reviewed-by on v1 1/1
#8 lore raw
In reply to Christian Borntraeger
Quoted 21 lines · Christian Borntraeger

commit 67915de9f038 ("s390x/event-facility: variable-length event masks") switches the sclp receive/send mask. This broke the sclp lm console.

Fixes commit 67915de9f038 ("s390x/event-facility: variable-length event masks")
Cc Cornelia Huck <[email protected]>
Cc Jason J. Herne <[email protected]>
---
 hw/s390x/event-facility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/s390x/event-facility.c +0 -0
index b0f71f4554..155a69467b 100644
@@ -293,10 +293,10 @@ static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb)
     ef->receive_mask = be32_to_cpu(tmp_mask);
 

hw/s390x/event-facility.c static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb) · line 302

Quoted 10 lines
hw/s390x/event-facility.c +2 -2
     /* return the SCLP's capability masks to the guest */
-    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
     copy_mask(WEM_RECEIVE_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
-    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
     copy_mask(WEM_SEND_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
 
Signature · 3 lines
Thanks,

David / dhildenb
#9 lore raw
In reply to Christian Borntraeger
Quoted 2 lines · Christian Borntraeger

commit 67915de9f038 ("s390x/event-facility: variable-length event masks") switches the sclp receive/send mask. This broke the sclp

switched

Quoted 28 lines

lm console.

Fixes commit 67915de9f038 ("s390x/event-facility: variable-length event masks")
Cc Cornelia Huck <[email protected]>
Cc Jason J. Herne <[email protected]>
---
 hw/s390x/event-facility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/s390x/event-facility.c +2 -2
index b0f71f4554..155a69467b 100644
@@ -293,10 +293,10 @@ static void write_event_mask(SCLPEventFacility *ef, SCCB *sccb)
     ef->receive_mask = be32_to_cpu(tmp_mask);
 
     /* return the SCLP's capability masks to the guest */
-    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
     copy_mask(WEM_RECEIVE_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));
-    tmp_mask = cpu_to_be32(get_host_receive_mask(ef));
+    tmp_mask = cpu_to_be32(get_host_send_mask(ef));
     copy_mask(WEM_SEND_MASK(we_mask, mask_length), (uint8_t *)&tmp_mask,
               mask_length, sizeof(tmp_mask));